diff --git a/ChangeLog b/ChangeLog index 7db585b0ab..5287972495 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-11-15 Erwann Chenede - + + * gtk/gtkfilesel.c: fix unselect in multiple selection (#156805) + 2004-11-15 Matthias Clasen * gtk/gtklabel.c: Include gtkdnd.h (#158243, Kazuki IWAMOTO) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7db585b0ab..5287972495 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +2004-11-15 Erwann Chenede - + + * gtk/gtkfilesel.c: fix unselect in multiple selection (#156805) + 2004-11-15 Matthias Clasen * gtk/gtklabel.c: Include gtkdnd.h (#158243, Kazuki IWAMOTO) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7db585b0ab..5287972495 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +2004-11-15 Erwann Chenede - + + * gtk/gtkfilesel.c: fix unselect in multiple selection (#156805) + 2004-11-15 Matthias Clasen * gtk/gtklabel.c: Include gtkdnd.h (#158243, Kazuki IWAMOTO) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7db585b0ab..5287972495 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +2004-11-15 Erwann Chenede - + + * gtk/gtkfilesel.c: fix unselect in multiple selection (#156805) + 2004-11-15 Matthias Clasen * gtk/gtklabel.c: Include gtkdnd.h (#158243, Kazuki IWAMOTO) diff --git a/gtk/gtkfilesel.c b/gtk/gtkfilesel.c index bf6585dd9f..e75c96e55c 100644 --- a/gtk/gtkfilesel.c +++ b/gtk/gtkfilesel.c @@ -2456,8 +2456,7 @@ maybe_clear_entry: * * Retrieves the list of file selections the user has made in the dialog box. * This function is intended for use when the user can select multiple files - * in the file list. The first file in the list is equivalent to what - * gtk_file_selection_get_filename() would return. + * in the file list. * * The filenames are in the encoding of g_filename_from_utf8(), which may or * may not be the same as that used by GTK+ (UTF-8). To convert to UTF-8, call @@ -2500,6 +2499,15 @@ gtk_file_selection_get_selections (GtkFileSelection *filesel) { dirname = g_path_get_dirname (filename); + if ((names->len >= 1) && + (strcmp (gtk_entry_get_text (GTK_ENTRY (filesel->selection_entry)), "") == 0)) + { /* multiple files are selected and last selection was removed via ctrl click */ + g_free (dirname); + dirname = g_strdup (filename); /* as gtk_file_selection_get_filename returns dir + if no file is selected */ + unselected_entry = FALSE; + } + for (i = 0; i < names->len; i++) { buf = g_filename_from_utf8 (g_ptr_array_index (names, i), -1,