diff options
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-editor.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-editor.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index 74de22a34..5d80ec2aa 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -660,21 +660,6 @@ cmd_bookmarks_import (GtkAction *action, store = GTK_LIST_STORE (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING)); - sortmodel = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (store)); - gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sortmodel), 0, GTK_SORT_ASCENDING); - - combo = gtk_combo_box_new (); - gtk_combo_box_set_model(GTK_COMBO_BOX (combo), sortmodel); - gtk_widget_show (combo); - g_object_set_data (G_OBJECT (dialog), "combo_box", combo); - g_object_unref (store); - - cell = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); - gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, - "text", 0, - NULL); - add_bookmarks_source (store, _("Firebird"), FIREBIRD_BOOKMARKS_DIR, "bookmarks.html", 4); add_bookmarks_source (store, _("Firefox"), @@ -689,9 +674,27 @@ cmd_bookmarks_import (GtkAction *action, gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, _("File"), 1, NULL, -1); + sortmodel = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (store)); + g_object_unref (store); + + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sortmodel), 0, GTK_SORT_ASCENDING); + + combo = gtk_combo_box_new (); + gtk_combo_box_set_model(GTK_COMBO_BOX (combo), sortmodel); + g_object_set_data (G_OBJECT (dialog), "combo_box", combo); + g_object_unref (sortmodel); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, + "text", 0, + NULL); + gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0); gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0); + gtk_widget_show (combo); + g_signal_connect (dialog, "response", G_CALLBACK (import_dialog_response_cb), editor); |