summaryrefslogtreecommitdiffstats
path: root/main/xfce4-panel/drop-the-automatics-grouping.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/xfce4-panel/drop-the-automatics-grouping.patch')
-rw-r--r--main/xfce4-panel/drop-the-automatics-grouping.patch119
1 files changed, 119 insertions, 0 deletions
diff --git a/main/xfce4-panel/drop-the-automatics-grouping.patch b/main/xfce4-panel/drop-the-automatics-grouping.patch
new file mode 100644
index 000000000..61d449794
--- /dev/null
+++ b/main/xfce4-panel/drop-the-automatics-grouping.patch
@@ -0,0 +1,119 @@
+From 50c4281e5b8c36107732d0d48dd55e5ee7b9b549 Mon Sep 17 00:00:00 2001
+From: Nick Schermer <nick@xfce.org>
+Date: Mon, 08 Nov 2010 21:10:16 +0000
+Subject: Drop the automatics grouping option from tasklist.
+
+Not implemented yet, so avoid the confusion.
+---
+diff --git a/plugins/tasklist/tasklist-dialog.glade b/plugins/tasklist/tasklist-dialog.glade
+index a2e19a0..a779d52 100644
+--- a/plugins/tasklist/tasklist-dialog.glade
++++ b/plugins/tasklist/tasklist-dialog.glade
+@@ -349,10 +349,10 @@
+ <col id="0" translatable="yes">Never</col>
+ </row>
+ <row>
+- <col id="0" translatable="yes">When space is limited</col>
++ <col id="0" translatable="yes">Always</col>
+ </row>
+ <row>
+- <col id="0" translatable="yes">Always</col>
++ <col id="0" translatable="yes">When space is limited</col>
+ </row>
+ </data>
+ </object>
+diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
+index 72283ba..23cd967 100644
+--- a/plugins/tasklist/tasklist-widget.c
++++ b/plugins/tasklist/tasklist-widget.c
+@@ -307,7 +307,7 @@ xfce_tasklist_class_init (XfceTasklistClass *klass)
+ g_param_spec_uint ("grouping",
+ NULL, NULL,
+ XFCE_TASKLIST_GROUPING_MIN,
+- XFCE_TASKLIST_GROUPING_MAX,
++ XFCE_TASKLIST_GROUPING_MAX + 1 /* TODO drop this later */,
+ XFCE_TASKLIST_GROUPING_DEFAULT,
+ EXO_PARAM_READWRITE));
+
+@@ -765,10 +765,12 @@ xfce_tasklist_size_layout (XfceTasklist *tasklist,
+ n_buttons = tasklist->n_windows;
+ n_buttons_target = ((alloc->width / max_button_length) + 1) * rows;
+
++#if 0
+ if (tasklist->grouping == XFCE_TASKLIST_GROUPING_AUTO)
+ {
+ /* try creating group buttons */
+ }
++#endif
+
+ /* we now push the windows with the lowest score in the
+ * overflow menu */
+@@ -2918,9 +2920,11 @@ xfce_tasklist_group_button_child_destroyed (XfceTasklistChild *group_child,
+ }
+
+ if ((group_child->tasklist->grouping == XFCE_TASKLIST_GROUPING_ALWAYS
+- && n_children > 0)
++ && n_children > 0))
++#if 0
+ || (group_child->tasklist->grouping == XFCE_TASKLIST_GROUPING_AUTO
+ && n_children > 1))
++#endif
+ {
+ xfce_tasklist_group_button_child_visible_changed (group_child);
+ xfce_tasklist_group_button_name_changed (NULL, group_child);
+@@ -3148,6 +3152,10 @@ xfce_tasklist_set_grouping (XfceTasklist *tasklist,
+ {
+ panel_return_if_fail (XFCE_IS_TASKLIST (tasklist));
+
++ /* TODO avoid overflow, because we allows + 1 in the object */
++ if (grouping > XFCE_TASKLIST_GROUPING_MAX)
++ grouping = XFCE_TASKLIST_GROUPING_MAX;
++
+ if (tasklist->grouping != grouping)
+ {
+ tasklist->grouping = grouping;
+diff --git a/plugins/tasklist/tasklist-widget.h b/plugins/tasklist/tasklist-widget.h
+index c903260..c0574e4 100644
+--- a/plugins/tasklist/tasklist-widget.h
++++ b/plugins/tasklist/tasklist-widget.h
+@@ -40,12 +40,12 @@ typedef enum _XfceTasklistSortOrder XfceTasklistSortOrder;
+ enum _XfceTasklistGrouping
+ {
+ XFCE_TASKLIST_GROUPING_NEVER,
+- XFCE_TASKLIST_GROUPING_AUTO, /* when space is limited */
+ XFCE_TASKLIST_GROUPING_ALWAYS,
++ /*XFCE_TASKLIST_GROUPING_AUTO, *//* when space is limited */
+
+ XFCE_TASKLIST_GROUPING_MIN = XFCE_TASKLIST_GROUPING_NEVER,
+ XFCE_TASKLIST_GROUPING_MAX = XFCE_TASKLIST_GROUPING_ALWAYS,
+- XFCE_TASKLIST_GROUPING_DEFAULT = XFCE_TASKLIST_GROUPING_AUTO
++ XFCE_TASKLIST_GROUPING_DEFAULT = XFCE_TASKLIST_GROUPING_NEVER
+ };
+
+ enum _XfceTasklistSortOrder
+diff --git a/plugins/tasklist/tasklist.c b/plugins/tasklist/tasklist.c
+index d69c1b9..407a150 100644
+--- a/plugins/tasklist/tasklist.c
++++ b/plugins/tasklist/tasklist.c
+@@ -185,6 +185,7 @@ tasklist_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
+ GtkBuilder *builder;
+ GObject *dialog;
+ GObject *object;
++ GtkTreeIter iter;
+
+ /* setup the dialog */
+ PANEL_UTILS_LINK_4UI
+@@ -222,6 +223,11 @@ tasklist_plugin_configure_plugin (XfcePanelPlugin *panel_plugin)
+ gtk_widget_hide (GTK_WIDGET (object));
+ #endif
+
++ /* TODO: remove this if always group is supported */
++ object = gtk_builder_get_object (builder, "grouping-model");
++ if (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (object), &iter, NULL, 2))
++ gtk_list_store_remove (GTK_LIST_STORE (object), &iter);
++
+ gtk_widget_show (GTK_WIDGET (dialog));
+ }
+
+--
+cgit v0.8.3.4