Focus the editor widget after switching between files with the open files list.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1686 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2007-07-09 16:01:23 +00:00
parent 6146162d5f
commit 34e0036c10
2 changed files with 10 additions and 0 deletions

View File

@ -11,6 +11,8 @@
* src/symbols.c, tagmanager/php.c: * src/symbols.c, tagmanager/php.c:
Use CTags SVN version of PHP parser. Use CTags SVN version of PHP parser.
Use only supported symbol types in the symbol view for PHP. Use only supported symbol types in the symbol view for PHP.
* src/treeviews.c: Focus the editor widget after switching between
files with the open files list.
2007-07-08 Enrico Tröger <enrico.troeger@uvena.de> 2007-07-08 Enrico Tröger <enrico.troeger@uvena.de>

View File

@ -414,6 +414,13 @@ static void on_openfiles_tree_popup_clicked(GtkMenuItem *menuitem, gpointer user
} }
static gboolean change_focus(GtkWidget *widget)
{
gtk_widget_grab_focus(widget);
return FALSE;
}
static void on_openfiles_tree_selection_changed(GtkTreeSelection *selection, gpointer data) static void on_openfiles_tree_selection_changed(GtkTreeSelection *selection, gpointer data)
{ {
GtkTreeIter iter; GtkTreeIter iter;
@ -427,6 +434,7 @@ static void on_openfiles_tree_selection_changed(GtkTreeSelection *selection, gpo
gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook),
gtk_notebook_page_num(GTK_NOTEBOOK(app->notebook), gtk_notebook_page_num(GTK_NOTEBOOK(app->notebook),
(GtkWidget*) doc_list[idx].sci)); (GtkWidget*) doc_list[idx].sci));
g_idle_add((GSourceFunc) change_focus, GTK_WIDGET(doc_list[idx].sci));
} }
} }