Revert patches 759 and 760.
authorLaurent Monin <geeqie@norz.org>
Fri, 13 Jun 2008 12:27:41 +0000 (12:27 +0000)
committerLaurent Monin <geeqie@norz.org>
Fri, 13 Jun 2008 12:27:41 +0000 (12:27 +0000)
759 patch broke adding selection of files through sort manager
to an unopened collection.

src/collect-io.c
src/thumb_standard.c

index 139d696..9b722fd 100644 (file)
@@ -860,10 +860,16 @@ static void collect_manager_add_action(CollectManagerAction *action)
 
        /* we keep track of the list's tail to keep this a n(1) operation */
 
-       collection_manager_action_tail = g_list_append(collection_manager_action_tail, action);
-       if (!collection_manager_action_list) 
-               collection_manager_action_list = collection_manager_action_tail;
-       collection_manager_action_tail = collection_manager_action_tail->next;
+       if (collection_manager_action_tail)
+               {
+               collection_manager_action_tail = g_list_append(collection_manager_action_tail, action);
+               collection_manager_action_tail = collection_manager_action_tail->next;
+               }
+       else
+               {
+               collection_manager_action_list = g_list_append(collection_manager_action_list, action);
+               collection_manager_action_tail = collection_manager_action_list;
+               }
 
        collect_manager_timer_push(FALSE);
 }
index d5fe59b..5ddb7fe 100644 (file)
@@ -1065,8 +1065,14 @@ void thumb_std_maint_moved(const gchar *source, const gchar *dest)
                g_idle_add_full(G_PRIORITY_LOW, thumb_std_maint_move_idle, NULL, NULL);
                }
 
-       thumb_std_maint_move_tail = g_list_append(thumb_std_maint_move_tail, tm);
-       if (!thumb_std_maint_move_list)
-               thumb_std_maint_move_list = thumb_std_maint_move_tail;
-       thumb_std_maint_move_tail = thumb_std_maint_move_tail->next;
+       if (thumb_std_maint_move_tail)
+               {
+               thumb_std_maint_move_tail = g_list_append(thumb_std_maint_move_tail, tm);
+               thumb_std_maint_move_tail = thumb_std_maint_move_tail->next;
+               }
+       else
+               {
+               thumb_std_maint_move_list = g_list_append(thumb_std_maint_move_list, tm);
+               thumb_std_maint_move_tail = thumb_std_maint_move_list;
+               }
 }