SF.net SVN: geany:[3990] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sat Jul 18 14:45:30 UTC 2009


Revision: 3990
          http://geany.svn.sourceforge.net/geany/?rev=3990&view=rev
Author:   eht16
Date:     2009-07-18 14:45:30 +0000 (Sat, 18 Jul 2009)

Log Message:
-----------
Speed up toolbar editor dialog creation.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/toolbar.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-07-18 14:45:18 UTC (rev 3989)
+++ trunk/ChangeLog	2009-07-18 14:45:30 UTC (rev 3990)
@@ -4,6 +4,7 @@
    Display item labels instead of raw names in the toolbar editor.
    Apply changes in the toolbar editor instantly.
    Show icons in the toolbar editor.
+   Speed up toolbar editor dialog creation.
 
 
 2009-07-16  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/src/toolbar.c
===================================================================
--- trunk/src/toolbar.c	2009-07-18 14:45:18 UTC (rev 3989)
+++ trunk/src/toolbar.c	2009-07-18 14:45:30 UTC (rev 3990)
@@ -931,11 +931,6 @@
 	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(swin_used), GTK_SHADOW_ETCHED_IN);
 	gtk_container_add(GTK_CONTAINER(swin_used), tree_used);
 
-	g_signal_connect(tbw->store_used, "row-changed",
-		G_CALLBACK(tb_editor_available_items_changed_cb), tbw);
-	g_signal_connect(tbw->store_used, "row-deleted",
-		G_CALLBACK(tb_editor_available_items_deleted_cb), tbw);
-
 	/* drag'n'drop */
 	gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(tree_available), GDK_BUTTON1_MASK,
 		tb_editor_dnd_targets, tb_editor_dnd_targets_len, GDK_ACTION_MOVE);
@@ -1040,6 +1035,12 @@
 	gtk_tree_selection_select_path(gtk_tree_view_get_selection(tbw->tree_used), path);
 	gtk_tree_path_free(path);
 
+	/* connect the changed signals after populating the store */
+	g_signal_connect(tbw->store_used, "row-changed",
+		G_CALLBACK(tb_editor_available_items_changed_cb), tbw);
+	g_signal_connect(tbw->store_used, "row-deleted",
+		G_CALLBACK(tb_editor_available_items_deleted_cb), tbw);
+
 	/* run it */
 	gtk_dialog_run(GTK_DIALOG(tbw->dialog));
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list