[easytag] Fix selection behaviour when saving files



commit 891b557f77f4285282babb6540f8d150f6b25883
Author: David King <amigadave amigadave com>
Date:   Sun Jun 28 14:00:40 2015 +0100

    Fix selection behaviour when saving files
    
    In file list view, when saving files, the selection was reset to the
    current file only. Fix this by bisecting the failure back to commit
    4d24235a57f68b619ed0a6f7933bf7b9f6306902. Reinstate the check in
    Save_List_Of_Files(), to only call
    et_application_window_browser_toggle_display_mode() if the current
    browser view mode is the album/artist view.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739758

 src/easytag.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/easytag.c b/src/easytag.c
index 3ed743e..deb851d 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -148,6 +148,7 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
     File_Name *FileNameNew;
     double     fraction;
     GAction *action;
+    GVariant *variant;
     GtkWidget *widget_focused;
     GtkTreePath *currentPath = NULL;
 
@@ -345,7 +346,17 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
                                                           etfile_save_position,
                                                           TRUE);
 
-    et_application_window_browser_toggle_display_mode (window);
+    /* FIXME: Find out why this is a special case for the artist/album mode. */
+    action = g_action_map_lookup_action (G_ACTION_MAP (MainWindow),
+                                         "file-artist-view");
+    variant = g_action_get_state (action);
+
+    if (strcmp (g_variant_get_string (variant, NULL), "artist") == 0)
+    {
+        et_application_window_browser_toggle_display_mode (window);
+    }
+
+    g_variant_unref (variant);
 
     /* To update state of command buttons */
     et_application_window_update_actions (ET_APPLICATION_WINDOW (MainWindow));


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