[anjuta-extras] scintilla: Initialize editor settings when creating a new instance



commit e156ad6a66a08f20652f4425e8c94e4cebc7639e
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Mon Dec 24 20:06:13 2012 +0100

    scintilla: Initialize editor settings when creating a new instance

 plugins/scintilla/text_editor.c       |    4 ++--
 plugins/scintilla/text_editor_prefs.c |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/scintilla/text_editor.c b/plugins/scintilla/text_editor.c
index 506fd78..3142238 100644
--- a/plugins/scintilla/text_editor.c
+++ b/plugins/scintilla/text_editor.c
@@ -667,13 +667,13 @@ text_editor_new (AnjutaPlugin *plugin, const gchar *uri, const gchar *name)
 		te->uri = g_strdup (uri);
 	}
 
-	text_editor_prefs_init (te);
-
 	/* Create primary view */
 	te->vbox = gtk_vbox_new (TRUE, 3);
 	gtk_box_pack_end (GTK_BOX (te), te->vbox, TRUE, TRUE, 0);
 	text_editor_add_view (te);
 
+	text_editor_prefs_init (te);
+
 	if (te->uri)
 	{
 		if (text_editor_load_file (te) == FALSE)
diff --git a/plugins/scintilla/text_editor_prefs.c b/plugins/scintilla/text_editor_prefs.c
index 51bb57f..b5d4a89 100644
--- a/plugins/scintilla/text_editor_prefs.c
+++ b/plugins/scintilla/text_editor_prefs.c
@@ -367,7 +367,8 @@ on_notify_edge_column (GSettings* settings,
 }
 
 #define REGISTER_NOTIFY(settings, key, func) \
-	g_signal_connect (settings, "changed::" key, G_CALLBACK(func), te);
+	g_signal_connect (settings, "changed::" key, G_CALLBACK(func), te); \
+	func (settings, key, te);
 
 void
 text_editor_prefs_init (TextEditor *te)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]