[Xfce4-commits] [xfce/xfce4-settings] 35/67: display: Make the identity popup setting a GtkSwitch
noreply at xfce.org
noreply at xfce.org
Sat Sep 22 11:23:26 CEST 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-settings.
commit 83d7b401486cd9c00424c1fbe183dd27727d81b5
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Aug 26 17:51:19 2018 +0200
display: Make the identity popup setting a GtkSwitch
---
dialogs/display-settings/display-dialog.glade | 27 +++++++++++++--------------
dialogs/display-settings/main.c | 14 +++++++++-----
2 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/dialogs/display-settings/display-dialog.glade b/dialogs/display-settings/display-dialog.glade
index 12086d6..35f6c78 100644
--- a/dialogs/display-settings/display-dialog.glade
+++ b/dialogs/display-settings/display-dialog.glade
@@ -414,7 +414,7 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="halign">end</property>
<child>
<object class="GtkButton" id="button-profile-delete">
<property name="visible">True</property>
@@ -486,19 +486,6 @@
</packing>
</child>
<child>
- <object class="GtkToggleButton" id="identify-displays">
- <property name="label" translatable="yes">Identify Displays</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="margin_left">12</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="button-profile-apply">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
@@ -526,6 +513,18 @@
</packing>
</child>
<child>
+ <object class="GtkSwitch" id="identify-displays">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">5</property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
<child>
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 452d6d4..7bf499d 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1422,11 +1422,15 @@ set_display_popups_visible(gboolean visible)
}
}
-static void
-on_identify_displays_toggled (GtkWidget *widget, GtkBuilder *builder)
+static gboolean
+on_identify_displays_toggled (GtkWidget *widget,
+ gboolean state,
+ GtkBuilder *builder)
{
- show_popups = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- set_display_popups_visible (show_popups);
+ set_display_popups_visible (state);
+ gtk_switch_set_state (GTK_SWITCH (widget), state);
+
+ return TRUE;
}
static void
@@ -1626,7 +1630,7 @@ display_settings_dialog_new (GtkBuilder *builder)
/* Identification popups */
display_setting_identity_popups_populate ();
identify = gtk_builder_get_object (builder, "identify-displays");
- g_signal_connect (G_OBJECT (identify), "toggled", G_CALLBACK (on_identify_displays_toggled), builder);
+ g_signal_connect (G_OBJECT (identify), "state-set", G_CALLBACK (on_identify_displays_toggled), builder);
set_display_popups_visible (show_popups);
/* Display selection combobox */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list