Don't handle Enter if we are in SELECT_FOLDER or CREATE_FOLDER actions.
2004-11-29 Federico Mena Quintero <federico@ximian.com> * gtk/gtkfilechooserdefault.c (trap_activate_cb): Don't handle Enter if we are in SELECT_FOLDER or CREATE_FOLDER actions. This lets us navigate thei file system more easily. (gtk_file_chooser_default_should_respond): If we are in SELECT_FOLDER or CREATE_FOLDER modes, return TRUE if something is selected.
This commit is contained in:
committed by
Federico Mena Quintero
parent
0e43b2afcf
commit
7cff1a2465
@@ -1,3 +1,12 @@
|
||||
2004-11-29 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (trap_activate_cb): Don't handle
|
||||
Enter if we are in SELECT_FOLDER or CREATE_FOLDER actions. This
|
||||
lets us navigate thei file system more easily.
|
||||
(gtk_file_chooser_default_should_respond): If we are in
|
||||
SELECT_FOLDER or CREATE_FOLDER modes, return TRUE if something is
|
||||
selected.
|
||||
|
||||
2004-11-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display):
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2004-11-29 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (trap_activate_cb): Don't handle
|
||||
Enter if we are in SELECT_FOLDER or CREATE_FOLDER actions. This
|
||||
lets us navigate thei file system more easily.
|
||||
(gtk_file_chooser_default_should_respond): If we are in
|
||||
SELECT_FOLDER or CREATE_FOLDER modes, return TRUE if something is
|
||||
selected.
|
||||
|
||||
2004-11-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display):
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2004-11-29 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (trap_activate_cb): Don't handle
|
||||
Enter if we are in SELECT_FOLDER or CREATE_FOLDER actions. This
|
||||
lets us navigate thei file system more easily.
|
||||
(gtk_file_chooser_default_should_respond): If we are in
|
||||
SELECT_FOLDER or CREATE_FOLDER modes, return TRUE if something is
|
||||
selected.
|
||||
|
||||
2004-11-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display):
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2004-11-29 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (trap_activate_cb): Don't handle
|
||||
Enter if we are in SELECT_FOLDER or CREATE_FOLDER actions. This
|
||||
lets us navigate thei file system more easily.
|
||||
(gtk_file_chooser_default_should_respond): If we are in
|
||||
SELECT_FOLDER or CREATE_FOLDER modes, return TRUE if something is
|
||||
selected.
|
||||
|
||||
2004-11-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkselection-x11.c (gdk_text_property_to_utf8_list_for_display):
|
||||
|
||||
@@ -2727,10 +2727,12 @@ trap_activate_cb (GtkWidget *widget,
|
||||
|
||||
impl = (GtkFileChooserDefault *) data;
|
||||
|
||||
if (event->keyval == GDK_Return
|
||||
|| event->keyval == GDK_ISO_Enter
|
||||
|| event->keyval == GDK_KP_Enter
|
||||
|| event->keyval == GDK_space)
|
||||
if ((event->keyval == GDK_Return
|
||||
|| event->keyval == GDK_ISO_Enter
|
||||
|| event->keyval == GDK_KP_Enter
|
||||
|| event->keyval == GDK_space)
|
||||
&& !(impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
|
||||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER))
|
||||
{
|
||||
GtkWindow *window;
|
||||
|
||||
@@ -4808,7 +4810,7 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
|
||||
|
||||
current_focus = gtk_window_get_focus (GTK_WINDOW (toplevel));
|
||||
|
||||
if (current_focus == impl->browse_files_tree_view)
|
||||
if (current_focus == impl->browse_files_tree_view)
|
||||
{
|
||||
int num_selected;
|
||||
gboolean all_files, all_folders;
|
||||
@@ -4817,17 +4819,13 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
|
||||
|
||||
selection_check (impl, &num_selected, &all_files, &all_folders);
|
||||
|
||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
|
||||
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
|
||||
{
|
||||
if (num_selected != 1)
|
||||
return TRUE; /* zero means current folder; more than one means use the whole selection */
|
||||
else if (current_focus != impl->browse_files_tree_view)
|
||||
{
|
||||
/* a single folder is selected and a button was clicked */
|
||||
switch_to_selected_folder (impl);
|
||||
return TRUE;
|
||||
}
|
||||
if (num_selected > 0)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (num_selected == 0)
|
||||
{
|
||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|
||||
|
||||
Reference in New Issue
Block a user