[gnome-builder] Replaced language settings dialog with a GtkStack
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] Replaced language settings dialog with a GtkStack
- Date: Thu, 7 May 2015 08:54:57 +0000 (UTC)
commit 79afb3a4e5f5e86d04368d708d42e1617255046f
Author: Dimitris Zenios <dimitris zenios gmail com>
Date: Tue May 5 12:33:14 2015 +0300
Replaced language settings dialog with a GtkStack
https://bugzilla.gnome.org/show_bug.cgi?id=742309
data/ui/gb-preferences-page-editor.ui | 1 +
data/ui/gb-preferences-page-experimental.ui | 1 +
data/ui/gb-preferences-page-git.ui | 1 +
data/ui/gb-preferences-page-keybindings.ui | 1 +
data/ui/gb-preferences-page-language.ui | 66 ++++++++++++++---
data/ui/gb-preferences-window.ui | 9 +++
src/preferences/gb-preferences-page-language.c | 93 +++++++++++++++++++-----
src/preferences/gb-preferences-page.c | 88 +++++++++++++++++++++--
src/preferences/gb-preferences-page.h | 18 +++--
src/preferences/gb-preferences-window.c | 89 ++++++++++++++++++++---
10 files changed, 319 insertions(+), 48 deletions(-)
---
diff --git a/data/ui/gb-preferences-page-editor.ui b/data/ui/gb-preferences-page-editor.ui
index 104fceb..c1a3c23 100644
--- a/data/ui/gb-preferences-page-editor.ui
+++ b/data/ui/gb-preferences-page-editor.ui
@@ -2,6 +2,7 @@
<interface>
<!-- interface-requires gtk+ 3.8 -->
<template class="GbPreferencesPageEditor" parent="GbPreferencesPage">
+ <property name="title" translatable="yes">Editor</property>
<child>
<object class="GtkScrolledWindow">
<property name="min-content-height">500</property>
diff --git a/data/ui/gb-preferences-page-experimental.ui b/data/ui/gb-preferences-page-experimental.ui
index e03dfa5..d5addab 100644
--- a/data/ui/gb-preferences-page-experimental.ui
+++ b/data/ui/gb-preferences-page-experimental.ui
@@ -2,6 +2,7 @@
<interface>
<!-- interface-requires gtk+ 3.8 -->
<template class="GbPreferencesPageExperimental" parent="GbPreferencesPage">
+ <property name="title" translatable="yes">Experimental</property>
<child>
<object class="GtkBox">
<property name="visible">true</property>
diff --git a/data/ui/gb-preferences-page-git.ui b/data/ui/gb-preferences-page-git.ui
index 998fd53..4beba99 100644
--- a/data/ui/gb-preferences-page-git.ui
+++ b/data/ui/gb-preferences-page-git.ui
@@ -2,6 +2,7 @@
<interface>
<!-- interface-requires gtk+ 3.8 -->
<template class="GbPreferencesPageGit" parent="GbPreferencesPage">
+ <property name="title" translatable="yes">Git</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
diff --git a/data/ui/gb-preferences-page-keybindings.ui b/data/ui/gb-preferences-page-keybindings.ui
index 330e4ed..0cb9eb2 100644
--- a/data/ui/gb-preferences-page-keybindings.ui
+++ b/data/ui/gb-preferences-page-keybindings.ui
@@ -2,6 +2,7 @@
<interface>
<!-- interface-requires gtk+ 3.8 -->
<template class="GbPreferencesPageKeybindings" parent="GbPreferencesPage">
+ <property name="title" translatable="yes">Keybindings</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
diff --git a/data/ui/gb-preferences-page-language.ui b/data/ui/gb-preferences-page-language.ui
index 3791f40..f11e454 100644
--- a/data/ui/gb-preferences-page-language.ui
+++ b/data/ui/gb-preferences-page-language.ui
@@ -3,27 +3,73 @@
<!-- interface-requires gtk+ 3.8 -->
<template class="GbPreferencesPageLanguage" parent="GbPreferencesPage">
<property name="can-focus">False</property>
- <child>
+ <property name="title" translatable="yes">Language Settings</property>
+ <child internal-child="controls">
<object class="GtkBox">
- <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
+ <property name="visible">true</property>
+ <style>
+ <class name="linked"/>
+ </style>
+ <child>
+ <object class="GtkButton" id="back_button">
+ <property name="visible">false</property>
+ <style>
+ <class name="image-button"/>
+ <class name="dim-label"/>
+ <class name="flat"/>
+ </style>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="icon_name">go-previous-symbolic</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkStack" id="stack">
<property name="visible">True</property>
- <property name="can-focus">False</property>
+ <property name="expand">True</property>
+ <property name="visible-child">language_selection</property>
+ <property name="transition-type">GTK_STACK_TRANSITION_TYPE_CROSSFADE</property>
<child>
- <object class="GtkSearchEntry" id="search_entry">
+ <object class="GtkBox" id="language_selection">
+ <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
<property name="visible">True</property>
- <property name="can-focus">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkSearchEntry" id="search_entry">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="shadow-type">GTK_SHADOW_IN</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkListBox" id="language_list_box">
+ <property name="visible">True</property>
+ <property name="expand">True</property>
+ <property name="can-focus">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
<child>
- <object class="GtkScrolledWindow">
+ <object class="GtkScrolledWindow" id="language_settings">
<property name="visible">True</property>
- <property name="shadow-type">GTK_SHADOW_IN</property>
<property name="can-focus">False</property>
<child>
- <object class="GtkListBox" id="language_list_box">
+ <object class="GtkBox" id="language_settings_box">
+ <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
<property name="visible">True</property>
- <property name="expand">True</property>
- <property name="can-focus">True</property>
+ <property name="can-focus">False</property>
</object>
</child>
</object>
diff --git a/data/ui/gb-preferences-window.ui b/data/ui/gb-preferences-window.ui
index 36de408..c8bbd39 100644
--- a/data/ui/gb-preferences-window.ui
+++ b/data/ui/gb-preferences-window.ui
@@ -52,6 +52,15 @@
<property name="title" translatable="yes"></property>
<property name="show-close-button">True</property>
<property name="decoration_layout">:close</property>
+ <child>
+ <object class="GtkStack" id="controls_stack">
+ <property name="homogeneous">false</property>
+ <property name="visible">true</property>
+ </object>
+ <packing>
+ <property name="pack-type">end</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/src/preferences/gb-preferences-page-language.c b/src/preferences/gb-preferences-page-language.c
index 8803bfb..a281306 100644
--- a/src/preferences/gb-preferences-page-language.c
+++ b/src/preferences/gb-preferences-page-language.c
@@ -27,8 +27,13 @@
struct _GbPreferencesPageLanguagePrivate
{
+ GtkStack *stack;
GtkListBox *language_list_box;
GtkSearchEntry *search_entry;
+ GtkBox *language_selection;
+ GtkWidget *language_settings;
+ GtkBox *language_settings_box;
+ GtkButton *back_button;
};
G_DEFINE_TYPE_WITH_PRIVATE (GbPreferencesPageLanguage,
@@ -133,9 +138,6 @@ row_selected (GtkListBox *list_box,
GtkSourceLanguage *lang;
GbEditorSettingsWidget *widget;
const gchar *lang_id;
- GtkDialog *dialog;
- GtkWidget *toplevel;
- GtkWidget *content_area;
g_assert (GTK_IS_LIST_BOX (list_box));
g_assert (!row || GTK_IS_LIST_BOX_ROW (row));
@@ -150,26 +152,55 @@ row_selected (GtkListBox *list_box,
lang_id = gtk_source_language_get_id (lang);
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (list_box));
-
- dialog = g_object_new (GTK_TYPE_DIALOG,
- "transient-for", toplevel,
- "title", gtk_source_language_get_name (lang),
- "use-header-bar", TRUE,
- NULL);
-
- content_area = gtk_dialog_get_content_area (dialog);
widget = g_object_new (GB_TYPE_EDITOR_SETTINGS_WIDGET,
"border-width", 12,
"language", lang_id,
"visible", TRUE,
NULL);
- gtk_container_add (GTK_CONTAINER (content_area), GTK_WIDGET (widget));
+ gtk_container_add (GTK_CONTAINER (page->priv->language_settings_box), GTK_WIDGET (widget));
+ gtk_stack_set_visible_child (page->priv->stack,GTK_WIDGET (page->priv->language_settings));
+ gb_preferences_page_set_title (GB_PREFERENCES_PAGE (page), gtk_source_language_get_name (lang));
+}
+
+static void
+stack_notify_visible_child (GbPreferencesPageLanguage *page,
+ GParamSpec *pspec,
+ GtkStack *stack)
+{
+ GtkWidget *visible_child;
+
+ g_assert (GB_IS_PREFERENCES_PAGE_LANGUAGE (page));
+ g_assert (GTK_IS_STACK (stack));
- gtk_dialog_run (dialog);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ visible_child = gtk_stack_get_visible_child (stack);
+ if (visible_child == GTK_WIDGET (page->priv->language_selection))
+ {
+ GList *children;
+ GList *iter;
+
+ children = gtk_container_get_children (GTK_CONTAINER (page->priv->language_settings_box));
+ for(iter = children; iter != NULL; iter = g_list_next (iter))
+ gtk_widget_destroy (GTK_WIDGET (iter->data));
+ g_list_free (children);
- gtk_list_box_unselect_row (list_box, row);
+ gtk_list_box_unselect_all (page->priv->language_list_box);
+ gtk_widget_hide (GTK_WIDGET (page->priv->back_button));
+ gb_preferences_page_reset_title (GB_PREFERENCES_PAGE (page));
+ }
+ else if (visible_child == GTK_WIDGET (page->priv->language_settings))
+ {
+ gtk_widget_show (GTK_WIDGET (page->priv->back_button));
+ }
+}
+
+static void
+back_button_clicked_cb (GbPreferencesPageLanguage *page,
+ GtkButton *back_button)
+{
+ g_assert (GB_IS_PREFERENCES_PAGE_LANGUAGE (page));
+ g_assert (GTK_IS_BUTTON (back_button));
+
+ gtk_stack_set_visible_child (page->priv->stack, GTK_WIDGET (page->priv->language_selection));
}
static void
@@ -196,6 +227,20 @@ gb_preferences_page_language_constructed (GObject *object)
G_CALLBACK (row_selected),
page);
+ g_signal_connect_object (page->priv->back_button,
+ "clicked",
+ G_CALLBACK (back_button_clicked_cb),
+ page,
+ G_CONNECT_SWAPPED);
+
+ g_signal_connect_object (page->priv->stack,
+ "notify::visible-child",
+ G_CALLBACK (stack_notify_visible_child),
+ page,
+ G_CONNECT_SWAPPED);
+
+
+
manager = gtk_source_language_manager_get_default ();
lang_ids = gtk_source_language_manager_get_language_ids (manager);
@@ -242,13 +287,27 @@ gb_preferences_page_language_class_init (GbPreferencesPageLanguageClass *klass)
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/builder/ui/gb-preferences-page-language.ui");
-
+ gtk_widget_class_bind_template_child_private (widget_class,
+ GbPreferencesPageLanguage,
+ stack);
gtk_widget_class_bind_template_child_private (widget_class,
GbPreferencesPageLanguage,
language_list_box);
gtk_widget_class_bind_template_child_private (widget_class,
GbPreferencesPageLanguage,
search_entry);
+ gtk_widget_class_bind_template_child_private (widget_class,
+ GbPreferencesPageLanguage,
+ language_selection);
+ gtk_widget_class_bind_template_child_private (widget_class,
+ GbPreferencesPageLanguage,
+ language_settings);
+ gtk_widget_class_bind_template_child_private (widget_class,
+ GbPreferencesPageLanguage,
+ language_settings_box);
+ gtk_widget_class_bind_template_child_private (widget_class,
+ GbPreferencesPageLanguage,
+ back_button);
g_type_ensure (GB_TYPE_EDITOR_SETTINGS_WIDGET);
}
diff --git a/src/preferences/gb-preferences-page.c b/src/preferences/gb-preferences-page.c
index 5990c56..8c7b41b 100644
--- a/src/preferences/gb-preferences-page.c
+++ b/src/preferences/gb-preferences-page.c
@@ -28,11 +28,20 @@
struct _GbPreferencesPagePrivate
{
GHashTable *widgets;
+ GtkBox *controls;
gchar *title;
+ gchar *default_title;
};
-G_DEFINE_TYPE_WITH_PRIVATE (GbPreferencesPage, gb_preferences_page,
- GTK_TYPE_BIN)
+static void buildable_iface_init (GtkBuildableIface *iface);
+
+G_DEFINE_TYPE_EXTENDED (GbPreferencesPage,
+ gb_preferences_page,
+ GTK_TYPE_BIN,
+ 0,
+ G_ADD_PRIVATE (GbPreferencesPage)
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
+ buildable_iface_init))
enum {
PROP_0,
@@ -129,12 +138,21 @@ gb_preferences_page_set_keywords_for_widget (GbPreferencesPage *page,
va_end (args);
}
-const gchar *
-gb_preferences_page_get_title (GbPreferencesPage *page)
+/**
+ * gb_preferences_page_get_controls:
+ * @self: A #GbPreferencesPage.
+ *
+ * Gets the controls for the preferences page.
+ *
+ * Returns: (transfer none) (nullable): A #GtkWidget.
+ */
+GtkWidget *
+gb_preferences_page_get_controls (GbPreferencesPage *page)
{
+
g_return_val_if_fail (GB_IS_PREFERENCES_PAGE (page), NULL);
- return page->priv->title;
+ return GTK_WIDGET (page->priv->controls);
}
void
@@ -152,13 +170,41 @@ gb_preferences_page_set_title (GbPreferencesPage *page,
}
}
+void
+gb_preferences_page_reset_title (GbPreferencesPage *page)
+{
+ g_return_if_fail (GB_IS_PREFERENCES_PAGE (page));
+
+ gb_preferences_page_set_title (page, page->priv->default_title);
+}
+
+static const gchar *
+gb_preferences_page_get_title (GbPreferencesPage *page)
+{
+ g_return_val_if_fail (GB_IS_PREFERENCES_PAGE (page), NULL);
+
+ return page->priv->title;
+}
+
+static void
+gb_preferences_page_constructed (GObject *object)
+{
+ GbPreferencesPagePrivate *priv = GB_PREFERENCES_PAGE (object)->priv;
+
+ g_object_get (object, "title", &priv->default_title, NULL);
+
+ G_OBJECT_CLASS (gb_preferences_page_parent_class)->constructed (object);
+}
+
static void
gb_preferences_page_finalize (GObject *object)
{
GbPreferencesPagePrivate *priv = GB_PREFERENCES_PAGE (object)->priv;
g_clear_pointer (&priv->title, g_free);
+ g_clear_pointer (&priv->default_title, g_free);
g_clear_pointer (&priv->widgets, g_hash_table_unref);
+ g_clear_object (&priv->controls);
G_OBJECT_CLASS (gb_preferences_page_parent_class)->finalize (object);
}
@@ -206,6 +252,7 @@ gb_preferences_page_class_init (GbPreferencesPageClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->constructed = gb_preferences_page_constructed;
object_class->finalize = gb_preferences_page_finalize;
object_class->get_property = gb_preferences_page_get_property;
object_class->set_property = gb_preferences_page_set_property;
@@ -226,7 +273,38 @@ gb_preferences_page_class_init (GbPreferencesPageClass *klass)
static void
gb_preferences_page_init (GbPreferencesPage *self)
{
+ GtkBox *controls;
+
self->priv = gb_preferences_page_get_instance_private (self);
self->priv->widgets = g_hash_table_new_full (g_direct_hash, g_direct_equal,
NULL, NULL);
+
+ controls = g_object_new (GTK_TYPE_BOX,
+ "orientation", GTK_ORIENTATION_HORIZONTAL,
+ "visible", TRUE,
+ NULL);
+ self->priv->controls = g_object_ref_sink (controls);
+}
+
+static GObject *
+gb_preferences_page_get_internal_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *childname)
+{
+ GbPreferencesPage *self = (GbPreferencesPage *)buildable;
+ GbPreferencesPagePrivate *priv = gb_preferences_page_get_instance_private (self);
+
+ g_assert (GB_IS_PREFERENCES_PAGE (self));
+
+ if (g_strcmp0 (childname, "controls") == 0)
+ return G_OBJECT (priv->controls);
+
+ return NULL;
+}
+
+
+static void
+buildable_iface_init (GtkBuildableIface *iface)
+{
+ iface->get_internal_child = gb_preferences_page_get_internal_child;
}
diff --git a/src/preferences/gb-preferences-page.h b/src/preferences/gb-preferences-page.h
index 51b231c..cfcb41a 100644
--- a/src/preferences/gb-preferences-page.h
+++ b/src/preferences/gb-preferences-page.h
@@ -50,13 +50,17 @@ struct _GbPreferencesPageClass
GtkBinClass parent;
};
-GType gb_preferences_page_get_type (void);
-guint gb_preferences_page_set_keywords (GbPreferencesPage *page,
- const gchar * const *keywords);
-void gb_preferences_page_set_keywords_for_widget (GbPreferencesPage *page,
- const gchar *keywords,
- gpointer first_widget,
- ...) G_GNUC_NULL_TERMINATED;
+GType gb_preferences_page_get_type (void);
+guint gb_preferences_page_set_keywords (GbPreferencesPage *page,
+ const gchar * const *keywords);
+void gb_preferences_page_set_keywords_for_widget (GbPreferencesPage *page,
+ const gchar *keywords,
+ gpointer first_widget,
+ ...) G_GNUC_NULL_TERMINATED;
+void gb_preferences_page_set_title (GbPreferencesPage *page,
+ const gchar *title);
+void gb_preferences_page_reset_title (GbPreferencesPage *page);
+GtkWidget *gb_preferences_page_get_controls (GbPreferencesPage *page);
G_END_DECLS
diff --git a/src/preferences/gb-preferences-window.c b/src/preferences/gb-preferences-window.c
index 962c2ea..fb94538 100644
--- a/src/preferences/gb-preferences-window.c
+++ b/src/preferences/gb-preferences-window.c
@@ -39,6 +39,11 @@ struct _GbPreferencesWindow
GtkSearchEntry *search_entry;
EggSearchBar *search_bar;
GtkStack *stack;
+ GtkStack *controls_stack;
+ GtkWidget *visible_child;
+ GBinding *title_binding;
+
+ guint destroyed : 1;
};
G_DEFINE_TYPE (GbPreferencesWindow, gb_preferences_window, GTK_TYPE_WINDOW)
@@ -62,20 +67,44 @@ gb_preferences_window_section_changed (GtkStack *stack,
GbPreferencesWindow *self)
{
GtkWidget *visible_child;
- gchar *title = NULL;
g_return_if_fail (GTK_IS_STACK (stack));
g_return_if_fail (GB_IS_PREFERENCES_WINDOW (self));
- visible_child = gtk_stack_get_visible_child (stack);
- if (visible_child)
- gtk_container_child_get (GTK_CONTAINER (stack), visible_child,
- "title", &title,
- NULL);
-
- gtk_header_bar_set_title (self->right_header_bar, title);
+ if (self->destroyed)
+ return;
- g_free (title);
+ visible_child = gtk_stack_get_visible_child (stack);
+ if (self->visible_child != visible_child)
+ {
+ if (self->visible_child)
+ {
+ if (self->title_binding)
+ g_binding_unbind (self->title_binding);
+ ide_clear_weak_pointer (&self->title_binding);
+ gtk_header_bar_set_title (self->right_header_bar, NULL);
+ ide_clear_weak_pointer (&self->visible_child);
+ gtk_widget_hide (GTK_WIDGET (self->controls_stack));
+ }
+ if (visible_child)
+ {
+ GtkWidget *controls;
+ GBinding *binding;
+
+ ide_set_weak_pointer (&self->visible_child, visible_child);
+ binding = g_object_bind_property (visible_child, "title",
+ self->right_header_bar, "title",
+ G_BINDING_SYNC_CREATE);
+ ide_set_weak_pointer (&self->title_binding, binding);
+
+ controls = gb_preferences_page_get_controls (GB_PREFERENCES_PAGE (visible_child));
+ if (controls)
+ {
+ gtk_stack_set_visible_child (self->controls_stack, controls);
+ gtk_widget_show (GTK_WIDGET (self->controls_stack));
+ }
+ }
+ }
}
static void
@@ -138,6 +167,17 @@ gb_preferences_window_key_press_event (GtkWidget *widget,
}
static void
+gb_preferences_window_finalize (GObject *object)
+{
+ GbPreferencesWindow *self = (GbPreferencesWindow *)object;
+
+ ide_clear_weak_pointer (&self->title_binding);
+ ide_clear_weak_pointer (&self->visible_child);
+
+ G_OBJECT_CLASS (gb_preferences_window_parent_class)->finalize (object);
+}
+
+static void
gb_preferences_window_constructed (GObject *object)
{
GbPreferencesWindow *self = (GbPreferencesWindow *)object;
@@ -158,13 +198,27 @@ gb_preferences_window_constructed (GObject *object)
}
static void
+gb_preferences_window_destroy (GtkWidget *widget)
+{
+ GbPreferencesWindow *self = (GbPreferencesWindow *)widget;
+
+ g_return_if_fail (GB_IS_PREFERENCES_WINDOW (self));
+
+ self->destroyed = TRUE;
+
+ GTK_WIDGET_CLASS (gb_preferences_window_parent_class)->destroy (widget);
+}
+
+static void
gb_preferences_window_class_init (GbPreferencesWindowClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->constructed = gb_preferences_window_constructed;
+ object_class->finalize = gb_preferences_window_finalize;
+ widget_class->destroy = gb_preferences_window_destroy;
widget_class->key_press_event = gb_preferences_window_key_press_event;
gSignals [CLOSE] =
@@ -182,6 +236,7 @@ gb_preferences_window_class_init (GbPreferencesWindowClass *klass)
GB_WIDGET_CLASS_BIND (widget_class, GbPreferencesWindow, search_bar);
GB_WIDGET_CLASS_BIND (widget_class, GbPreferencesWindow, search_entry);
GB_WIDGET_CLASS_BIND (widget_class, GbPreferencesWindow, stack);
+ GB_WIDGET_CLASS_BIND (widget_class, GbPreferencesWindow, controls_stack);
g_type_ensure (EGG_TYPE_SEARCH_BAR);
g_type_ensure (GB_TYPE_PREFERENCES_PAGE_EDITOR);
@@ -194,6 +249,9 @@ gb_preferences_window_class_init (GbPreferencesWindowClass *klass)
static void
gb_preferences_window_init (GbPreferencesWindow *self)
{
+ GList *pages;
+ GList *iter;
+ GtkWidget *controls;
GtkAccelGroup *accel_group;
gtk_widget_init_template (GTK_WIDGET (self));
@@ -203,4 +261,17 @@ gb_preferences_window_init (GbPreferencesWindow *self)
accel_group, GDK_KEY_f, GDK_CONTROL_MASK, 0);
gtk_window_add_accel_group (GTK_WINDOW (self), accel_group);
g_clear_object (&accel_group);
+
+ pages = gtk_container_get_children (GTK_CONTAINER (self->stack));
+
+ for (iter = pages; iter; iter = iter->next)
+ {
+ GbPreferencesPage *page = GB_PREFERENCES_PAGE (iter->data);
+
+ controls = gb_preferences_page_get_controls (page);
+ if (controls)
+ gtk_container_add (GTK_CONTAINER (self->controls_stack), controls);
+ }
+
+ g_list_free (pages);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]