[eog] Minor optimization
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Minor optimization
- Date: Wed, 15 Sep 2010 13:36:25 +0000 (UTC)
commit 6aff895cc42d08aca91657ab7bb85a99c2ea1899
Author: Claudio Saavedra <csaavedra igalia com>
Date: Wed Sep 15 16:28:04 2010 +0300
Minor optimization
GList should always be prepended and reversed later.
src/eog-window.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index fe81c4f..69144be 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -2311,12 +2311,13 @@ eog_window_unsaved_images_confirm (EogWindow *window)
continue;
if (eog_image_is_modified (image)) {
- list = g_list_append (list, image);
+ list = g_list_prepend (list, image);
}
} while (gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->store), &iter));
}
if (list) {
+ list = g_list_reverse (list);
dialog = eog_close_confirmation_dialog_new (GTK_WINDOW (window),
list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]