[eog] EogWindow: Drop image selection code from file deletion



commit 460525937238ef8df569ecf3d6db2b08852acaff
Author: Felix Riemann <friemann gnome org>
Date:   Fri Jan 3 20:02:05 2020 +0100

    EogWindow: Drop image selection code from file deletion
    
    The code is no longer needed as selecting a new image is now
    handled by the corresponding collection callback.

 src/eog-window.c | 21 ---------------------
 1 file changed, 21 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index e79bca9c..d6fc3834 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -3390,15 +3390,10 @@ eog_window_force_image_delete (EogWindow *window,
                               GList     *images)
 {
        GList    *item;
-       gint      current_position;
-       EogImage *current_image;
        gboolean  success;
 
        g_return_if_fail (EOG_WINDOW (window));
 
-       current_position = eog_list_store_get_pos_by_image (window->priv->store,
-                                                           EOG_IMAGE (images->data));
-
        /* force delete of each image of the list */
        for (item = images; item != NULL; item = item->next) {
                GError   *error;
@@ -3445,22 +3440,6 @@ eog_window_force_image_delete (EogWindow *window,
        /* free list */
        g_list_foreach (images, (GFunc) g_object_unref, NULL);
        g_list_free    (images);
-
-       /* select image at previously saved position */
-       current_position = MIN (current_position,
-                               eog_list_store_length (window->priv->store) - 1);
-
-       if (current_position >= 0) {
-               current_image = eog_list_store_get_image_by_pos (window->priv->store,
-                                                                current_position);
-
-               eog_thumb_view_set_current_image (EOG_THUMB_VIEW (window->priv->thumbview),
-                                                 current_image,
-                                                 TRUE);
-
-               if (current_image != NULL)
-                       g_object_unref (current_image);
-       }
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]