Optimize array iterations in the History panel
This commit is contained in:
parent
d14b65563a
commit
09af4e6754
1 changed files with 4 additions and 8 deletions
|
@ -441,7 +441,8 @@ midori_history_insert_item (MidoriHistory* history,
|
|||
{
|
||||
GtkTreeIter* piter;
|
||||
gint64 pday;
|
||||
guint i, n;
|
||||
guint i;
|
||||
KatzeItem* child;
|
||||
|
||||
g_signal_connect (item, "add-item",
|
||||
G_CALLBACK (midori_history_add_item_cb), history);
|
||||
|
@ -459,15 +460,10 @@ midori_history_insert_item (MidoriHistory* history,
|
|||
g_object_unref (item);
|
||||
piter = &iter;
|
||||
}
|
||||
n = katze_array_get_length (KATZE_ARRAY (item));
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
KatzeItem* child;
|
||||
|
||||
child = katze_array_get_nth_item (KATZE_ARRAY (item), i);
|
||||
i = 0;
|
||||
while ((child = katze_array_get_nth_item (KATZE_ARRAY (item), i++)))
|
||||
midori_history_insert_item (history, treestore, piter, child, day);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_tree_store_insert_with_values (treestore, &iter, parent,
|
||||
|
|
Loading…
Reference in a new issue