summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2012-04-30 18:03:50 +0100
committerBastien Nocera <hadess@hadess.net>2012-05-09 16:08:16 +0100
commit43b53020cac5ca0c9ef2e1dfcf30ba9c6b49cdea (patch)
tree02fbc222272159f5f93d1257a5e9c6458b472b99
parente01e33e76e777142db01fa220c789779fd569256 (diff)
downloadgnome-control-center-43b53020cac5ca0c9ef2e1dfcf30ba9c6b49cdea.tar.gz
shell: Move helper functions
-rw-r--r--shell/gnome-control-center.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 89a4bc92f..c156a1455 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),