[gnome-control-center] shell: Move helper functions



commit 43b53020cac5ca0c9ef2e1dfcf30ba9c6b49cdea
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 89a4bc9..c156a14 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -109,6 +109,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,
@@ -203,36 +233,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]