diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-07-01 02:24:22 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-07-01 02:24:22 +0800 |
commit | 61533f01f0f6df3b9dafc18d1567507830db0752 (patch) | |
tree | 232ed91422bc88e9b0664b15f34025333dccf42a /src/bookmarks/ephy-topic-action.c | |
parent | c260e516d7bb7aec504793170a48eb79f61fb50c (diff) | |
download | gsoc2013-epiphany-61533f01f0f6df3b9dafc18d1567507830db0752.tar gsoc2013-epiphany-61533f01f0f6df3b9dafc18d1567507830db0752.tar.gz gsoc2013-epiphany-61533f01f0f6df3b9dafc18d1567507830db0752.tar.bz2 gsoc2013-epiphany-61533f01f0f6df3b9dafc18d1567507830db0752.tar.lz gsoc2013-epiphany-61533f01f0f6df3b9dafc18d1567507830db0752.tar.xz gsoc2013-epiphany-61533f01f0f6df3b9dafc18d1567507830db0752.tar.zst gsoc2013-epiphany-61533f01f0f6df3b9dafc18d1567507830db0752.zip |
Use a new window for "Open in Tabs"
2004-06-30 Marco Pesenti Gritti <marco@gnome.org>
* src/bookmarks/ephy-bookmarksbar.c: (open_in_tabs_cb):
* src/bookmarks/ephy-topic-action.c: (append_bookmarks_menu),
(open_in_tabs_activate_cb), (build_bookmarks_menu):
Use a new window for "Open in Tabs"
Diffstat (limited to 'src/bookmarks/ephy-topic-action.c')
-rw-r--r-- | src/bookmarks/ephy-topic-action.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c index 7e6694539..2f0ac30f9 100644 --- a/src/bookmarks/ephy-topic-action.c +++ b/src/bookmarks/ephy-topic-action.c @@ -218,7 +218,7 @@ sort_bookmarks (gconstpointer a, gconstpointer b) #define MAX_LENGTH 32 -static gboolean +static guint append_bookmarks_menu (EphyTopicAction *action, GtkWidget *menu, EphyNode *node, gboolean show_empty) { EphyFaviconCache *cache; @@ -299,7 +299,7 @@ append_bookmarks_menu (EphyTopicAction *action, GtkWidget *menu, EphyNode *node, g_list_free (node_list); } - return TRUE; + return children->len; } static void @@ -312,33 +312,32 @@ open_in_tabs_activate_cb (GtkWidget *menu, EphyTopicAction *action) children = ephy_node_get_children (action->priv->topic_node); for (i = 0; i < children->len; i++) { - GnomeVFSURI *uri; const char *address; EphyNode *child; child = g_ptr_array_index (children, i); address = ephy_node_get_property_string (child, EPHY_NODE_BMK_PROP_LOCATION); - uri = gnome_vfs_uri_new (address); - uri_list = g_list_append (uri_list, uri); + uri_list = g_list_append (uri_list, g_strdup (address)); } g_signal_emit (action, ephy_topic_action_signals[OPEN_IN_TABS], 0, uri_list); - gnome_vfs_uri_list_free (uri_list); + g_list_foreach (uri_list, (GFunc)g_free, NULL); + g_list_free (uri_list); } static GtkWidget * build_bookmarks_menu (EphyTopicAction *action, EphyNode *node) { GtkWidget *menu; - gboolean empty; + guint n_bookmarks; menu = gtk_menu_new (); - empty = append_bookmarks_menu (action, menu, node, TRUE); + n_bookmarks = append_bookmarks_menu (action, menu, node, TRUE); - if (empty) + if (n_bookmarks > 1) { GtkWidget *item; |