summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2021-05-05 19:46:12 -0300
committerBastien Nocera <hadess@hadess.net>2021-06-29 17:19:38 +0200
commitc9ef39a4742f658fa29af58576c9d00d3d2182f9 (patch)
tree168988810dee1124144beb6f378a3f696955c982
parente41431e24bd486abd5b8b227f9306defeeecb8f3 (diff)
downloadtotem-c9ef39a4742f658fa29af58576c9d00d3d2182f9.tar.gz
preferences: Bind some labels' visibility to their corresponding ranges
The hue, brightness, saturation, and contrast labels have their visibility programatically tied to their corresponding ranges. We can do that in the .ui file more easily. Bind these labels' visibility to their corresponding ranges' in the preferences.ui file itself.
-rw-r--r--data/preferences.ui8
-rw-r--r--src/totem-preferences.c2
2 files changed, 4 insertions, 6 deletions
diff --git a/data/preferences.ui b/data/preferences.ui
index 2948e81b3..f5448316e 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -530,7 +530,7 @@
<child>
<object class="GtkLabel" id="tpw_brightness_label">
- <property name="visible">True</property>
+ <property name="visible" bind-source="tpw_bright_scale" bind-property="visible" bind-flags="default|sync-create"/>
<property name="label" translatable="yes">_Brightness:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
@@ -557,7 +557,7 @@
<child>
<object class="GtkLabel" id="tpw_contrast_label">
- <property name="visible">True</property>
+ <property name="visible" bind-source="tpw_contrast_scale" bind-property="visible" bind-flags="default|sync-create"/>
<property name="label" translatable="yes">Co_ntrast:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
@@ -623,7 +623,7 @@
<child>
<object class="GtkLabel" id="tpw_saturation_label">
- <property name="visible">True</property>
+ <property name="visible" bind-source="tpw_saturation_scale" bind-property="visible" bind-flags="default|sync-create"/>
<property name="label" translatable="yes">Sat_uration:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
@@ -650,7 +650,7 @@
<child>
<object class="GtkLabel" id="tpw_hue_label">
- <property name="visible">True</property>
+ <property name="visible" bind-source="tpw_hue_scale" bind-property="visible" bind-flags="default|sync-create"/>
<property name="label" translatable="yes">_Hue:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index 976d568db..c52fc1b67 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -274,8 +274,6 @@ totem_setup_preferences (Totem *totem)
item = POBJ (props[i].name);
gtk_range_set_value (GTK_RANGE (item), (gdouble) 65535/2);
gtk_widget_hide (GTK_WIDGET (item));
- item = POBJ (props[i].label);
- gtk_widget_hide (GTK_WIDGET (item));
hidden++;
}
}