Make VTE copy/paste shortcuts work if 'Override Geany

keybindings' is not set.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5624 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2011-03-24 17:59:05 +00:00
parent e3d3765ae6
commit ff7d6b9cad
2 changed files with 6 additions and 3 deletions

View File

@ -5,6 +5,9 @@
* src/keybindings.c, src/vte.c: * src/keybindings.c, src/vte.c:
Add fixed shortcuts for VTE copy (Ctrl-Shift-C) and paste Add fixed shortcuts for VTE copy (Ctrl-Shift-C) and paste
(Ctrl-Shift-V). (Ctrl-Shift-V).
* src/keybindings.c:
Make VTE copy/paste shortcuts work if 'Override Geany
keybindings' is not set.
2011-03-24 Colomban Wendling <colomban(at)geany(dot)org> 2011-03-24 Colomban Wendling <colomban(at)geany(dot)org>

View File

@ -1074,6 +1074,9 @@ static gboolean check_vte(GdkModifierType state, guint keyval)
GeanyKeyGroup *group; GeanyKeyGroup *group;
GtkWidget *widget; GtkWidget *widget;
/* 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) if (! vc->enable_bash_keys)
return FALSE; return FALSE;
if (gtk_window_get_focus(GTK_WINDOW(main_widgets.window)) != vc->vte) if (gtk_window_get_focus(GTK_WINDOW(main_widgets.window)) != vc->vte)
@ -1083,9 +1086,6 @@ static gboolean check_vte(GdkModifierType state, guint keyval)
return FALSE; return FALSE;
if (state == 0 && (keyval < GDK_F1 || keyval > GDK_F35)) /* e.g. backspace */ if (state == 0 && (keyval < GDK_F1 || keyval > GDK_F35)) /* e.g. backspace */
return FALSE; 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;
/* make focus commands override any bash commands */ /* make focus commands override any bash commands */
group = g_ptr_array_index(keybinding_groups, GEANY_KEY_GROUP_FOCUS); group = g_ptr_array_index(keybinding_groups, GEANY_KEY_GROUP_FOCUS);