Fix Ctrl-Click on notebook tab if Numpad is active.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4831 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2010-04-18 21:42:12 +00:00
parent 7eacc365f9
commit d84a498ff7
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,8 @@
Another attempt to fix the PHP parser regexp for parsing functions.
Fix wrong parsing of function arguments when those contain nested
brackets (as reported by Harold Aling).
* src/notebook.c:
Fix Ctrl-Click on notebook tab if Numpad is active.
2010-04-11 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -421,6 +421,8 @@ static void tab_count_changed(void)
static gboolean notebook_tab_click(GtkWidget *widget, GdkEventButton *event, gpointer data)
{
guint state;
/* toggle additional widgets on double click */
if (event->type == GDK_2BUTTON_PRESS)
{
@ -437,7 +439,8 @@ static gboolean notebook_tab_click(GtkWidget *widget, GdkEventButton *event, gpo
return TRUE; /* stop other handlers like notebook_tab_bar_click_cb() */
}
/* switch last used tab on ctrl-click */
if (event->button == 1 && event->state == GDK_CONTROL_MASK)
state = event->state & gtk_accelerator_get_default_mod_mask();
if (event->button == 1 && state == GDK_CONTROL_MASK)
{
keybindings_send_command(GEANY_KEY_GROUP_NOTEBOOK,
GEANY_KEYS_NOTEBOOK_SWITCHTABLASTUSED);