aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-30 05:06:40 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-30 05:06:40 +0800
commitdff9e866bb4f2fc18074d5c638733ee860746f9b (patch)
tree654f9332e949ce91c5d2f5c9a61280c874ce0ab5 /src/bookmarks
parentec52d432955e2e2d5467a8da01c8ce929388325c (diff)
downloadgsoc2013-epiphany-dff9e866bb4f2fc18074d5c638733ee860746f9b.tar
gsoc2013-epiphany-dff9e866bb4f2fc18074d5c638733ee860746f9b.tar.gz
gsoc2013-epiphany-dff9e866bb4f2fc18074d5c638733ee860746f9b.tar.bz2
gsoc2013-epiphany-dff9e866bb4f2fc18074d5c638733ee860746f9b.tar.lz
gsoc2013-epiphany-dff9e866bb4f2fc18074d5c638733ee860746f9b.tar.xz
gsoc2013-epiphany-dff9e866bb4f2fc18074d5c638733ee860746f9b.tar.zst
gsoc2013-epiphany-dff9e866bb4f2fc18074d5c638733ee860746f9b.zip
Complete (or nearly) toolbar editor implementation. Bookmarks are
2003-01-29 Marco Pesenti Gritti <marco@it.gnome.org> * lib/ephy-bonobo-extensions.c: (ephy_bonobo_clear_path), (ephy_bonobo_replace_path): * lib/ephy-bonobo-extensions.h: * lib/ephy-marshal.list: * lib/ephy-string.c: (ephy_str_to_int): * lib/ephy-string.h: * lib/widgets/ephy-editable-toolbar.c: (impl_get_action), (add_action), (parse_item_list), (add_toolbar), (parse_toolbars), (load_defaults), (load_toolbar), (drag_data_received_cb), (setup_toolbar_drag), (ensure_toolbars_min_size), (do_merge), (ephy_editable_toolbar_class_init), (editor_get_dimensions), (hide_editor), (editor_close_cb), (editor_add_toolbar_cb), (editor_drag_data_received_cb), (editor_drag_data_delete_cb), (setup_editor), (button_press_cb), (show_editor), (ephy_editable_toolbar_edit), (ephy_editable_toolbar_get_action): * lib/widgets/ephy-editable-toolbar.h: * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_get_bookmark_id): * src/bookmarks/ephy-bookmarks.h: * src/session.c: (session_load): * src/toolbar.c: (go_location_cb), (toolbar_get_action), (toolbar_class_init), (toolbar_init): Complete (or nearly) toolbar editor implementation. Bookmarks are implemented too, but some minor problems are stopping them to work.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmarks.c20
-rw-r--r--src/bookmarks/ephy-bookmarks.h3
2 files changed, 23 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 5e9d539f3..7e1d2bdd5 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -659,6 +659,26 @@ ephy_bookmarks_add (EphyBookmarks *eb,
return bm;
}
+guint
+ephy_bookmarks_get_bookmark_id (EphyBookmarks *eb,
+ const char *url)
+{
+ EphyNode *node;
+
+ g_static_rw_lock_reader_lock (eb->priv->bookmarks_hash_lock);
+ node = g_hash_table_lookup (eb->priv->bookmarks_hash, url);
+ g_static_rw_lock_reader_unlock (eb->priv->bookmarks_hash_lock);
+
+ if (node)
+ {
+ return ephy_node_get_id (node);
+ }
+ else
+ {
+ return -1;
+ }
+}
+
void
ephy_bookmarks_set_icon (EphyBookmarks *eb,
const char *url,
diff --git a/src/bookmarks/ephy-bookmarks.h b/src/bookmarks/ephy-bookmarks.h
index d2b1d7915..169e5a841 100644
--- a/src/bookmarks/ephy-bookmarks.h
+++ b/src/bookmarks/ephy-bookmarks.h
@@ -69,6 +69,9 @@ EphyNode *ephy_bookmarks_add (EphyBookmarks *eb,
const char *smart_url,
const char *keywords);
+guint ephy_bookmarks_get_bookmark_id (EphyBookmarks *eb,
+ const char *url);
+
void ephy_bookmarks_set_icon (EphyBookmarks *eb,
const char *url,
const char *icon);