aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-21 11:13:24 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-21 11:13:24 -0300
commit601f5e768cb37194bcfb042f41b3f254f54a152a (patch)
tree2e248f76766fc7d0d07d0af99b57d5014cb6f0e6
parent1dd7df69fbb10b77b29d96648e18392097891ddf (diff)
Place the new "Change Camera" option before resolution settings
Instead of placing it together with the resolution changes, after the separator, add it earlier. With that, it now will remain at the same place after switching between cameras. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--data/camorama-gtk2.ui9
-rw-r--r--data/camorama-gtk3.ui9
-rw-r--r--data/camorama-gtk4.ui9
-rw-r--r--src/camorama-window.c5
4 files changed, 28 insertions, 4 deletions
diff --git a/data/camorama-gtk2.ui b/data/camorama-gtk2.ui
index e32d438..41da30f 100644
--- a/data/camorama-gtk2.ui
+++ b/data/camorama-gtk2.ui
@@ -1304,6 +1304,15 @@
</object>
</child>
<child>
+ <object class="GtkMenuItem" id="change_camera">
+ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Change Camera</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_change_camera" swapped="no"/>
+ </object>
+ </child>
+ <child>
<object class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/data/camorama-gtk3.ui b/data/camorama-gtk3.ui
index 3b74bfe..927ad1e 100644
--- a/data/camorama-gtk3.ui
+++ b/data/camorama-gtk3.ui
@@ -144,6 +144,15 @@
</object>
</child>
<child>
+ <object class="GtkMenuItem" id="change_camera">
+ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Change Camera</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_change_camera" swapped="no"/>
+ </object>
+ </child>
+ <child>
<object class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/data/camorama-gtk4.ui b/data/camorama-gtk4.ui
index ac2a5dd..79b4b7c 100644
--- a/data/camorama-gtk4.ui
+++ b/data/camorama-gtk4.ui
@@ -126,6 +126,15 @@
</object>
</child>
<child>
+ <object class="GtkMenuItem" id="change_camera">
+ <property name="visible">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Change Camera</property>
+ <property name="use_underline">True</property>
+ <signal name="activate" handler="on_change_camera" swapped="no"/>
+ </object>
+ </child>
+ <child>
<object class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 7832efd..152a236 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -269,11 +269,8 @@ void load_interface(cam_t *cam)
cam);
if (n_valid_devices > 1) {
- video_dev = gtk_menu_item_new_with_label("Change camera");
- gtk_container_add(GTK_CONTAINER(GTK_WIDGET(gtk_builder_get_object(cam->xml, "menuitem4_menu"))),
- video_dev);
+ video_dev = GTK_WIDGET(gtk_builder_get_object(cam->xml, "change_camera"));
gtk_widget_show(video_dev);
-
g_signal_connect(video_dev, "activate",
G_CALLBACK(on_change_camera), cam);
}

Privacy Policy