gtk+ r19542 - in branches/gtk-2-12: . gtk



Author: federico
Date: Tue Feb 12 19:25:51 2008
New Revision: 19542
URL: http://svn.gnome.org/viewvc/gtk+?rev=19542&view=rev

Log:
Don't focus the file list even when activating a bookmark with a shortcut key
2008-02-12  Federico Mena Quintero  <federico novell com>

	* gtk/gtkfilechooserdefault.c (switch_to_shortcut): Don't focus
	the file list (this was the last place where we would focus the
	file list explicitly).  If you are in the location entry, for
	example, you don't want Alt-Home to take you to the file list; you
	just want the current folder to change.  Thanks to Olle Bergkvist
	<olle bergkvist yahoo se> for pointing this out in
	http://bugzilla.gnome.org/show_bug.cgi?id=419737#c51.
	(focus_browse_tree_view_if_possible): Removed.

Modified:
   branches/gtk-2-12/ChangeLog
   branches/gtk-2-12/gtk/gtkfilechooserdefault.c

Modified: branches/gtk-2-12/gtk/gtkfilechooserdefault.c
==============================================================================
--- branches/gtk-2-12/gtk/gtkfilechooserdefault.c	(original)
+++ branches/gtk-2-12/gtk/gtkfilechooserdefault.c	Tue Feb 12 19:25:51 2008
@@ -8200,23 +8200,6 @@
     }
 }
 
-/* Gives the focus to the browse tree view only if it is visible */
-static void
-focus_browse_tree_view_if_possible (GtkFileChooserDefault *impl)
-{
-  gboolean do_focus;
-
-  if ((impl->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
-       impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
-      && !gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander)))
-    do_focus = FALSE;
-  else
-    do_focus = TRUE;
-
-  if (do_focus)
-    gtk_widget_grab_focus (impl->browse_files_tree_view);
-}
-
 static void
 action_create_folder_cb (GtkFileSystemHandle *handle,
 			 const GtkFilePath   *path,
@@ -11243,7 +11226,6 @@
     g_assert_not_reached ();
 
   shortcuts_activate_iter (impl, &iter);
-  focus_browse_tree_view_if_possible (impl);
 }
 
 /* Handler for the "home-folder" keybinding signal */



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