Kaydet (Commit) 04802a6a authored tarafından Nick Treleaven's avatar Nick Treleaven

Only focus the current document after switching pages if the open

files treeview currently has focus (otherwise focus commands can be
overridden, e.g. when pressing F4 during opening several files).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1843 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 641ca8e5
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
Rename non-menu keybinding titles, e.g. Tags menu -> Tags commands. Rename non-menu keybinding titles, e.g. Tags menu -> Tags commands.
* src/keybindings.c: * src/keybindings.c:
Fix Ctrl-Shift bindings not working when caps lock is on. Fix Ctrl-Shift bindings not working when caps lock is on.
* src/treeviews.c:
Only focus the current document after switching pages if the open
files treeview currently has focus (otherwise focus commands can be
overridden, e.g. when pressing F4 during opening several files).
2007-08-29 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> 2007-08-29 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
......
...@@ -469,9 +469,11 @@ static gboolean change_focus(gpointer data) ...@@ -469,9 +469,11 @@ static gboolean change_focus(gpointer data)
// idx might not be valid e.g. if user closed a tab whilst Geany is opening files // idx might not be valid e.g. if user closed a tab whilst Geany is opening files
if (DOC_IDX_VALID(idx)) if (DOC_IDX_VALID(idx))
{ {
GtkWidget *widget = GTK_WIDGET(doc_list[idx].sci); GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(app->window));
GtkWidget *sci = GTK_WIDGET(doc_list[idx].sci);
gtk_widget_grab_focus(widget); if (focusw == tv.tree_openfiles)
gtk_widget_grab_focus(sci);
} }
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment