Fix Ctrl-Shift-[CV] keybindings to work outside the VTE.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5722 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2011-04-13 15:04:37 +00:00
parent 8a817e694b
commit ac11289415
2 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,8 @@
* src/templates.c, src/utils.c, src/toolbar.c, src/utils.h,
src/keyfile.c, src/filetypes.c, src/editor.c, src/symbols.c:
Make utils_build_path() return a copy for safety.
* src/keybindings.c:
Fix Ctrl-Shift-[CV] keybindings to work outside the VTE.
2011-04-12 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -1076,13 +1076,13 @@ static gboolean check_vte(GdkModifierType state, guint keyval)
GeanyKeyGroup *group;
GtkWidget *widget;
if (gtk_window_get_focus(GTK_WINDOW(main_widgets.window)) != vc->vte)
return FALSE;
/* let VTE copy/paste override any user keybinding */
if (state == (GDK_CONTROL_MASK | GDK_SHIFT_MASK) && (keyval == GDK_c || keyval == GDK_v))
return TRUE;
if (! vc->enable_bash_keys)
return FALSE;
if (gtk_window_get_focus(GTK_WINDOW(main_widgets.window)) != vc->vte)
return FALSE;
/* prevent menubar flickering: */
if (state == GDK_SHIFT_MASK && (keyval >= GDK_a && keyval <= GDK_z))
return FALSE;