[gnome-builder/wip/vim] editor: wire GbEditorVim:enabled to GSetting schema.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/vim] editor: wire GbEditorVim:enabled to GSetting schema.
- Date: Fri, 3 Oct 2014 20:13:38 +0000 (UTC)
commit 3688cfabc036d425fc5770b6b0a5cd7b9fe4a01c
Author: Christian Hergert <christian hergert me>
Date: Fri Oct 3 13:13:19 2014 -0700
editor: wire GbEditorVim:enabled to GSetting schema.
src/editor/gb-editor-tab.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index 31aae89..6b99a78 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -1152,6 +1152,7 @@ gb_editor_tab_constructed (GObject *object)
GbEditorTabPrivate *priv;
GbEditorTab *tab = (GbEditorTab *) object;
GtkSourceGutter *gutter;
+ GSettings *settings;
ENTRY;
@@ -1267,7 +1268,7 @@ gb_editor_tab_constructed (GObject *object)
gtk_source_gutter_insert (gutter, priv->change_renderer, 0);
priv->vim = g_object_new (GB_TYPE_EDITOR_VIM,
- "enabled", TRUE,
+ "enabled", FALSE,
"text-view", priv->source_view,
NULL);
g_signal_connect (priv->vim,
@@ -1293,6 +1294,11 @@ gb_editor_tab_constructed (GObject *object)
G_CALLBACK (on_vim_command_entry_key_press_event),
tab);
+ settings = g_settings_new ("org.gnome.builder.editor");
+ g_settings_bind (settings, "vim-mode", priv->vim, "enabled",
+ G_SETTINGS_BIND_DEFAULT);
+ g_object_unref (settings);
+
gb_editor_tab_cursor_moved (tab, priv->document);
EXIT;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]