SF.net SVN: geany: [1916] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Fri Sep 28 10:54:56 UTC 2007


Revision: 1916
          http://geany.svn.sourceforge.net/geany/?rev=1916&view=rev
Author:   ntrel
Date:     2007-09-28 03:54:56 -0700 (Fri, 28 Sep 2007)

Log Message:
-----------
Also ignore Ctrl-L for VTE bash command.
Allow 'Switch to editor' command to override any bash commands.
Also disable the popup menu to avoid VTE bash conflicts.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/keybindings.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-09-27 15:10:22 UTC (rev 1915)
+++ trunk/ChangeLog	2007-09-28 10:54:56 UTC (rev 1916)
@@ -1,3 +1,11 @@
+2007-09-28  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/keybindings.c:
+   Also ignore Ctrl-L for VTE bash command.
+   Allow 'Switch to editor' command to override any bash commands.
+   Also disable the popup menu to avoid VTE bash conflicts.
+
+
 2007-09-27  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * src/keyfile.c:

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2007-09-27 15:10:22 UTC (rev 1915)
+++ trunk/src/keybindings.c	2007-09-28 10:54:56 UTC (rev 1916)
@@ -680,7 +680,7 @@
 #ifndef HAVE_VTE
 	return FALSE;
 #else
-	GtkWidget *menubar;
+	GtkWidget *widget;
 
 	if (! vte_info.have_vte)
 		return FALSE;
@@ -699,6 +699,7 @@
 		case GDK_c:
 		case GDK_d:
 		case GDK_e:
+		case GDK_l:
 		case GDK_k:
 		case GDK_q:
 		case GDK_r:
@@ -710,12 +711,20 @@
 		default:
 			return FALSE;
 	}
-	/* Temporarily disable the menubar to prevent conflicting menu accelerators.
+	if (event->state == keys[GEANY_KEYS_SWITCH_EDITOR]->mods &&
+		keyval == keys[GEANY_KEYS_SWITCH_EDITOR]->key)
+		return FALSE;	// make switch to editor override any bash commands
+
+	/* Temporarily disable the menus to prevent conflicting menu accelerators
+	 * from overriding the VTE bash shortcuts.
 	 * Ideally we would just somehow disable the menubar without redrawing it,
 	 * but maybe that's not possible. */
-	menubar = lookup_widget(app->window, "menubar1");
-	gtk_widget_set_sensitive(menubar, FALSE);
-	g_idle_add(&set_sensitive, (gpointer) menubar);
+	widget = lookup_widget(app->window, "menubar1");
+	gtk_widget_set_sensitive(widget, FALSE);
+	g_idle_add(&set_sensitive, (gpointer) widget);
+	widget = app->popup_menu;
+	gtk_widget_set_sensitive(widget, FALSE);
+	g_idle_add(&set_sensitive, (gpointer) widget);
 	return TRUE;
 #endif
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list