[gnome-control-center/wip/animated-notebook] shell: Update control-center and test for new API



commit 8196f4621f136d0c580f981688e8f989336662d5
Author: Bastien Nocera <hadess hadess net>
Date:   Tue May 1 14:14:38 2012 +0100

    shell: Update control-center and test for new API

 shell/gnome-control-center.c |   10 +++++-----
 shell/test-notebook.c        |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 9ff5d12..7e999ec 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -163,7 +163,7 @@ activate_panel (GnomeControlCenter *shell,
 
   gtk_container_add (GTK_CONTAINER (box), panel);
 
-  gtk_container_add (GTK_CONTAINER (priv->notebook), box);
+  cc_notebook_add (CC_NOTEBOOK (priv->notebook), box);
 
   /* switch to the new panel */
   gtk_widget_show (box);
@@ -207,7 +207,7 @@ _shell_remove_all_custom_widgets (GnomeControlCenterPrivate *priv)
   for (i = 0; i < priv->custom_widgets->len; i++)
     {
         widget = g_ptr_array_index (priv->custom_widgets, i);
-        gtk_container_remove (GTK_CONTAINER (box), widget);
+        cc_notebook_remove (CC_NOTEBOOK (box), widget);
     }
   g_ptr_array_set_size (priv->custom_widgets, 0);
 }
@@ -219,7 +219,7 @@ shell_show_overview_page (GnomeControlCenterPrivate *priv)
 			   priv->scrolled_window);
 
   if (priv->current_panel)
-    gtk_container_remove (GTK_CONTAINER (priv->notebook), priv->current_panel);
+    cc_notebook_remove (CC_NOTEBOOK (priv->notebook), priv->current_panel);
   priv->current_panel = NULL;
 
   /* clear the search text */
@@ -897,7 +897,7 @@ _shell_set_active_panel_from_id (CcShell      *shell,
 
   if (!name)
     {
-      gtk_container_remove (GTK_CONTAINER (priv->notebook), priv->current_panel);
+      cc_notebook_remove (CC_NOTEBOOK (priv->notebook), priv->current_panel);
       priv->current_panel = NULL;
       cc_notebook_set_current (CC_NOTEBOOK (priv->notebook),
 			       priv->scrolled_window);
@@ -919,7 +919,7 @@ _shell_set_active_panel_from_id (CcShell      *shell,
         }
 
       if (old_panel)
-        gtk_container_remove (GTK_CONTAINER (priv->notebook), old_panel);
+        cc_notebook_remove (CC_NOTEBOOK (priv->notebook), old_panel);
 
       g_free (name);
       g_free (desktop);
diff --git a/shell/test-notebook.c b/shell/test-notebook.c
index aac5b80..611c8a4 100644
--- a/shell/test-notebook.c
+++ b/shell/test-notebook.c
@@ -18,8 +18,8 @@ int main (int argc, char **argv)
 	notebook = cc_notebook_new ();
 	gtk_container_add (GTK_CONTAINER (window), notebook);
 
-	gtk_container_add (GTK_CONTAINER (notebook), gtk_label_new ("fhdkhfjksdhkfjsdhk"));
-	gtk_container_add (GTK_CONTAINER (notebook), gtk_label_new ("fhdkhfjksdhkfjsdhk2"));
+	cc_notebook_add (CC_NOTEBOOK (notebook), gtk_label_new ("fhdkhfjksdhkfjsdhk"));
+	cc_notebook_add (CC_NOTEBOOK (notebook), gtk_label_new ("fhdkhfjksdhkfjsdhk2"));
 
 	gtk_widget_show_all (window);
 	gtk_main ();



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