shell: Make sure the "active-panel" property is updated

The (currently unused) cc_shell_get_active_panel() method is useless
unless "active-panel" is actually updated correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=675471
This commit is contained in:
Florian Müllner 2012-05-08 18:45:25 +02:00
parent ce8e1208bc
commit 78717031db
2 changed files with 3 additions and 1 deletions

View file

@ -165,7 +165,6 @@ cc_shell_set_active_panel (CcShell *shell,
if (panel)
{
shell->priv->active_panel = g_object_ref (panel);
g_object_set (G_OBJECT (panel), "shell", shell, NULL);
}
g_object_notify (G_OBJECT (shell), "active-panel");
}

View file

@ -158,6 +158,7 @@ activate_panel (GnomeControlCenter *shell,
/* create the panel plugin */
panel = g_object_new (panel_type, "shell", shell, "argv", argv, NULL);
cc_shell_set_active_panel (CC_SHELL (shell), CC_PANEL (panel));
gtk_widget_show (panel);
gtk_lock_button_set_permission (GTK_LOCK_BUTTON (priv->lock_button),
@ -231,6 +232,8 @@ shell_show_overview_page (GnomeControlCenter *center)
gtk_window_set_icon_name (GTK_WINDOW (priv->window),
priv->default_window_icon);
cc_shell_set_active_panel (CC_SHELL (center), NULL);
/* clear any custom widgets */
_shell_remove_all_custom_widgets (priv);
}