aboutsummaryrefslogtreecommitdiffstats
path: root/main/xfce4-panel/drop-the-automatics-grouping.patch
blob: 61d449794e083a51f4c0528cbdb8776c048f5255 (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
117
118
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