? mkinstalldirs
Index: libwnck/tasklist.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/tasklist.c,v
retrieving revision 1.57
diff -p -u -r1.57 tasklist.c
--- libwnck/tasklist.c	23 Jul 2004 07:59:44 -0000	1.57
+++ libwnck/tasklist.c	24 Jul 2004 21:57:43 -0000
@@ -183,7 +183,7 @@ static WnckTask *wnck_task_new_from_star
                                                       SnStartupSequence *sequence);
 #endif
 
-static char      *wnck_task_get_text (WnckTask *task);
+static char      *wnck_task_get_text (WnckTask *task, gboolean markup);
 static GdkPixbuf *wnck_task_get_icon (WnckTask *task);
 static gint       wnck_task_compare  (gconstpointer  a,
 				      gconstpointer  b);
@@ -1876,7 +1876,7 @@ wnck_task_popup_menu (WnckTask *task,
     {
       win_task = WNCK_TASK (l->data);
       
-      text = wnck_task_get_text (win_task);
+      text = wnck_task_get_text (win_task, FALSE);
       menu_item = gtk_image_menu_item_new_with_label (text);
       g_free (text);
       
@@ -1947,7 +1947,7 @@ wnck_task_button_toggled (GtkButton *but
 }
 
 static char *
-wnck_task_get_text (WnckTask *task)
+wnck_task_get_text (WnckTask *task, gboolean markup)
 {
   WnckWindowState state;
   const char *name;
@@ -1956,25 +1956,57 @@ wnck_task_get_text (WnckTask *task)
     {
     case WNCK_TASK_CLASS_GROUP:
       name = wnck_class_group_get_name (task->class_group);
-      if (name[0] != 0)
-	return g_strdup_printf ("%s (%d)",
-				name,
-				g_list_length (task->windows));
+
+      if (markup)
+	{
+	  if (name[0] != 0)
+	    return g_markup_printf_escaped ("%s (%d)",
+					    name,
+					    g_list_length (task->windows));
+	  else
+	    return g_markup_printf_escaped ("(%d)",
+					    g_list_length (task->windows));
+	}
       else
-	return g_strdup_printf ("(%d)",
-				g_list_length (task->windows));
+	{
+	  if (name[0] != 0)
+	    return g_strdup_printf ("%s (%d)",
+				    name,
+				    g_list_length (task->windows));
+	  else
+	    return g_strdup_printf ("(%d)",
+				    g_list_length (task->windows));
+	}
 
     case WNCK_TASK_WINDOW:
       state = wnck_window_get_state (task->window);
       name = wnck_window_get_name (task->window);
-      
-      if (state & WNCK_WINDOW_STATE_SHADED)
-	return g_strdup_printf ("=%s=", name);
-      else if (state & WNCK_WINDOW_STATE_MINIMIZED)
-	return g_strdup_printf ("[%s]", name);
+
+      if (markup)
+	{
+	  if (state & WNCK_WINDOW_STATE_DEMANDS_ATTENTION & WNCK_WINDOW_STATE_SHADED)
+	    return g_markup_printf_escaped ("<b>=%s=</b>", name);
+	  else if (state & WNCK_WINDOW_STATE_SHADED)
+	    return g_markup_printf_escaped ("=%s=", name);
+	  else if (state & WNCK_WINDOW_STATE_DEMANDS_ATTENTION & WNCK_WINDOW_STATE_MINIMIZED)
+	    return g_markup_printf_escaped ("<b>[%s]</b>", name);
+	  else if (state & WNCK_WINDOW_STATE_DEMANDS_ATTENTION)
+	    return g_markup_printf_escaped ("<b>%s</b>", name);
+	  else if (state & WNCK_WINDOW_STATE_MINIMIZED)
+	    return g_markup_printf_escaped ("[%s]", name);
+	  else
+	    return g_markup_printf_escaped (name);
+	}
       else
-	return g_strdup (name);
-      break;
+	{
+	  if (state & WNCK_WINDOW_STATE_SHADED)
+	    return g_strdup_printf ("=%s=", name);
+	  else if (state & WNCK_WINDOW_STATE_MINIMIZED)
+	    return g_strdup_printf ("[%s]", name);
+	  else
+	    return g_strdup (name);
+	  break;
+	}
 
     case WNCK_TASK_STARTUP_SEQUENCE:
 #ifdef HAVE_STARTUP_NOTIFICATION
@@ -1984,7 +2016,10 @@ wnck_task_get_text (WnckTask *task)
       if (name == NULL)
         name = sn_startup_sequence_get_binary_name (task->startup_sequence);
       
-      return g_strdup (name);
+      if (markup)
+	return g_markup_printf_escaped (name);
+      else
+	return g_strdup (name);
 #else
       return NULL;
 #endif
@@ -2137,6 +2172,7 @@ static void
 wnck_task_update_visible_state (WnckTask *task)
 {
   GdkPixbuf *pixbuf;
+  char *markup_text;
   char *text;
 
   pixbuf = wnck_task_get_icon (task);
@@ -2145,13 +2181,18 @@ wnck_task_update_visible_state (WnckTask
   if (pixbuf)
     g_object_unref (pixbuf);
 
-  text = wnck_task_get_text (task);
+  markup_text = wnck_task_get_text (task, TRUE);
+  text = wnck_task_get_text (task, FALSE);
   if (text != NULL)
     {
-      gtk_label_set_text (GTK_LABEL (task->label), text);
       gtk_tooltips_set_tip (task->tasklist->priv->tooltips, task->button, text, NULL);
       g_free (text);
     }
+  if (markup_text != NULL)
+    {
+      gtk_label_set_markup (GTK_LABEL (task->label), markup_text);
+      g_free (markup_text);
+    }
 
   gtk_widget_queue_resize (GTK_WIDGET (task->tasklist));
 }
@@ -2171,7 +2212,8 @@ wnck_task_state_changed (WnckWindow     
       return;
     }
   
-  if (changed_mask & WNCK_WINDOW_STATE_MINIMIZED)
+  if (changed_mask & (WNCK_WINDOW_STATE_MINIMIZED | 
+		      WNCK_WINDOW_STATE_DEMANDS_ATTENTION))
     {
       WnckTask *win_task;
 
@@ -2341,6 +2383,7 @@ wnck_task_create_widgets (WnckTask *task
   GtkWidget *table;
   GdkPixbuf *pixbuf;
   char *text;
+  char *markup_text;
   static GQuark disable_sound_quark = 0;
   
   if (!disable_sound_quark)
@@ -2374,8 +2417,9 @@ wnck_task_create_widgets (WnckTask *task
   
   gtk_widget_show (task->image);
 
-  text = wnck_task_get_text (task);
-  task->label = gtk_label_new (text);
+  markup_text = wnck_task_get_text (task, TRUE);
+  task->label = gtk_label_new (NULL);
+  gtk_label_set_markup (GTK_LABEL (task->label), markup_text);
   gtk_widget_show (task->label);
 
   gtk_table_attach (GTK_TABLE (table),
@@ -2394,7 +2438,9 @@ wnck_task_create_widgets (WnckTask *task
   gtk_container_add (GTK_CONTAINER (task->button), table);
   gtk_widget_show (table);
   
+  text = wnck_task_get_text (task, FALSE);
   gtk_tooltips_set_tip (task->tasklist->priv->tooltips, task->button, text, NULL);
+  g_free (markup_text);
   g_free (text);
   
   /* Set up signals */
Index: libwnck/window.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/window.c,v
retrieving revision 1.43
diff -p -u -r1.43 window.c
--- libwnck/window.c	21 Jun 2004 16:48:12 -0000	1.43
+++ libwnck/window.c	24 Jul 2004 21:57:47 -0000
@@ -46,7 +46,8 @@ static GHashTable *window_hash = NULL;
     ((window)->priv->skip_taskbar        << 5) |        \
     ((window)->priv->is_sticky           << 6) |        \
     ((window)->priv->is_hidden           << 7) |        \
-    ((window)->priv->is_fullscreen       << 8) )
+    ((window)->priv->is_fullscreen       << 8) |        \
+    ((window)->priv->demands_attention   << 9) )
 
 struct _WnckWindowPrivate
 {
@@ -97,6 +98,7 @@ struct _WnckWindowPrivate
   guint is_sticky : 1;
   guint is_hidden : 1;
   guint is_fullscreen : 1;
+  guint demands_attention : 1;
 
   /* _NET_WM_STATE_HIDDEN doesn't map directly into an
    * externally-visible state (it determines the WM_STATE
@@ -583,6 +585,25 @@ wnck_window_is_minimized (WnckWindow *wi
   return window->priv->is_minimized;
 }
 
+/**
+ * wnck_window_demands_attention:
+ * @window: a #WnckWindow
+ *
+ * If the window is has the demands attention state set returns
+ * %TRUE. This state may change anytime a state_changed signal gets
+ * emitted.
+ *
+ * Return value: %TRUE if window is minimized
+ **/
+gboolean
+wnck_window_demands_attention (WnckWindow *window)
+{
+  g_return_val_if_fail (WNCK_IS_WINDOW (window), FALSE);
+
+  return window->priv->demands_attention;
+}
+
+
 gboolean
 wnck_window_is_maximized_horizontally (WnckWindow *window)
 {
@@ -1541,6 +1562,7 @@ update_state (WnckWindow *window)
       window->priv->skip_taskbar = FALSE;
       window->priv->skip_pager = FALSE;
       window->priv->net_wm_state_hidden = FALSE;
+      window->priv->demands_attention = FALSE;
       
       atoms = NULL;
       n_atoms = 0;
@@ -1567,6 +1589,8 @@ update_state (WnckWindow *window)
             window->priv->skip_taskbar = TRUE;
           else if (atoms[i] == _wnck_atom_get ("_NET_WM_STATE_SKIP_PAGER"))
             window->priv->skip_pager = TRUE;
+          else if (atoms[i] == _wnck_atom_get ("_NET_WM_STATE_DEMANDS_ATTENTION"))
+            window->priv->demands_attention = TRUE;
 
           ++i;
         }
Index: libwnck/window.h
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/window.h,v
retrieving revision 1.23
diff -p -u -r1.23 window.h
--- libwnck/window.h	21 Jun 2004 16:48:12 -0000	1.23
+++ libwnck/window.h	24 Jul 2004 21:57:47 -0000
@@ -42,7 +42,8 @@ typedef enum
   WNCK_WINDOW_STATE_SKIP_TASKLIST          = 1 << 5,
   WNCK_WINDOW_STATE_STICKY                 = 1 << 6,
   WNCK_WINDOW_STATE_HIDDEN                 = 1 << 7,
-  WNCK_WINDOW_STATE_FULLSCREEN             = 1 << 8
+  WNCK_WINDOW_STATE_FULLSCREEN             = 1 << 8,
+  WNCK_WINDOW_STATE_DEMANDS_ATTENTION      = 1 << 9
 } WnckWindowState;
 
 typedef enum
@@ -153,6 +154,7 @@ gboolean wnck_window_is_shaded          
 gboolean wnck_window_is_skip_pager             (WnckWindow *window);
 gboolean wnck_window_is_skip_tasklist          (WnckWindow *window);
 gboolean wnck_window_is_sticky                 (WnckWindow *window);
+gboolean wnck_window_demands_attention         (WnckWindow *window);
 
 void wnck_window_set_skip_pager    (WnckWindow *window,
                                     gboolean skip);
Index: libwnck/wnck-enum-types.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/wnck-enum-types.c,v
retrieving revision 1.2
diff -p -u -r1.2 wnck-enum-types.c
--- libwnck/wnck-enum-types.c	18 Oct 2001 19:32:39 -0000	1.2
+++ libwnck/wnck-enum-types.c	24 Jul 2004 21:57:47 -0000
@@ -17,6 +17,7 @@ wnck_window_state_get_type (void)
       { WNCK_WINDOW_STATE_SKIP_PAGER, "WNCK_WINDOW_STATE_SKIP_PAGER", "skip-pager" },
       { WNCK_WINDOW_STATE_SKIP_TASKLIST, "WNCK_WINDOW_STATE_SKIP_TASKLIST", "skip-tasklist" },
       { WNCK_WINDOW_STATE_STICKY, "WNCK_WINDOW_STATE_STICKY", "sticky" },
+      { WNCK_WINDOW_STATE_DEMANDS_ATTENTION, "WNCK_WINDOW_STATE_DEMANDS_ATTENTION", "demands-attention" },
       { 0, NULL, NULL }
     };
     etype = g_flags_register_static ("WnckWindowState", values);
