diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-06-04 19:59:38 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-06-04 19:59:38 +0800 |
commit | 29bbfe00469fe536bbf0f1025cde834cec3bec0b (patch) | |
tree | 63a51af7a1f508ba64b5e0e8bec023eee2af7f98 /src/bookmarks/ephy-bookmarks.c | |
parent | 15358f9939f56b8ba5bc9df4499a72d65535ce41 (diff) | |
download | gsoc2013-epiphany-29bbfe00469fe536bbf0f1025cde834cec3bec0b.tar gsoc2013-epiphany-29bbfe00469fe536bbf0f1025cde834cec3bec0b.tar.gz gsoc2013-epiphany-29bbfe00469fe536bbf0f1025cde834cec3bec0b.tar.bz2 gsoc2013-epiphany-29bbfe00469fe536bbf0f1025cde834cec3bec0b.tar.lz gsoc2013-epiphany-29bbfe00469fe536bbf0f1025cde834cec3bec0b.tar.xz gsoc2013-epiphany-29bbfe00469fe536bbf0f1025cde834cec3bec0b.tar.zst gsoc2013-epiphany-29bbfe00469fe536bbf0f1025cde834cec3bec0b.zip |
Implement bookmarks menu, might need to be optimized later.
2003-06-04 Marco Pesenti Gritti <marco@it.gnome.org>
* src/bookmarks/Makefile.am:
* src/bookmarks/ephy-bookmark-action.c: (connect_proxy):
* src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_class_init),
(bookmarks_changed_cb), (bookmarks_removed_cb),
(ephy_bookmarks_set_keyword), (ephy_bookmarks_unset_keyword),
(ephy_bookmarks_get_favorites),
(ephy_bookmarks_get_not_categorized):
* src/bookmarks/ephy-bookmarks.h:
* src/ephy-window.c: (ephy_window_init), (ephy_window_finalize):
Implement bookmarks menu, might need to be optimized later.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index ab15fcba0..86a10d457 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -89,6 +89,15 @@ enum PROP_TOOLBARS_MODEL }; +/* Signals */ +enum +{ + TREE_CHANGED, + LAST_SIGNAL +}; + +static guint ephy_bookmarks_signals[LAST_SIGNAL] = { 0 }; + static void ephy_bookmarks_class_init (EphyBookmarksClass *klass); static void @@ -288,6 +297,16 @@ ephy_bookmarks_class_init (EphyBookmarksClass *klass) object_class->set_property = ephy_bookmarks_set_property; object_class->get_property = ephy_bookmarks_get_property; + ephy_bookmarks_signals[TREE_CHANGED] = + g_signal_new ("tree_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EphyBookmarksClass, tree_changed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + g_object_class_install_property (object_class, PROP_TOOLBARS_MODEL, g_param_spec_object ("toolbars_model", @@ -513,6 +532,7 @@ bookmarks_changed_cb (EphyNode *node, EphyBookmarks *eb) { ephy_bookmarks_emit_data_changed (eb); + g_signal_emit (G_OBJECT (eb), ephy_bookmarks_signals[TREE_CHANGED], 0); } static void @@ -522,6 +542,7 @@ bookmarks_removed_cb (EphyNode *node, EphyBookmarks *eb) { ephy_bookmarks_emit_data_changed (eb); + g_signal_emit (G_OBJECT (eb), ephy_bookmarks_signals[TREE_CHANGED], 0); } static char * @@ -1083,6 +1104,8 @@ ephy_bookmarks_set_keyword (EphyBookmarks *eb, update_topics_list (bookmark, list); g_free (list); + + g_signal_emit (G_OBJECT (eb), ephy_bookmarks_signals[TREE_CHANGED], 0); } void @@ -1109,6 +1132,8 @@ ephy_bookmarks_unset_keyword (EphyBookmarks *eb, update_topics_list (bookmark, list); g_free (list); + + g_signal_emit (G_OBJECT (eb), ephy_bookmarks_signals[TREE_CHANGED], 0); } EphyNode * @@ -1130,6 +1155,12 @@ ephy_bookmarks_get_favorites (EphyBookmarks *eb) } EphyNode * +ephy_bookmarks_get_not_categorized (EphyBookmarks *eb) +{ + return eb->priv->notcategorized; +} + +EphyNode * ephy_bookmarks_get_from_id (EphyBookmarks *eb, long id) { return ephy_node_db_get_node_from_id (eb->priv->db, id); |