[easytag] Activate the path entry when opening a directory



commit d26dc3c8a5db5b9f0413dc022d66e2834ad581d5
Author: David King <amigadave amigadave com>
Date:   Fri Sep 6 09:54:51 2013 +0100

    Activate the path entry when opening a directory
    
    As reported in bug 707577, opening a directory from the main window with
    the button adjacent to the path entry only updates the entry, and does
    not open the directory in the file browser. Emit the "activate" signal
    on the GtkEntry to browse to the directory after opening it.

 src/misc.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/misc.c b/src/misc.c
index 5d5b777..5423397 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -729,10 +729,11 @@ static void Open_File_Selection_Window (GtkWidget *entry, gchar *title, GtkFileC
         filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(FileSelectionWindow));
         filename_utf8 = filename_to_display(filename);
         gtk_entry_set_text(GTK_ENTRY(entry),filename_utf8);
-               g_free(filename);
+        g_free (filename);
         g_free(filename_utf8);
-               // Gives the focus to the entry (useful for the button on the main window)
-               gtk_widget_grab_focus(GTK_WIDGET(entry));
+        /* Useful for the button on the main window. */
+        gtk_widget_grab_focus (GTK_WIDGET (entry));
+       g_signal_emit_by_name (entry, "activate");
     }
        
     gtk_widget_destroy(FileSelectionWindow);


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