summaryrefslogtreecommitdiff
path: root/extensions/tab-panel.c
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2010-09-12 00:59:24 +0200
committerChristian Dywan <christian@twotoasts.de>2010-09-12 00:59:24 +0200
commitc46184c001f7fb9e3c7e5d78044e31d54050c99d (patch)
tree11fa0d18cb0d17195d48e1541b8253ea56f94fd1 /extensions/tab-panel.c
parent05fb131611036f361098a6e52b9f5299bb3ccafc (diff)
downloadmidori-c46184c001f7fb9e3c7e5d78044e31d54050c99d.tar.gz
Implement and use KATZE_ARRAY_FOREACH_ITEM
Iterating an array by a GList is considerably faster than continuously retrieving items, however it is also a lot more complicated. So the new macro takes care of that and uses a new semi-private function to avoid copying the list. Note that the macro can't be nested, which basically isn't useful in practise anyway.
Diffstat (limited to 'extensions/tab-panel.c')
-rw-r--r--extensions/tab-panel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/extensions/tab-panel.c b/extensions/tab-panel.c
index beabcda5..a358818a 100644
--- a/extensions/tab-panel.c
+++ b/extensions/tab-panel.c
@@ -590,11 +590,9 @@ tab_panel_activate_cb (MidoriExtension* extension,
{
KatzeArray* browsers;
MidoriBrowser* browser;
- guint i;
browsers = katze_object_get_object (app, "browsers");
- i = 0;
- while ((browser = katze_array_get_nth_item (browsers, i++)))
+ KATZE_ARRAY_FOREACH_ITEM (browser, browsers)
tab_panel_app_add_browser_cb (app, browser, extension);
g_object_unref (browsers);
g_signal_connect (app, "add-browser",