summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-07-25 13:42:21 +0200
committerinfirit <[email protected]>2014-07-25 13:42:21 +0200
commite6f256f1fbd9edaa1875499c6ea8c82acc7f3b7d (patch)
tree72a1b7d2c2444c901c67681f9d03eab6de2c7681 /src
parentb75ee1ca5bcd22c26e3ae6bfde6052eb1bbd0d29 (diff)
downloadeom-e6f256f1fbd9edaa1875499c6ea8c82acc7f3b7d.tar.bz2
eom-e6f256f1fbd9edaa1875499c6ea8c82acc7f3b7d.tar.xz
Minor optimization
GList should always be prepended and reversed later. Based on eog commit 6aff895cc42d08aca91657ab7bb85a99c2ea1899 From Claudio Saavedra <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/eom-window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/eom-window.c b/src/eom-window.c
index da0f3a2..eacdb0a 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -2523,12 +2523,13 @@ eom_window_unsaved_images_confirm (EomWindow *window)
continue;
if (eom_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) {
+ if (list) {
+ list = g_list_reverse (list);
dialog = eom_close_confirmation_dialog_new (GTK_WINDOW (window),
list);