diff options
Diffstat (limited to 'wrap-workspaces.patch')
-rw-r--r-- | wrap-workspaces.patch | 184 |
1 files changed, 113 insertions, 71 deletions
diff --git a/wrap-workspaces.patch b/wrap-workspaces.patch index 74e92e128f60..a5e337ffa1d0 100644 --- a/wrap-workspaces.patch +++ b/wrap-workspaces.patch @@ -1,84 +1,126 @@ -diff -Naur xfce4-panel-4.14.0-orig/plugins/pager/pager.c xfce4-panel-4.14.0/plugins/pager/pager.c ---- xfce4-panel-4.14.0-orig/plugins/pager/pager.c 2019-09-04 17:18:06.995162924 +0200 -+++ xfce4-panel-4.14.0/plugins/pager/pager.c 2019-09-04 17:16:38.674429040 +0200 -@@ -757,7 +757,7 @@ - PagerPlugin *plugin = XFCE_PAGER_PLUGIN (panel_plugin); - GtkBuilder *builder; - GObject *dialog, *object; -- GtkWidget *scroll_option; -+ GtkWidget *scroll_options; +diff -Naur xfce4-panel-4.16.0-orig/plugins/pager/pager.c xfce4-panel-4.16.0/plugins/pager/pager.c +--- xfce4-panel-4.16.0-orig/plugins/pager/pager.c 2021-01-19 22:31:30.317186954 +0100 ++++ xfce4-panel-4.16.0/plugins/pager/pager.c 2021-01-19 22:32:02.773341344 +0100 +@@ -106,7 +106,7 @@ + GtkWidget *pager; + GObject *numbering_toggle; + GObject *scrolling_toggle; +- GObject *invert_scrolling_toggle; ++ GObject *scroll_options_box; - panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin)); + WnckScreen *wnck_screen; -@@ -786,12 +786,12 @@ - G_OBJECT (object), "active", - G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); +@@ -238,8 +238,8 @@ + case PROP_WORKSPACE_SCROLLING: + g_value_set_boolean (value, plugin->scrolling); -- scroll_option = GTK_WIDGET(gtk_builder_get_object(builder, "workspace-invert-scrolling")); -- gtk_widget_set_sensitive (GTK_WIDGET (scroll_option), -+ scroll_options = GTK_WIDGET(gtk_builder_get_object(builder, "scroll-options")); -+ gtk_widget_set_sensitive (GTK_WIDGET (scroll_options), - gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (object))); +- if (G_IS_OBJECT (plugin->invert_scrolling_toggle)) +- gtk_widget_set_sensitive (GTK_WIDGET (plugin->invert_scrolling_toggle), plugin->scrolling); ++ if (G_IS_OBJECT (plugin->scroll_options_box)) ++ gtk_widget_set_sensitive (GTK_WIDGET (plugin->scroll_options_box), plugin->scrolling); - g_signal_connect (object, "toggled", -- G_CALLBACK (workspace_scrolling_toggled), scroll_option); -+ G_CALLBACK (workspace_scrolling_toggled), scroll_options); + pager_plugin_screen_layout_changed (plugin); + break; +@@ -824,17 +824,29 @@ + G_OBJECT (plugin->scrolling_toggle), "active", + G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); - object = gtk_builder_get_object (builder, "workspace-invert-scrolling"); - panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object)); -@@ -799,6 +799,12 @@ - G_OBJECT (object), "active", +- plugin->invert_scrolling_toggle = gtk_builder_get_object (builder, "workspace-invert-scrolling"); +- panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (plugin->invert_scrolling_toggle)); +- g_object_bind_property (G_OBJECT (plugin), "workspace-invert-scrolling", +- G_OBJECT (plugin->invert_scrolling_toggle), "active", ++ 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), "scroll_options", ++ G_OBJECT (plugin->scroll_options_box), "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL); +- gtk_widget_set_sensitive (GTK_WIDGET (plugin->invert_scrolling_toggle), ++ gtk_widget_set_sensitive (GTK_WIDGET (plugin->scroll_options_box), + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (plugin->scrolling_toggle))); + + g_signal_connect (G_OBJECT (plugin->scrolling_toggle), "toggled", +- G_CALLBACK (workspace_scrolling_toggled), plugin->invert_scrolling_toggle); ++ G_CALLBACK (workspace_scrolling_toggled), plugin->scroll_options_box); ++ ++ 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 (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); + + object = gtk_builder_get_object (builder, "appearance"); + panel_return_if_fail (GTK_IS_COMBO_BOX (object)); +diff -Naur xfce4-panel-4.16.0-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.16.0/plugins/pager/pager-dialog.glade +--- xfce4-panel-4.16.0-orig/plugins/pager/pager-dialog.glade 2021-01-19 22:31:30.317186954 +0100 ++++ xfce4-panel-4.16.0/plugins/pager/pager-dialog.glade 2021-01-19 22:32:08.933370647 +0100 +@@ -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 = gtk_builder_get_object (builder, "miniature-view"); - panel_return_if_fail (GTK_IS_TOGGLE_BUTTON (object)); - g_object_bind_property (G_OBJECT (plugin), "miniature-view", -diff -Naur xfce4-panel-4.14.0-orig/plugins/pager/pager-dialog.glade xfce4-panel-4.14.0/plugins/pager/pager-dialog.glade ---- xfce4-panel-4.14.0-orig/plugins/pager/pager-dialog.glade 2019-09-04 16:23:48.827680128 +0200 -+++ xfce4-panel-4.14.0/plugins/pager/pager-dialog.glade 2019-09-04 17:13:06.856668235 +0200 -@@ -243,14 +243,32 @@ - <property name="visible">True</property> - <property name="left_padding">12</property> - <child> -- <object class="GtkCheckButton" id="workspace-invert-scrolling"> -- <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property> -+ <object class="GtkVBox" id="scroll-options"> - <property name="visible">True</property> -- <property name="sensitive">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="orientation">vertical</property> -+ <property name="spacing">6</property> -+ <child> -+ <object class="GtkCheckButton" id="workspace-invert-scrolling"> -+ <property name="label" translatable="yes">_Invert mouse wheel workspace switching direction</property> -+ <property name="visible">True</property> -+ <property name="sensitive">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> -+ </object> -+ </child> -+ <child> -+ <object class="GtkCheckButton" id="wrap-workspaces"> -+ <property name="label" translatable="yes">Wrap workspaces when _the first or the last workspace is reached</property> -+ <property name="visible">True</property> -+ <property name="sensitive">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> -+ </object> -+ </child> - </object> - </child> - </object> + </object> + <packing> + <property name="expand">False</property> |