[gnome-control-center/wip/animated-notebook: 6/9] shell: Move helper functions



commit e8ce476b839496105fcc169bec6940945cb4de65
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Apr 30 18:03:50 2012 +0100

    shell: Move helper functions

 shell/gnome-control-center.c |   60 +++++++++++++++++++++---------------------
 1 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 699b489..bcd6280 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -104,6 +104,36 @@ get_icon_name_from_g_icon (GIcon *gicon)
   return NULL;
 }
 
+static void
+shell_set_current_notebook_widget (GtkNotebook *notebook,
+				   GtkWidget   *child)
+{
+  int num_pages, i;
+
+  num_pages = gtk_notebook_get_n_pages (notebook);
+  for (i = 0; i < num_pages; i++)
+    {
+      GtkWidget *widget;
+
+      widget = gtk_notebook_get_nth_page (notebook, i);
+      if (widget == child)
+        {
+          gtk_notebook_set_current_page (notebook, i);
+          return;
+	}
+    }
+}
+
+static GtkWidget *
+shell_get_current_notebook_widget (GtkNotebook *notebook)
+{
+  int current_page;
+
+  current_page = gtk_notebook_get_current_page (notebook);
+  g_assert (current_page >= 0);
+  return gtk_notebook_get_nth_page (notebook, current_page);
+}
+
 static gboolean
 activate_panel (GnomeControlCenter *shell,
                 const gchar        *id,
@@ -213,36 +243,6 @@ _shell_remove_all_custom_widgets (GnomeControlCenterPrivate *priv)
 }
 
 static void
-shell_set_current_notebook_widget (GtkNotebook *notebook,
-				   GtkWidget   *child)
-{
-  int num_pages, i;
-
-  num_pages = gtk_notebook_get_n_pages (notebook);
-  for (i = 0; i < num_pages; i++)
-    {
-      GtkWidget *widget;
-
-      widget = gtk_notebook_get_nth_page (notebook, i);
-      if (widget == child)
-        {
-          gtk_notebook_set_current_page (notebook, i);
-          return;
-	}
-    }
-}
-
-static GtkWidget *
-shell_get_current_notebook_widget (GtkNotebook *notebook)
-{
-  int current_page;
-
-  current_page = gtk_notebook_get_current_page (notebook);
-  g_assert (current_page >= 0);
-  return gtk_notebook_get_nth_page (notebook, current_page);
-}
-
-static void
 shell_show_overview_page (GnomeControlCenterPrivate *priv)
 {
   shell_set_current_notebook_widget (GTK_NOTEBOOK (priv->notebook),



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