[Xfce4-commits] [xfce/xfce4-panel] 01/01: pager: Finish face-lift of settings dialog
noreply at xfce.org
noreply at xfce.org
Thu Oct 10 13:31:03 CEST 2019
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-panel.
commit beef6c6777a883cc1dbd0dbd3ce6fa07b862f360
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Oct 10 13:30:51 2019 +0200
pager: Finish face-lift of settings dialog
---
plugins/pager/pager-dialog.glade | 125 +++++++++++++++++++++++++--------------
plugins/pager/pager.c | 16 ++++-
2 files changed, 95 insertions(+), 46 deletions(-)
diff --git a/plugins/pager/pager-dialog.glade b/plugins/pager/pager-dialog.glade
index f0cdb0a..e59ec94 100644
--- a/plugins/pager/pager-dialog.glade
+++ b/plugins/pager/pager-dialog.glade
@@ -123,43 +123,13 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkComboBox" id="appearance">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="model">appearance-model</property>
- <property name="active">0</property>
- <property name="id_column">1</property>
- <child>
- <object class="GtkCellRendererText" id="renderer"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Appearance:</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="margin_left">12</property>
<property name="label" translatable="yes">Number of _rows:</property>
<property name="use_underline">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -182,31 +152,100 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="numbering">
- <property name="label" translatable="yes">Show workspace number</property>
+ <object class="GtkSwitch" id="numbering">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
</object>
<packing>
- <property name="left_attach">0</property>
+ <property name="left_attach">1</property>
<property name="top_attach">2</property>
- <property name="width">2</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="workspace-scrolling">
- <property name="label" translatable="yes">Switch workspaces using the mouse _wheel</property>
+ <object class="GtkSwitch" id="workspace-scrolling">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="numbering-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">12</property>
+ <property name="label" translatable="yes">Show workspace number</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="workspace-scrolling-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_left">12</property>
+ <property name="label" translatable="yes">Switch workspaces using the mouse wheel</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes"><b>Appearance</b></property>
+ <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="appearance">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="hexpand">True</property>
+ <property name="model">appearance-model</property>
+ <property name="active">0</property>
+ <property name="id_column">1</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
<property name="width">2</property>
</packing>
</child>
diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index 9f2539d..8fcf3c5 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -102,7 +102,9 @@ struct _PagerPlugin
GtkWidget *pager;
GObject *numbering_switch;
+ GObject *numbering_label;
GObject *scrolling_switch;
+ GObject *scrolling_label;
WnckScreen *wnck_screen;
@@ -232,8 +234,12 @@ pager_plugin_get_property (GObject *object,
case PROP_MINIATURE_VIEW:
g_value_set_boolean (value, plugin->miniature_view);
+ if (G_IS_OBJECT (plugin->numbering_label))
+ gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_label), !plugin->miniature_view);
if (G_IS_OBJECT (plugin->numbering_switch))
gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_switch), !plugin->miniature_view);
+ if (G_IS_OBJECT (plugin->scrolling_label))
+ gtk_widget_set_visible (GTK_WIDGET (plugin->scrolling_label), !plugin->miniature_view);
if (G_IS_OBJECT (plugin->scrolling_switch))
gtk_widget_set_visible (GTK_WIDGET (plugin->scrolling_switch), !plugin->miniature_view);
@@ -709,8 +715,9 @@ pager_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
g_signal_connect (G_OBJECT (object), "clicked",
G_CALLBACK (pager_plugin_configure_workspace_settings), dialog);
+ plugin->scrolling_label = gtk_builder_get_object (builder, "workspace-scrolling-label");
plugin->scrolling_switch = gtk_builder_get_object (builder, "workspace-scrolling");
- panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (plugin->scrolling_switch));
+ panel_return_if_fail (GTK_IS_SWITCH (plugin->scrolling_switch));
g_object_bind_property (G_OBJECT (plugin), "workspace-scrolling",
G_OBJECT (plugin->scrolling_switch), "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
@@ -727,13 +734,16 @@ pager_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
G_OBJECT (object), "value",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+ plugin->numbering_label = gtk_builder_get_object (builder, "numbering-label");
plugin->numbering_switch = gtk_builder_get_object (builder, "numbering");
- panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (plugin->numbering_switch));
+ panel_return_if_fail (GTK_IS_SWITCH (plugin->numbering_switch));
g_object_bind_property (G_OBJECT (plugin), "numbering",
G_OBJECT (plugin->numbering_switch), "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
- gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_switch), !plugin->miniature_view);
+ gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_label), !plugin->miniature_view);
+ gtk_widget_set_visible (GTK_WIDGET (plugin->numbering_switch), !plugin->miniature_view);
+ gtk_widget_set_visible (GTK_WIDGET (plugin->scrolling_label), !plugin->miniature_view);
gtk_widget_set_visible (GTK_WIDGET (plugin->scrolling_switch), !plugin->miniature_view);
/* update the rows limit */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list