]> spindle.queued.net Git - midori/commitdiff
Don't repopulate the toolbar when opening the toolbar editor
authorEnrico Tröger <enrico.troeger@uvena.de>
Sat, 18 Jul 2009 13:19:54 +0000 (15:19 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 18 Jul 2009 13:19:54 +0000 (15:19 +0200)
extensions/toolbar-editor.c

index cce565466479f2a1da245b8d7ede1569562cf03e..5e6f96ebca2bf75d6304a459dddb1d70cc707033 100644 (file)
@@ -449,11 +449,6 @@ static TBEditorWidget *tb_editor_create_dialog(MidoriBrowser *parent)
        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);
@@ -557,6 +552,12 @@ static void tb_editor_menu_configure_toolbar_activate_cb(GtkWidget *menuitem, Mi
        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));