[gnome-control-center] shell: Make the WM to be aware of the g-c-c panel content



commit a5d897dae01b1158c3c8d75a1c4d35463d1da530
Author: Marco Trevisan <mail 3v1n0 net>
Date:   Mon Jan 23 15:09:46 2012 +0000

    shell: Make the WM to be aware of the g-c-c panel content
    
    Window managers such as unity need to know what panel
    gnome-control-center is currently showing. Changing the window
    role with the current panel ID is the best way to set a
    locale-independent value.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668504

 shell/gnome-control-center.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index c4cabda..b1c66b3 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -175,6 +175,7 @@ activate_panel (GnomeControlCenter *shell,
 
           /* set the title of the window */
           icon_name = get_icon_name_from_g_icon (gicon);
+          gtk_window_set_role (GTK_WINDOW (priv->window), id);
           gtk_window_set_title (GTK_WINDOW (priv->window), name);
           gtk_window_set_default_icon_name (icon_name);
           gtk_window_set_icon_name (GTK_WINDOW (priv->window), icon_name);
@@ -234,6 +235,7 @@ shell_show_overview_page (GnomeControlCenterPrivate *priv)
   gtk_lock_button_set_permission (GTK_LOCK_BUTTON (priv->lock_button), NULL);
 
   /* reset window title and icon */
+  gtk_window_set_role (GTK_WINDOW (priv->window), NULL);
   gtk_window_set_title (GTK_WINDOW (priv->window), priv->default_window_title);
   gtk_window_set_default_icon_name (priv->default_window_icon);
   gtk_window_set_icon_name (GTK_WINDOW (priv->window),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]