Revision: 4736 http://geany.svn.sourceforge.net/geany/?rev=4736&view=rev Author: eht16 Date: 2010-03-07 18:48:12 +0000 (Sun, 07 Mar 2010)
Log Message: ----------- After opening files, focus the editor widget (based on a patch by Can Koy, thanks).
Modified Paths: -------------- trunk/plugins/filebrowser.c
Modified: trunk/plugins/filebrowser.c =================================================================== --- trunk/plugins/filebrowser.c 2010-03-07 18:43:31 UTC (rev 4735) +++ trunk/plugins/filebrowser.c 2010-03-07 18:48:12 UTC (rev 4736) @@ -444,7 +444,7 @@
/* We use document_open_files() as it's more efficient. */ -static void open_selected_files(GList *list) +static void open_selected_files(GList *list, gboolean do_not_focus) { GSList *files = NULL; GList *item; @@ -459,7 +459,7 @@ } document_open_files(files, FALSE, NULL, NULL); doc = document_get_current(); - if (doc != NULL) + if (doc != NULL && ! do_not_focus) keybindings_send_command(GEANY_KEY_GROUP_FOCUS, GEANY_KEYS_FOCUS_EDITOR);
g_slist_foreach(files, (GFunc) g_free, NULL); /* free filenames */ @@ -498,7 +498,7 @@ } } else - open_selected_files(list); + open_selected_files(list, GPOINTER_TO_INT(user_data));
g_list_foreach(list, (GFunc) gtk_tree_path_free, NULL); g_list_free(list); @@ -651,13 +651,18 @@ { if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter - || event->keyval == GDK_KP_Enter - || event->keyval == GDK_space) + || event->keyval == GDK_KP_Enter) { on_open_clicked(NULL, NULL); return TRUE; }
+ if (event->keyval == GDK_space) + { + on_open_clicked(NULL, GINT_TO_POINTER(TRUE)); + return TRUE; + } + if ((event->keyval == GDK_Up || event->keyval == GDK_KP_Up) && (event->state & GDK_MOD1_MASK)) /* FIXME: Alt-Up doesn't seem to work! */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.