Merged from gtk-2-6:

2005-02-02  Federico Mena Quintero  <federico@ximian.com>

	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.
This commit is contained in:
Federico Mena Quintero
2005-02-02 18:25:27 +00:00
committed by Federico Mena Quintero
parent 8c323acbae
commit 1707e510a8
4 changed files with 48 additions and 1 deletions

View File

@ -1,3 +1,14 @@
2005-02-02 Federico Mena Quintero <federico@ximian.com>
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 <tml@novell.com>
Implement lazy extended input initialization on Win32, by Robert

View File

@ -1,3 +1,14 @@
2005-02-02 Federico Mena Quintero <federico@ximian.com>
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 <tml@novell.com>
Implement lazy extended input initialization on Win32, by Robert

View File

@ -1,3 +1,14 @@
2005-02-02 Federico Mena Quintero <federico@ximian.com>
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 <tml@novell.com>
Implement lazy extended input initialization on Win32, by Robert

View File

@ -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);
}