diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-06-24 16:58:52 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-06-24 16:58:52 +0800 |
commit | 6fcf143b625f3423798bea58621a231446eac361 (patch) | |
tree | 725aa187c799702afe51600681188d3412d2d5d6 /src/bookmarks/ephy-bookmarksbar.c | |
parent | 24833bb6604df5e36c39bab539fdbea4b5b57fe5 (diff) | |
download | gsoc2013-epiphany-6fcf143b625f3423798bea58621a231446eac361.tar gsoc2013-epiphany-6fcf143b625f3423798bea58621a231446eac361.tar.gz gsoc2013-epiphany-6fcf143b625f3423798bea58621a231446eac361.tar.bz2 gsoc2013-epiphany-6fcf143b625f3423798bea58621a231446eac361.tar.lz gsoc2013-epiphany-6fcf143b625f3423798bea58621a231446eac361.tar.xz gsoc2013-epiphany-6fcf143b625f3423798bea58621a231446eac361.tar.zst gsoc2013-epiphany-6fcf143b625f3423798bea58621a231446eac361.zip |
Implement open in tabs from toolbar topics
2004-06-24 Marco Pesenti Gritti <marco@gnome.org>
* src/bookmarks/ephy-bookmarksbar.c: (open_in_tabs_cb),
(go_location_cb), (ephy_bookmarksbar_action_request):
* src/bookmarks/ephy-topic-action.c: (append_bookmarks_menu),
(open_in_tabs_activate_cb), (build_bookmarks_menu),
(build_topics_menu), (build_menu),
(ephy_topic_action_set_topic_id), (ephy_topic_action_set_property),
(ephy_topic_action_class_init):
* src/bookmarks/ephy-topic-action.h:
* src/ephy-window.c: (ephy_window_load_in_tabs):
Implement open in tabs from toolbar topics
Diffstat (limited to 'src/bookmarks/ephy-bookmarksbar.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarksbar.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/bookmarks/ephy-bookmarksbar.c b/src/bookmarks/ephy-bookmarksbar.c index 3855090cc..249971491 100644 --- a/src/bookmarks/ephy-bookmarksbar.c +++ b/src/bookmarks/ephy-bookmarksbar.c @@ -98,9 +98,19 @@ ephy_bookmarksbar_get_type (void) } static void -go_location_cb (GtkAction *action, - char *location, - EphyBookmarksBar *toolbar) +open_in_tabs_cb (GtkAction *action, GList *uri_list, EphyBookmarksBar *toolbar) +{ + EphyWindow *window = toolbar->priv->window; + EphyTab *tab; + + g_return_if_fail (EPHY_IS_WINDOW (window)); + + tab = ephy_window_get_active_tab (window); + ephy_window_load_in_tabs (window, tab, uri_list); +} + +static void +go_location_cb (GtkAction *action, char *location, EphyBookmarksBar *toolbar) { EphyWindow *window = toolbar->priv->window; GdkEvent *event; @@ -233,6 +243,9 @@ ephy_bookmarksbar_action_request (EggEditableToolbar *eggtoolbar, if (ephy_node_has_child (topics, node)) { action = ephy_topic_action_new (name, ephy_node_get_id (node)); + + g_signal_connect (action, "open_in_tabs", + G_CALLBACK (open_in_tabs_cb), toolbar); } else if (ephy_node_has_child (bmks, node)) { @@ -243,6 +256,7 @@ ephy_bookmarksbar_action_request (EggEditableToolbar *eggtoolbar, g_signal_connect (action, "go_location", G_CALLBACK (go_location_cb), toolbar); + gtk_action_group_add_action (toolbar->priv->action_group, action); g_object_unref (action); |