[gnome-builder] prefs: add style selector to preferences.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] prefs: add style selector to preferences.
- Date: Thu, 16 Oct 2014 21:38:15 +0000 (UTC)
commit 9724266c0cab2de27edd134a76429b483c0d0a79
Author: Christian Hergert <christian hergert me>
Date: Thu Oct 16 14:37:55 2014 -0700
prefs: add style selector to preferences.
src/preferences/gb-preferences-page-editor.c | 18 +++++++++++++-----
src/resources/ui/gb-preferences-page-editor.ui | 13 +++++++++++++
2 files changed, 26 insertions(+), 5 deletions(-)
---
diff --git a/src/preferences/gb-preferences-page-editor.c b/src/preferences/gb-preferences-page-editor.c
index 74c9925..b8735c1 100644
--- a/src/preferences/gb-preferences-page-editor.c
+++ b/src/preferences/gb-preferences-page-editor.c
@@ -17,15 +17,17 @@
*/
#include "gb-preferences-page-editor.h"
+#include "gb-source-style-scheme-button.h"
struct _GbPreferencesPageEditorPrivate
{
- GSettings *settings;
+ GSettings *settings;
- GtkSwitch *restore_insert_mark_switch;
- GtkSwitch *vim_mode_switch;
- GtkSwitch *word_completion_switch;
- GtkFontButton *font_button;
+ GtkSwitch *restore_insert_mark_switch;
+ GtkSwitch *vim_mode_switch;
+ GtkSwitch *word_completion_switch;
+ GtkFontButton *font_button;
+ GbSourceStyleSchemeButton *style_scheme_button;
};
G_DEFINE_TYPE_WITH_PRIVATE (GbPreferencesPageEditor, gb_preferences_page_editor,
@@ -54,6 +56,9 @@ gb_preferences_page_editor_constructed (GObject *object)
g_settings_bind (priv->settings, "font-name",
priv->font_button, "font-name",
G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->settings, "style-scheme-name",
+ priv->style_scheme_button, "style-scheme-name",
+ G_SETTINGS_BIND_DEFAULT);
G_OBJECT_CLASS (gb_preferences_page_editor_parent_class)->constructed (object);
}
@@ -82,8 +87,11 @@ gb_preferences_page_editor_class_init (GbPreferencesPageEditorClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageEditor, font_button);
gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageEditor,
restore_insert_mark_switch);
+ gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageEditor, style_scheme_button);
gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageEditor, vim_mode_switch);
gtk_widget_class_bind_template_child_private (widget_class, GbPreferencesPageEditor,
word_completion_switch);
+
+ g_type_ensure (GB_TYPE_SOURCE_STYLE_SCHEME_BUTTON);
}
static void
diff --git a/src/resources/ui/gb-preferences-page-editor.ui b/src/resources/ui/gb-preferences-page-editor.ui
index 6622a80..588dac3 100644
--- a/src/resources/ui/gb-preferences-page-editor.ui
+++ b/src/resources/ui/gb-preferences-page-editor.ui
@@ -98,6 +98,19 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <object class="GbSourceStyleSchemeButton" id="style_scheme_button">
+ <property name="visible">True</property>
+ <property name="halign">end</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="width">2</property>
+ <property name="top-attach">4</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
</object>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]