aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp14
2 files changed, 14 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 55052a1b2..5cab161b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-05-27 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/mozilla-embed-single.cpp: (impl_get_charset_titles),
+ (impl_get_charset_groups), (impl_get_font_list):
+
+ g_list_prepend is faster than g_list_append.
+
2003-05-27 Xan Lopez <xan@masilla.org>
* lib/widgets/ephy-node-view.c: (ephy_node_view_get_selection):
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index c0db1d3c5..168b9262b 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -743,11 +743,11 @@ impl_get_charset_titles (EphyEmbedSingle *shell,
info = g_new0 (CharsetInfo, 1);
info->name = charset_trans_array[j].charset_name;
info->title = charset_trans_array[j].charset_title;
- l = g_list_append (l, info);
+ l = g_list_prepend (l, info);
}
}
- *charsets = l;
+ *charsets = g_list_reverse (l);
return G_OK;
}
@@ -759,12 +759,12 @@ impl_get_charset_groups (EphyEmbedSingle *shell,
GList *l = NULL;
int i;
- for (i = 0; lgroups[i] != NULL; i++)
+ for (i = 0; i < n_lgroups; i++)
{
- l = g_list_append (l, (gpointer)lgroups[i]);
+ l = g_list_prepend (l, (gpointer)lgroups[i]);
}
- *groups = l;
+ *groups = g_list_reverse (l);
return G_OK;
}
@@ -803,9 +803,9 @@ impl_get_font_list (EphyEmbedSingle *shell,
char *gFontString;
gFontString = g_strdup(NS_ConvertUCS2toUTF8(fontString).get());
- l = g_list_append(l, gFontString);
+ l = g_list_prepend (l, gFontString);
}
- *fontList = l;
+ *fontList = g_list_reverse (l);
if (default_font != NULL)
{