diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-04-09 03:44:22 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-04-09 03:44:22 +0800 |
commit | bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d (patch) | |
tree | 5183e93fad2ca5634034d844c858c40439c9cd69 /src/bookmarks/ephy-bookmarks.c | |
parent | 20dd70b526a557dccd623f9a1c0b05720317e9f7 (diff) | |
download | gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.gz gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.bz2 gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.lz gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.xz gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.tar.zst gsoc2013-epiphany-bf5ae80d6a2281da9a661cc59fa0de7b0b4cc13d.zip |
Update.
2003-04-08 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/egg/egg-toolbars-group.c:
* lib/egg/egg-toolbars-group.h:
Update.
* src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_class_init),
(bookmarks_removed_cb), (topics_removed_cb), (ephy_bookmarks_init):
* src/bookmarks/ephy-bookmarks.h:
* src/bookmarks/ephy-new-bookmark.c:
(ephy_new_bookmark_response_cb):
* src/popup-commands.c: (popup_cmd_bookmark_link):
* src/toolbar.c: (toolbar_get_action_name), (toolbar_get_action),
(topic_remove_cb), (bookmark_remove_cb), (toolbar_init):
* src/window-commands.c: (window_cmd_file_bookmark_page):
Update toolbars when bookmarks and topics are removed.
Use dialog_run for new_bookmark dialog.
(Dave I hope this doesnt break something, but it's necessary
to url dnd to toolbars to work correctly)
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index cd159994d..5db21ad14 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -49,8 +49,17 @@ ephy_bookmarks_finalize (GObject *object); static void ephy_bookmarks_autocompletion_source_init (EphyAutocompletionSourceIface *iface); +enum +{ + BOOKMARK_REMOVE, + TOPIC_REMOVE, + LAST_SIGNAL +}; + static GObjectClass *parent_class = NULL; +static guint ephy_bookmarks_signals[LAST_SIGNAL] = { 0 }; + GType ephy_bookmarks_get_type (void) { @@ -160,6 +169,27 @@ ephy_bookmarks_class_init (EphyBookmarksClass *klass) parent_class = g_type_class_peek_parent (klass); object_class->finalize = ephy_bookmarks_finalize; + + ephy_bookmarks_signals[BOOKMARK_REMOVE] = + g_signal_new ("bookmark_remove", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EphyBookmarksClass, bookmark_remove), + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, + 1, + G_TYPE_INT); + ephy_bookmarks_signals[TOPIC_REMOVE] = + g_signal_new ("topic_remove", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EphyBookmarksClass, topic_remove), + NULL, NULL, + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, + 1, + G_TYPE_INT); } static void @@ -374,10 +404,28 @@ bookmarks_removed_cb (EphyNode *node, EphyNode *child, EphyBookmarks *eb) { + long id; + + id = ephy_node_get_id (child); + g_signal_emit (eb, ephy_bookmarks_signals[BOOKMARK_REMOVE], + 0, id); + ephy_bookmarks_emit_data_changed (eb); } static void +topics_removed_cb (EphyNode *node, + EphyNode *child, + EphyBookmarks *eb) +{ + long id; + + id = ephy_node_get_id (child); + g_signal_emit (eb, ephy_bookmarks_signals[TOPIC_REMOVE], + 0, id); +} + +static void ephy_bookmarks_init (EphyBookmarks *eb) { GValue value = { 0, }; @@ -417,6 +465,11 @@ ephy_bookmarks_init (EphyBookmarks *eb) EPHY_NODE_KEYWORD_PROP_PRIORITY, &value); g_value_unset (&value); + g_signal_connect_object (G_OBJECT (eb->priv->keywords), + "child_removed", + G_CALLBACK (topics_removed_cb), + G_OBJECT (eb), + 0); ephy_node_add_child (eb->priv->keywords, eb->priv->bookmarks); |