diff --git a/ChangeLog b/ChangeLog index 74841d4f84..f6b5c92a82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-02-02 Federico Mena Quintero + + Merged from gtk-2-6: + + * gtk/gtkfilechooserdefault.c (pending_select_paths_process): + Don't select the first row if the chooser is not mapped. This + happens when it's acting on behalf of GtkFileChooserButton. Also, + don't select the first row if we are in SAVE or CREATE_FOLDER + modes --- I had missed that (see the ChangeLog entry from + 2005-01-18). Fixes #165264. + 2005-02-02 Tor Lillqvist Implement lazy extended input initialization on Win32, by Robert diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 74841d4f84..f6b5c92a82 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +2005-02-02 Federico Mena Quintero + + Merged from gtk-2-6: + + * gtk/gtkfilechooserdefault.c (pending_select_paths_process): + Don't select the first row if the chooser is not mapped. This + happens when it's acting on behalf of GtkFileChooserButton. Also, + don't select the first row if we are in SAVE or CREATE_FOLDER + modes --- I had missed that (see the ChangeLog entry from + 2005-01-18). Fixes #165264. + 2005-02-02 Tor Lillqvist Implement lazy extended input initialization on Win32, by Robert diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 74841d4f84..f6b5c92a82 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +2005-02-02 Federico Mena Quintero + + Merged from gtk-2-6: + + * gtk/gtkfilechooserdefault.c (pending_select_paths_process): + Don't select the first row if the chooser is not mapped. This + happens when it's acting on behalf of GtkFileChooserButton. Also, + don't select the first row if we are in SAVE or CREATE_FOLDER + modes --- I had missed that (see the ChangeLog entry from + 2005-01-18). Fixes #165264. + 2005-02-02 Tor Lillqvist Implement lazy extended input initialization on Win32, by Robert diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index c2e0f8e603..22738430bd 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -4592,7 +4592,21 @@ pending_select_paths_process (GtkFileChooserDefault *impl) browse_files_center_selected_row (impl); } else - browse_files_select_first_row (impl); + { + /* We only select the first row if the chooser is actually mapped --- + * selecting the first row is to help the user when he is interacting with + * the chooser, but sometimes a chooser works not on behalf of the user, + * but rather on behalf of something else like GtkFileChooserButton. In + * that case, the chooser's selection should be what the caller expects, + * as the user can't see that something else got selected. See bug #165264. + * + * Also, we don't select the first file if we are in SAVE or CREATE_FOLDER + * modes. Doing so would change the contents of the filename entry. + */ + if (GTK_WIDGET_MAPPED (impl) + && !(impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)) + browse_files_select_first_row (impl); + } g_assert (impl->pending_select_paths == NULL); }