summarylogtreecommitdiffstats
path: root/xfce4-panel-4.16.1-wrap_workspaces_ui-1.patch
blob: 25fb4d9b69c5ba510305ca7e9785d322cf821098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
diff -Naur xfce4-panel-4.16.1-orig/plugins/pager/pager.c xfce4-panel-4.16.1/plugins/pager/pager.c
--- xfce4-panel-4.16.1-orig/plugins/pager/pager.c	2021-01-31 22:04:20.023870874 +0100
+++ xfce4-panel-4.16.1/plugins/pager/pager.c	2021-01-31 22:18:17.964139544 +0100
@@ -107,7 +107,7 @@
   GtkWidget     *pager;
   GObject       *numbering_toggle;
   GObject       *scrolling_toggle;
-  GObject       *invert_scrolling_toggle;
+  GObject       *scroll_options_box;
 
   WnckScreen    *wnck_screen;
 
@@ -837,13 +837,23 @@
                           G_OBJECT (plugin->scrolling_toggle), "active",
                           G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
 
-  plugin->invert_scrolling_toggle = gtk_builder_get_object (builder, "workspace-invert-scrolling");
-  panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (plugin->invert_scrolling_toggle));
+  plugin->scroll_options_box = gtk_builder_get_object (builder, "scroll-options");
+  panel_return_if_fail (GTK_IS_BOX (plugin->scroll_options_box));
   g_object_bind_property (G_OBJECT (plugin), "workspace-scrolling",
-                          G_OBJECT (plugin->invert_scrolling_toggle), "sensitive",
+                          G_OBJECT (plugin->scroll_options_box), "sensitive",
                           G_BINDING_SYNC_CREATE | G_BINDING_DEFAULT);
+
+
+  object = gtk_builder_get_object (builder, "workspace-invert-scrolling");
+  panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
   g_object_bind_property (G_OBJECT (plugin), "workspace-invert-scrolling",
-                          G_OBJECT (plugin->invert_scrolling_toggle), "active",
+                          G_OBJECT (object), "active",
+                          G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
+  object = gtk_builder_get_object (builder, "wrap-workspaces");
+  panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object));
+  g_object_bind_property (G_OBJECT (plugin), "wrap-workspaces",
+                          G_OBJECT (object), "active",
                           G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
 
   /* update the rows limit */
diff -Naur xfce4-panel-4.16.1-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.16.1/plugins/pager/pager-dialog.glade
--- xfce4-panel-4.16.1-orig/plugins/pager/pager-dialog.glade	2021-01-31 22:04:20.023870874 +0100
+++ xfce4-panel-4.16.1/plugins/pager/pager-dialog.glade	2021-01-31 22:18:31.664209323 +0100
@@ -24,7 +24,7 @@
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="icon_name">org.xfce.workspaces</property>
+    <property name="icon_name">xfce4-workspaces</property>
   </object>
   <object class="GtkImage" id="image2">
     <property name="visible">True</property>
@@ -298,17 +298,54 @@
               </packing>
             </child>
 
-            <!-- Invert scrolling toggle -->
+            <!-- Scroll options depending on workspace scrolling option -->
             <child>
-              <object class="GtkCheckButton" id="workspace-invert-scrolling">
-                <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property>
-                <property name="tooltip_text" translatable="yes">Invert the direction in which the workspaces are switched</property>
+              <object class="GtkBox" id="scroll-options">
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="margin_left">24</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-                <property name="draw_indicator">True</property>
+                <property name="can_focus">False</property>
+                <property name="spacing">6</property>
+                <property name="orientation">vertical</property>
+
+                <!-- Invert scrolling toggle -->
+                <child>
+                  <object class="GtkCheckButton" id="workspace-invert-scrolling">
+                    <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property>
+                    <property name="tooltip_text" translatable="yes">Invert the direction in which the workspaces are switched</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="margin_left">24</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+
+                <!-- Wrap workspaces toggle -->
+                <child>
+                  <object class="GtkCheckButton" id="wrap-workspaces">
+                    <property name="label" translatable="yes">Wrap workspaces</property>
+                    <property name="tooltip_text" translatable="yes">When scrolling beyond the last/first workspace, wrap around to the first/last workspace</property>
+                    <property name="visible">True</property>
+                    <property name="sensitive">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="margin_left">24</property>
+                    <property name="receives_default">False</property>
+                    <property name="use_underline">True</property>
+                    <property name="draw_indicator">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+
+
               </object>
               <packing>
                 <property name="expand">False</property>