aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-23 10:15:24 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-23 17:57:52 (GMT)
commit1d444e8907199bcb76f44e8ad375d747ce5d37c4 (patch)
treea783702769437f7c88d1a3cf2988bb6849ddd871
parent3b12891e61bd88580c7c30a4dd1774a024253dcd (diff)
Rename control widgets, in order to make easier to reference them.v4l2_convert
Right now, widgets associated with controls just have a random name. Instead, use a name related to their usage, to make easier to reference them inside src/camera-window.c.
-rw-r--r--data/camorama.glade20
-rw-r--r--src/camorama-window.c30
2 files changed, 25 insertions, 25 deletions
diff --git a/data/camorama.glade b/data/camorama.glade
index 9a39cd5..196d5d7 100644
--- a/data/camorama.glade
+++ b/data/camorama.glade
@@ -2239,7 +2239,7 @@
<property name="column_spacing">6</property>
<child>
- <widget class="GtkHScale" id="slider2">
+ <widget class="GtkHScale" id="contrast_slider">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_value">True</property>
@@ -2260,7 +2260,7 @@
</child>
<child>
- <widget class="GtkHScale" id="slider3">
+ <widget class="GtkHScale" id="brightness_slider">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_value">True</property>
@@ -2282,7 +2282,7 @@
</child>
<child>
- <widget class="GtkHScale" id="slider4">
+ <widget class="GtkHScale" id="color_slider">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_value">True</property>
@@ -2304,7 +2304,7 @@
</child>
<child>
- <widget class="GtkHScale" id="slider5">
+ <widget class="GtkHScale" id="hue_slider">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_value">True</property>
@@ -2326,7 +2326,7 @@
</child>
<child>
- <widget class="GtkHScale" id="slider6">
+ <widget class="GtkHScale" id="balance_slider">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="draw_value">True</property>
@@ -2348,7 +2348,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label64">
+ <widget class="GtkLabel" id="contrast_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Contrast:</property>
<property name="use_underline">False</property>
@@ -2376,7 +2376,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label65">
+ <widget class="GtkLabel" id="brightness_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Brightness:</property>
<property name="use_underline">False</property>
@@ -2404,7 +2404,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label66">
+ <widget class="GtkLabel" id="color_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Color:</property>
<property name="use_underline">False</property>
@@ -2432,7 +2432,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label67">
+ <widget class="GtkLabel" id="hue_label">
<property name="visible">True</property>
<property name="label" translatable="yes">Hue:</property>
<property name="use_underline">False</property>
@@ -2460,7 +2460,7 @@
</child>
<child>
- <widget class="GtkLabel" id="label68">
+ <widget class="GtkLabel" id="balance_label">
<property name="visible">True</property>
<property name="label" translatable="yes">White Balance:</property>
<property name="use_underline">False</property>
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 54fa881..44cdfc0 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -285,57 +285,57 @@ load_interface(cam* cam) {
/* sliders */
if (cam->contrast < 0) {
gtk_widget_hide(glade_xml_get_widget (cam->xml, "contrast_icon"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "label64"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "slider2"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "contrast_label"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "contrast_slider"));
} else {
glade_xml_signal_connect_data (cam->xml, "contrast_change",
G_CALLBACK (contrast_change), cam);
gtk_range_set_value ((GtkRange *)
- glade_xml_get_widget (cam->xml, "slider2"),
+ glade_xml_get_widget (cam->xml, "contrast_slider"),
(int) (cam->contrast / 256));
}
if (cam->brightness < 0) {
gtk_widget_hide(glade_xml_get_widget (cam->xml, "brightness_icon"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "label65"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "slider3"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "brightness_label"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "brightness_slider"));
} else {
glade_xml_signal_connect_data (cam->xml, "brightness_change",
G_CALLBACK (brightness_change), cam);
gtk_range_set_value ((GtkRange *)
- glade_xml_get_widget (cam->xml, "slider3"),
+ glade_xml_get_widget (cam->xml, "brightness_slider"),
(int) (cam->brightness / 256));
}
if (cam->colour < 1) {
gtk_widget_hide(glade_xml_get_widget (cam->xml, "color_icon"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "label66"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "slider4"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "color_label"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "color_slider"));
} else {
glade_xml_signal_connect_data (cam->xml, "colour_change",
G_CALLBACK (colour_change), cam);
gtk_range_set_value ((GtkRange *)
- glade_xml_get_widget (cam->xml, "slider4"),
+ glade_xml_get_widget (cam->xml, "color_slider"),
(int) (cam->colour / 256));
}
if (cam->hue < 0) {
gtk_widget_hide(glade_xml_get_widget (cam->xml, "hue_icon"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "label67"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "slider5"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "hue_label"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "hue_slider"));
} else {
glade_xml_signal_connect_data (cam->xml, "hue_change",
G_CALLBACK (hue_change), cam);
gtk_range_set_value ((GtkRange *)
- glade_xml_get_widget (cam->xml, "slider5"),
+ glade_xml_get_widget (cam->xml, "hue_slider"),
(int) (cam->hue / 256));
}
if (cam->whiteness < 0) {
gtk_widget_hide(glade_xml_get_widget (cam->xml, "balance_icon"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "label68"));
- gtk_widget_hide(glade_xml_get_widget (cam->xml, "slider6"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "balance_label"));
+ gtk_widget_hide(glade_xml_get_widget (cam->xml, "balance_slider"));
} else {
glade_xml_signal_connect_data (cam->xml, "wb_change",
G_CALLBACK (wb_change), cam);
gtk_range_set_value ((GtkRange *)
- glade_xml_get_widget (cam->xml, "slider6"),
+ glade_xml_get_widget (cam->xml, "balance_slider"),
(int) (cam->whiteness / 256));
}

Privacy Policy