aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-24 09:03:49 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-24 09:03:49 +0800
commit0843d1c9c9398765dba7816b08c815502c5530fe (patch)
treef725cd2cbb50fa37a27ce1d22c2e549bddd788c6
parentd127ec47856ee69466b909af12e5f1020a12cb15 (diff)
downloadgsoc2013-epiphany-0843d1c9c9398765dba7816b08c815502c5530fe.tar
gsoc2013-epiphany-0843d1c9c9398765dba7816b08c815502c5530fe.tar.gz
gsoc2013-epiphany-0843d1c9c9398765dba7816b08c815502c5530fe.tar.bz2
gsoc2013-epiphany-0843d1c9c9398765dba7816b08c815502c5530fe.tar.lz
gsoc2013-epiphany-0843d1c9c9398765dba7816b08c815502c5530fe.tar.xz
gsoc2013-epiphany-0843d1c9c9398765dba7816b08c815502c5530fe.tar.zst
gsoc2013-epiphany-0843d1c9c9398765dba7816b08c815502c5530fe.zip
Open the bookmarks in the new tabs in the same order as they are in the
2004-12-24 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-topic-action.c: (append_bookmarks_menu), (open_in_tabs_activate_cb): Open the bookmarks in the new tabs in the same order as they are in the menu, not in some random order.
-rw-r--r--ChangeLog8
-rw-r--r--src/bookmarks/ephy-topic-action.c22
2 files changed, 23 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b8f6e4d5..9220ec424 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2004-12-24 Christian Persch <chpe@cvs.gnome.org>
+ * src/bookmarks/ephy-topic-action.c: (append_bookmarks_menu),
+ (open_in_tabs_activate_cb):
+
+ Open the bookmarks in the new tabs in the same order as they
+ are in the menu, not in some random order.
+
+2004-12-24 Christian Persch <chpe@cvs.gnome.org>
+
* lib/ephy-marshal.list:
* src/Makefile.am:
* src/bookmarks/ephy-bookmark-action.c:
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index 1acdf797c..c5c9fab8d 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -280,14 +280,12 @@ append_bookmarks_menu (EphyTopicAction *action, GtkWidget *menu, EphyNode *node,
node_list = g_list_sort (node_list, (GCompareFunc)sort_bookmarks);
- for (l = g_list_first (node_list); l != NULL; l = g_list_next (l))
+ for (l = node_list; l != NULL; l = l->next)
{
- EphyNode *kid;
+ EphyNode *kid = (EphyNode*) l->data;
const char *icon_location;
const char *title;
- kid = (EphyNode*)l->data;
-
icon_location = ephy_node_get_property_string
(kid, EPHY_NODE_BMK_PROP_ICON);
title = ephy_node_get_property_string
@@ -334,24 +332,34 @@ open_in_tabs_activate_cb (GtkWidget *item, EphyTopicAction *action)
EphyNode *node;
GPtrArray *children;
EphyTab *tab = NULL;
+ GList *node_list = NULL, *l;
int i;
node = g_object_get_data (G_OBJECT (item), TOPIC_NODE_DATA_KEY);
g_return_if_fail (node != NULL);
children = ephy_node_get_children (node);
- for (i = 0; i < children->len; i++)
+ for (i = 0; i < children->len; ++i)
+ {
+ node_list = g_list_prepend (node_list,
+ g_ptr_array_index (children, i));
+ }
+
+ node_list = g_list_sort (node_list, (GCompareFunc) sort_bookmarks);
+
+ for (l = node_list; l != NULL; l = l->next)
{
+ EphyNode *child = (EphyNode *) l->data;
const char *address;
- EphyNode *child;
- child = g_ptr_array_index (children, i);
address = ephy_node_get_property_string
(child, EPHY_NODE_BMK_PROP_LOCATION);
tab = ephy_link_open (EPHY_LINK (action), address, tab,
tab ? EPHY_LINK_NEW_TAB : EPHY_LINK_NEW_WINDOW);
}
+
+ g_list_free (node_list);
}
static int