After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 311861 - Support for only showing iconified windows
Support for only showing iconified windows
Status: RESOLVED DUPLICATE of bug 84411
Product: libwnck
Classification: Core
Component: general
2.10.x
Other Linux
: Normal enhancement
: ---
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-28 14:06 UTC by Loïc Minier
Modified: 2005-07-28 14:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Loïc Minier 2005-07-28 14:06:29 UTC
Anthony DeRobertis requested in Debian bug http://bugs.debian.org/288764 the
support for only showing iconified windows, which he says was in GNOME 1.4.

He proposed a patch, but agrees that it's not configurable enough to be accepted:
diff -rdbU3 libwnck/tasklist.c libwnck.new/tasklist.c
- --- ../libwnck-changes/libwnck/tasklist.c	2005-01-04 22:22:56.000000000 -0500
+++ libwnck/tasklist.c	2005-01-05 09:39:44.000000000 -0500
@@ -1032,6 +1032,20 @@
   return tasklist->priv->size_hints;
 }
   
+
+/*
+ * Determine if a window's tasklist button widget should be visible or not.
+*/
+static gboolean
+wnck_tasklist_show_widget (WnckTasklist *tasklist, WnckWindow *win)
+{
+  if ((wnck_window_get_state (win) ^ WNCK_WINDOW_STATE_HIDDEN) &
WNCK_WINDOW_STATE_HIDDEN)
+    return FALSE;
+  if ((wnck_window_get_state (win) & WNCK_WINDOW_STATE_SHADED))
+    return FALSE;
+  return TRUE;
+}
+  
 static void
 wnck_tasklist_size_allocate (GtkWidget      *widget,
                              GtkAllocation  *allocation)
@@ -1047,6 +1061,7 @@
   int n_rows;
   int n_cols;
   int n_grouped_buttons;
+  int n_hidden_buttons;
   int i;
   gboolean score_set;
   GList *ungrouped_class_groups;
@@ -1113,17 +1128,39 @@
 					   &n_cols, &n_rows);
     }
 
- -  /* Add all ungrouped windows to visible_tasks, and hide their class groups */
+  /* Add all ungrouped windows to visible_tasks unless they are iconified, and
hide their class groups */
   l = ungrouped_class_groups;
+  n_hidden_buttons = 0;
   while (l != NULL)
     {
+      GList *m;
       class_group_task = WNCK_TASK (l->data);
       
- -      visible_tasks = g_list_concat (visible_tasks, g_list_copy
(class_group_task->windows));
+      /*visible_tasks = g_list_concat (visible_tasks, g_list_copy
(class_group_task->windows));*/
+      for (m = class_group_task->windows; m != NULL; m = m->next)
+        {
+	  WnckTask *task = WNCK_TASK(m->data);
+	  if (wnck_tasklist_show_widget(tasklist, task->window))
+	    {
+	      visible_tasks = g_list_prepend(visible_tasks, task);
+	    }
+	  else
+	    {
+	      ++n_hidden_buttons;
+	      gtk_widget_set_child_visible (GTK_WIDGET (task->button), FALSE);
+	    }
+        }
+      
       gtk_widget_set_child_visible (GTK_WIDGET (class_group_task->button), FALSE);
       l = l->next;
     }
 
+    button_width = wnck_tasklist_layout (allocation,
+					 tasklist->priv->max_button_width,
+					 tasklist->priv->max_button_height,
+					 n_startup_sequences + n_windows - n_grouped_buttons - n_hidden_buttons,
+					 &n_cols, &n_rows);
+
   /* Add all startup sequences */
   visible_tasks = g_list_concat (visible_tasks, g_list_copy
(tasklist->priv->startup_sequences));

I'll request his participation in this discussion.

Bye,
Comment 1 Elijah Newren 2005-07-28 14:57:54 UTC
Yes, it existed in Gnome 1.4.  See comment 10 of bug 84411.

*** This bug has been marked as a duplicate of 84411 ***