[gnome-control-center] shell: Rename current_panel to current_panel_box



commit ab435aa9e18f550e6926e06ab08e71282a9d442b
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Sep 20 20:51:14 2012 +0200

    shell: Rename current_panel to current_panel_box
    
    So that we can use current_panel for the current panel, not
    for the container parent of the panel.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=684490

 shell/gnome-control-center.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index b04a069..5321471 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -68,7 +68,7 @@ struct _GnomeControlCenterPrivate
   GtkWidget  *main_vbox;
   GtkWidget  *scrolled_window;
   GtkWidget  *search_scrolled;
-  GtkWidget  *current_panel;
+  GtkWidget  *current_panel_box;
   GtkWidget  *window;
   GtkWidget  *search_entry;
   GtkWidget  *lock_button;
@@ -244,7 +244,7 @@ activate_panel (GnomeControlCenter *shell,
   gtk_window_set_default_icon_name (icon_name);
   gtk_window_set_icon_name (GTK_WINDOW (priv->window), icon_name);
 
-  priv->current_panel = box;
+  priv->current_panel_box = box;
 
   return TRUE;
 }
@@ -273,9 +273,9 @@ shell_show_overview_page (GnomeControlCenter *center)
 
   notebook_select_page (priv->notebook, priv->scrolled_window);
 
-  if (priv->current_panel)
-    notebook_remove_page (priv->notebook, priv->current_panel);
-  priv->current_panel = NULL;
+  if (priv->current_panel_box)
+    notebook_remove_page (priv->notebook, priv->current_panel_box);
+  priv->current_panel_box = NULL;
 
   /* clear the search text */
   g_free (priv->filter_string);
@@ -1004,8 +1004,9 @@ _shell_set_active_panel_from_id (CcShell      *shell,
   else if (activate_panel (GNOME_CONTROL_CENTER (shell), start_id, argv, desktop,
                            name, gicon) == FALSE)
     {
-      old_panel = priv->current_panel;
-      priv->current_panel = NULL;
+      /* Failed to activate the panel for some reason */
+      old_panel = priv->current_panel_box;
+      priv->current_panel_box = NULL;
       notebook_select_page (priv->notebook, priv->scrolled_window);
       if (old_panel)
         notebook_remove_page (priv->notebook, old_panel);



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