SF.net SVN: geany: [2158] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Jan 10 17:11:19 UTC 2008


Revision: 2158
          http://geany.svn.sourceforge.net/geany/?rev=2158&view=rev
Author:   ntrel
Date:     2008-01-10 09:11:19 -0800 (Thu, 10 Jan 2008)

Log Message:
-----------
Add 'Override Geany keybindings' VTE prefs dialog option (replaces
hidden pref), and make it off by default.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/geany.html
    trunk/doc/geany.txt
    trunk/src/keyfile.c
    trunk/src/prefs.c
    trunk/src/vte.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-01-10 13:41:58 UTC (rev 2157)
+++ trunk/ChangeLog	2008-01-10 17:11:19 UTC (rev 2158)
@@ -2,6 +2,9 @@
 
  * src/keybindings.c:
    Hopefully fix bug with Cut/Copy/Paste KB not working (#1867861).
+ * src/prefs.c, src/keyfile.c, src/vte.c, doc/geany.txt, doc/geany.html:
+   Add 'Override Geany keybindings' VTE prefs dialog option (replaces
+   hidden pref), and make it off by default.
 
 
 2008-01-09  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html	2008-01-10 13:41:58 UTC (rev 2157)
+++ trunk/doc/geany.html	2008-01-10 17:11:19 UTC (rev 2158)
@@ -3,10 +3,10 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
+<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
 <title>Geany</title>
 <meta name="authors" content="Enrico Tröger  Nick Treleaven  Frank Lanitz" />
-<meta name="date" content="2007-12-18" />
+<meta name="date" content="2008-01-06" />
 <style type="text/css">
 
 /*
@@ -133,7 +133,7 @@
 <br />Nick Treleaven
 <br />Frank Lanitz</td></tr>
 <tr><th class="docinfo-name">Date:</th>
-<td>2007-12-18</td></tr>
+<td>2008-01-06</td></tr>
 <tr><th class="docinfo-name">Version:</th>
 <td>0.13</td></tr>
 </tbody>
@@ -2667,7 +2667,7 @@
 </tr>
 </thead>
 <tbody valign="top">
-<tr><td><strong>[geany]</strong></td>
+<tr><td><strong>[editor]</strong></td>
 <td> </td>
 <td> </td>
 </tr>
@@ -2697,22 +2697,16 @@
 an existing line.</td>
 <td>false</td>
 </tr>
+<tr><td><strong>[interface]</strong></td>
+<td> </td>
+<td> </td>
+</tr>
 <tr><td>show_symbol_list_expanders</td>
 <td>Whether to show or hide the small expander
 icons on the symbol list treeview (only
 available with GTK 2.12 or above).</td>
 <td>true</td>
 </tr>
-<tr><td><strong>[VTE]</strong></td>
-<td> </td>
-<td> </td>
-</tr>
-<tr><td>enable_bash_keys</td>
-<td>Whether to allow bash shell keyboard
-shortcuts like Ctrl-W to delete the last
-word, when the VTE is focused.</td>
-<td>true</td>
-</tr>
 </tbody>
 </table>
 </div>
@@ -3232,7 +3226,7 @@
 <div class="footer">
 <hr class="footer" />
 <a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2008-01-06 18:10 UTC.
+Generated on: 2008-01-10 16:57 UTC.
 Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
 
 </div>

Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt	2008-01-10 13:41:58 UTC (rev 2157)
+++ trunk/doc/geany.txt	2008-01-10 17:11:19 UTC (rev 2158)
@@ -2428,7 +2428,7 @@
 ==============================  ============================================    ==================
 Key                             Description                                     Default
 ==============================  ============================================    ==================
-**[geany]**
+**[editor]**
 brace_match_ltgt                Whether to highlight <, > angle brackets.       false
 show_editor_scrollbars          Whether to display scrollbars when the          true
                                 editor window is bigger than the display.
@@ -2440,13 +2440,10 @@
                                 commands`_).
 auto_complete_whilst_editing    Whether to allow autocompletion when editing    false
                                 an existing line.
+**[interface]**
 show_symbol_list_expanders      Whether to show or hide the small expander      true
                                 icons on the symbol list treeview (only
                                 available with GTK 2.12 or above).
-**[VTE]**
-enable_bash_keys                Whether to allow bash shell keyboard            true
-                                shortcuts like Ctrl-W to delete the last
-                                word, when the VTE is focused.
 ==============================  ============================================    ==================
 
 

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2008-01-10 13:41:58 UTC (rev 2157)
+++ trunk/src/keyfile.c	2008-01-10 17:11:19 UTC (rev 2158)
@@ -286,6 +286,7 @@
 		g_key_file_set_string(config, "VTE", "font", vc->font);
 		g_key_file_set_boolean(config, "VTE", "scroll_on_key", vc->scroll_on_key);
 		g_key_file_set_boolean(config, "VTE", "scroll_on_out", vc->scroll_on_out);
+		g_key_file_set_boolean(config, "VTE", "enable_bash_keys", vc->enable_bash_keys);
 		g_key_file_set_boolean(config, "VTE", "ignore_menu_bar_accel", vc->ignore_menu_bar_accel);
 		g_key_file_set_boolean(config, "VTE", "follow_path", vc->follow_path);
 		g_key_file_set_boolean(config, "VTE", "run_in_vte", vc->run_in_vte);
@@ -372,10 +373,6 @@
 #if GTK_CHECK_VERSION(2, 12, 0)
 	write_hidden_pref_boolean(config, PACKAGE, "show_symbol_list_expanders", prefs.show_symbol_list_expanders);
 #endif
-#ifdef HAVE_VTE
-	if (vte_info.have_vte)
-		write_hidden_pref_boolean(config, "VTE", "enable_bash_keys", vc->enable_bash_keys);
-#endif
 }
 
 
@@ -604,11 +601,11 @@
 		vc->font = utils_get_setting_string(config, "VTE", "font", "Monospace 10");
 		vc->scroll_on_key = utils_get_setting_boolean(config, "VTE", "scroll_on_key", TRUE);
 		vc->scroll_on_out = utils_get_setting_boolean(config, "VTE", "scroll_on_out", TRUE);
+		vc->enable_bash_keys = utils_get_setting_boolean(config, "VTE", "enable_bash_keys", FALSE);
 		vc->ignore_menu_bar_accel = utils_get_setting_boolean(config, "VTE", "ignore_menu_bar_accel", FALSE);
 		vc->follow_path = utils_get_setting_boolean(config, "VTE", "follow_path", FALSE);
 		vc->run_in_vte = utils_get_setting_boolean(config, "VTE", "run_in_vte", FALSE);
 		vc->skip_run_script = utils_get_setting_boolean(config, "VTE", "skip_run_script", FALSE);
-		vc->enable_bash_keys = utils_get_setting_boolean(config, "VTE", "enable_bash_keys", TRUE);
 		vc->scrollback_lines = utils_get_setting_integer(config, "VTE", "scrollback_lines", 500);
 		vc->colour_fore = g_new0(GdkColor, 1);
 		vc->colour_back = g_new0(GdkColor, 1);

Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c	2008-01-10 13:41:58 UTC (rev 2157)
+++ trunk/src/prefs.c	2008-01-10 17:11:19 UTC (rev 2158)
@@ -525,6 +525,9 @@
 		widget = lookup_widget(ui_widgets.prefs_dialog, "check_scroll_out");
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->scroll_on_out);
 
+		widget = lookup_widget(ui_widgets.prefs_dialog, "check_enable_bash_keys");
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->enable_bash_keys);
+
 		widget = lookup_widget(ui_widgets.prefs_dialog, "check_ignore_menu_key");
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), vc->ignore_menu_bar_accel);
 
@@ -887,6 +890,9 @@
 			widget = lookup_widget(ui_widgets.prefs_dialog, "check_scroll_out");
 			vc->scroll_on_out = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
 
+			widget = lookup_widget(ui_widgets.prefs_dialog, "check_enable_bash_keys");
+			vc->enable_bash_keys = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+
 			widget = lookup_widget(ui_widgets.prefs_dialog, "check_ignore_menu_key");
 			vc->ignore_menu_bar_accel = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
 

Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c	2008-01-10 13:41:58 UTC (rev 2157)
+++ trunk/src/vte.c	2008-01-10 17:11:19 UTC (rev 2158)
@@ -234,8 +234,7 @@
 
 	g_signal_connect(G_OBJECT(vte), "child-exited", G_CALLBACK(vte_start), NULL);
 	g_signal_connect(G_OBJECT(vte), "button-press-event", G_CALLBACK(vte_button_pressed), NULL);
-	if (! vc->enable_bash_keys)
-		g_signal_connect(G_OBJECT(vte), "event", G_CALLBACK(vte_keypress), NULL);
+	g_signal_connect(G_OBJECT(vte), "event", G_CALLBACK(vte_keypress), NULL);
 	g_signal_connect(G_OBJECT(vte), "key-release-event", G_CALLBACK(vte_keyrelease), NULL);
 	g_signal_connect(G_OBJECT(vte), "commit", G_CALLBACK(vte_commit), NULL);
 	g_signal_connect(G_OBJECT(vte), "motion-notify-event", G_CALLBACK(on_motion_event), NULL);
@@ -284,7 +283,8 @@
 
 static gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	g_assert(!vc->enable_bash_keys);
+	if (vc->enable_bash_keys)
+		return FALSE;	// Ctrl-[CD] will be handled by the VTE itself
 
 	if (event->type != GDK_KEY_RELEASE)
 		return FALSE;
@@ -634,7 +634,8 @@
 	{
 		GtkWidget *notebook, *vbox, *label, *alignment, *table, *frame, *box;
 		GtkWidget *font_term, *color_fore, *color_back, *spin_scrollback, *entry_emulation;
-		GtkWidget *check_scroll_key, *check_scroll_out, *check_follow_path, *check_ignore_menu_key;
+		GtkWidget *check_scroll_key, *check_scroll_out, *check_follow_path;
+		GtkWidget *check_enable_bash_keys, *check_ignore_menu_key;
 		GtkWidget *check_run_in_vte, *check_skip_script, *entry_shell, *button_shell, *image_shell;
 		GtkTooltips *tooltips;
 		GtkObject *spin_scrollback_adj;
@@ -759,6 +760,12 @@
 		gtk_button_set_focus_on_click(GTK_BUTTON(check_scroll_out), FALSE);
 		gtk_container_add(GTK_CONTAINER(box), check_scroll_out);
 
+		check_enable_bash_keys = gtk_check_button_new_with_mnemonic(_("Override Geany keybindings"));
+		gtk_tooltips_set_tip(tooltips, check_enable_bash_keys,
+			_("Allows the VTE to receive keyboard shortcuts (apart from focus commands)."), NULL);
+		gtk_button_set_focus_on_click(GTK_BUTTON(check_enable_bash_keys), FALSE);
+		gtk_container_add(GTK_CONTAINER(box), check_enable_bash_keys);
+
 		check_ignore_menu_key = gtk_check_button_new_with_mnemonic(_("Disable menu shortcut key (F10 by default)"));
 		gtk_tooltips_set_tip(tooltips, check_ignore_menu_key, _("This option disables the keybinding to popup the menu bar (default is F10). Disabling it can be useful if you use, for example, Midnight Commander within the VTE."), NULL);
 		gtk_button_set_focus_on_click(GTK_BUTTON(check_ignore_menu_key), FALSE);
@@ -804,6 +811,8 @@
 				gtk_widget_ref(check_scroll_key),	(GDestroyNotify) gtk_widget_unref);
 		g_object_set_data_full(G_OBJECT(ui_widgets.prefs_dialog), "check_scroll_out",
 				gtk_widget_ref(check_scroll_out),	(GDestroyNotify) gtk_widget_unref);
+		g_object_set_data_full(G_OBJECT(ui_widgets.prefs_dialog), "check_enable_bash_keys",
+				gtk_widget_ref(check_enable_bash_keys),	(GDestroyNotify) gtk_widget_unref);
 		g_object_set_data_full(G_OBJECT(ui_widgets.prefs_dialog), "check_ignore_menu_key",
 				gtk_widget_ref(check_ignore_menu_key),	(GDestroyNotify) gtk_widget_unref);
 		g_object_set_data_full(G_OBJECT(ui_widgets.prefs_dialog), "check_follow_path",


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