From 27653d6670444ac6dac25ab0d62e51151fc78505 Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Wed, 3 Feb 2010 18:30:48 +0100 Subject: [PATCH] Only connect liststore after populating the model with filters We don't want to reload the rules for each row. --- extensions/adblock.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/adblock.c b/extensions/adblock.c index c04a8ce8..5035e33b 100644 --- a/extensions/adblock.c +++ b/extensions/adblock.c @@ -446,14 +446,6 @@ adblock_get_preferences_dialog (MidoriExtension* extension) entry = gtk_entry_new (); gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 4); liststore = gtk_list_store_new (1, G_TYPE_STRING); - g_object_connect (liststore, - "signal::row-inserted", - adblock_preferences_model_row_changed_cb, extension, - "signal::row-changed", - adblock_preferences_model_row_changed_cb, extension, - "signal::row-deleted", - adblock_preferences_model_row_deleted_cb, extension, - NULL); treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (liststore)); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE); column = gtk_tree_view_column_new (); @@ -492,6 +484,14 @@ adblock_get_preferences_dialog (MidoriExtension* extension) NULL, i - 1, 0, filters[i -1], -1); } g_strfreev (filters); + g_object_connect (liststore, + "signal::row-inserted", + adblock_preferences_model_row_changed_cb, extension, + "signal::row-changed", + adblock_preferences_model_row_changed_cb, extension, + "signal::row-deleted", + adblock_preferences_model_row_deleted_cb, extension, + NULL); g_object_unref (liststore); vbox = gtk_vbox_new (FALSE, 4);