aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-editor.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-08-23 20:08:01 +0800
committerChristian Persch <chpe@src.gnome.org>2004-08-23 20:08:01 +0800
commitb5a198b5d45ae6460919c4001a27574ff640ba27 (patch)
tree45a45e66ef0451e8b60186f75ec89a333d1ba69f /src/bookmarks/ephy-bookmarks-editor.c
parentd07a7cfd1903d727b888eeafd1858850ed467540 (diff)
downloadgsoc2013-epiphany-b5a198b5d45ae6460919c4001a27574ff640ba27.tar
gsoc2013-epiphany-b5a198b5d45ae6460919c4001a27574ff640ba27.tar.gz
gsoc2013-epiphany-b5a198b5d45ae6460919c4001a27574ff640ba27.tar.bz2
gsoc2013-epiphany-b5a198b5d45ae6460919c4001a27574ff640ba27.tar.lz
gsoc2013-epiphany-b5a198b5d45ae6460919c4001a27574ff640ba27.tar.xz
gsoc2013-epiphany-b5a198b5d45ae6460919c4001a27574ff640ba27.tar.zst
gsoc2013-epiphany-b5a198b5d45ae6460919c4001a27574ff640ba27.zip
Make the hierarchy separator a #define.
2004-08-23 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmarks-editor.c: (cmd_bookmarks_import): * src/bookmarks/ephy-bookmarks-import.c: (xbel_parse_folder), (folders_list_to_topic_name): * src/bookmarks/ephy-bookmarks.h: Make the hierarchy separator a #define. * src/bookmarks/ephy-bookmarks-menu.c: (remove_action), (ephy_bookmarks_menu_clean), (open_bookmark_cb), (add_action_for_bookmark), (ensure_bookmark_actions), (create_menu), (create_submenu), (ephy_bookmarks_menu_rebuild), (do_update_cb), (ephy_bookmarks_menu_maybe_update), (ephy_bookmarks_menu_set_window), (ephy_bookmarks_menu_set_property), (ephy_bookmarks_menu_get_property), (bookmarks_tree_changed_cb), (topics_added_cb), (topics_removed_cb), (topic_child_changed_cb), (bookmark_added_cb), (bookmark_removed_cb), (activate_cb), (ephy_bookmarks_menu_init), (ephy_bookmarks_menu_constructor), (ephy_bookmarks_menu_finalize), (ephy_bookmarks_menu_class_init), (ephy_bookmarks_menu_new): * src/bookmarks/ephy-bookmarks-menu.h: * src/bookmarks/ephy-bookmarks.c: (bookmarks_removed_cb), (topics_removed_cb), (ephy_bookmarks_add): Speed up bookmarks menu with large bookmarks collections, partially fixes bug #141269. Fix topic hierarchy and updating on changes, fixes bug #147470, bug 147786, and bug #150246.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-editor.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c33
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);