Revision: 1929
http://geany.svn.sourceforge.net/geany/?rev=1929&view=rev
Author: ntrel
Date: 2007-10-03 04:25:28 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
Don't reset the VTE when pressing Ctrl-[CD] if bash keys are enabled,
because they are now sent to the VTE.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/vte.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-10-03 11:21:08 UTC (rev 1928)
+++ trunk/ChangeLog 2007-10-03 11:25:28 UTC (rev 1929)
@@ -3,6 +3,9 @@
* src/prefs.c:
Fix segfault when manually editing a keybinding and selecting another
item.
+ * src/vte.c:
+ Don't reset the VTE when pressing Ctrl-[CD] if bash keys are enabled,
+ because they are now sent to the VTE.
2007-10-02 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/vte.c
===================================================================
--- trunk/src/vte.c 2007-10-03 11:21:08 UTC (rev 1928)
+++ trunk/src/vte.c 2007-10-03 11:25:28 UTC (rev 1929)
@@ -240,7 +240,7 @@
static gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data)
{
- if (event->type != GDK_KEY_RELEASE)
+ if (event->type != GDK_KEY_RELEASE || vc->enable_bash_keys)
return FALSE;
if ((event->keyval == GDK_c ||
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1928
http://geany.svn.sourceforge.net/geany/?rev=1928&view=rev
Author: ntrel
Date: 2007-10-03 04:21:08 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
Fix segfault when manually editing a keybinding and selecting another
item.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/prefs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-10-02 16:20:44 UTC (rev 1927)
+++ trunk/ChangeLog 2007-10-03 11:21:08 UTC (rev 1928)
@@ -1,3 +1,10 @@
+2007-10-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/prefs.c:
+ Fix segfault when manually editing a keybinding and selecting another
+ item.
+
+
2007-10-02 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/notebook.c:
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2007-10-02 16:20:44 UTC (rev 1927)
+++ trunk/src/prefs.c 2007-10-03 11:21:08 UTC (rev 1928)
@@ -980,12 +980,12 @@
gtk_accelerator_parse(new_text, &lkey, &lmods);
+ // get index
+ gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 2, &idx, -1);
+
if (find_duplicate(idx, lkey, lmods, new_text))
return;
- // get index
- gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, 2, &idx, -1);
-
// set the values here, because of the above check, setting it in gtk_accelerator_parse would
// return a wrong key combination if it is duplicate
keys[idx]->key = lkey;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1927
http://geany.svn.sourceforge.net/geany/?rev=1927&view=rev
Author: ntrel
Date: 2007-10-02 09:20:44 -0700 (Tue, 02 Oct 2007)
Log Message:
-----------
Move and rename the bash shortcuts hidden preference - it's now in
geany.conf, [VTE] section, called 'enable_bash_keys'.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/keybindings.c
trunk/src/keyfile.c
trunk/src/vte.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-10-02 15:43:16 UTC (rev 1926)
+++ trunk/ChangeLog 2007-10-02 16:20:44 UTC (rev 1927)
@@ -4,6 +4,10 @@
Attempt to fix problem with tab close button size.
* src/keyfile.c, doc/geany.txt, doc/geany.html:
Don't overwrite hidden prefs when quitting unless they are missing.
+ * src/keybindings.c, src/keyfile.c, src/vte.h, doc/geany.txt,
+ doc/geany.html, NEWS:
+ Move and rename the bash shortcuts hidden preference - it's now in
+ geany.conf, [VTE] section, called 'enable_bash_keys'.
2007-10-01 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2007-10-02 15:43:16 UTC (rev 1926)
+++ trunk/NEWS 2007-10-02 16:20:44 UTC (rev 1927)
@@ -3,7 +3,6 @@
Bugs fixed:
* Fixed opening the same file twice from the message window/command-line.
* Fixed Ctrl-Shift keybindings not working when caps lock is on.
- * Fixed common bash Ctrl-[a-z] keyboard shortcuts not working in the VTE.
* Fixed saving the wrong document when using Save All with unnamed
documents.
* Fixed replacing with '^' or '$' regex chars.
@@ -11,6 +10,7 @@
* Fixed hang when replacing all '[ ]*' regex matches (closes #1757748).
* Fixed displaying error indicators with Make after entering a
subdirectory.
+ * Fixed a possible segfault when parsing tags (a vString bug).
Filetypes:
* Added reStructuredText filetype and parser.
@@ -26,6 +26,8 @@
* Added Class Builder plugin (thanks to Alexander Rodin).
Keyboard shorcuts:
+ * Common bash Ctrl-[a-z] keyboard shortcuts now work when the VTE is
+ focused, and there is an 'enable_bash_keys' hidden preference.
* Added 'Move document left' and 'Move document right' keybindings.
* Added Find keybinding.
* Made fixed keybindings overridable.
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2007-10-02 15:43:16 UTC (rev 1926)
+++ trunk/doc/geany.html 2007-10-02 16:20:44 UTC (rev 1927)
@@ -6,7 +6,7 @@
<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-09-28" />
+<meta name="date" content="2007-10-02" />
<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-09-28</td></tr>
+<td>2007-10-02</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.12</td></tr>
</tbody>
@@ -2512,13 +2512,13 @@
</div>
<div class="section">
<h1><a class="toc-backref" href="#id103" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h1>
-<p>There are some uncommon preferences that are not shown in the
-Preferences dialog. These can be set by editing <tt class="docutils literal"><span class="pre">~/.geany/geany.conf</span></tt>,
-then restarting Geany. Search for the key name, then edit the value. Example:</p>
+<p>There are some uncommon preferences that are not shown in the Preferences
+dialog. These can be set by editing <tt class="docutils literal"><span class="pre">~/.geany/geany.conf</span></tt>, then
+restarting Geany. Search for the key name, then edit the value. Example:</p>
<blockquote>
<tt class="docutils literal"><span class="pre">brace_match_ltgt=true</span></tt></blockquote>
-<p>The table below refers to the key names in the configuration file,
-under the <tt class="docutils literal"><span class="pre">[geany]</span></tt> group.</p>
+<p>The table below show the key names of hidden preferences in the
+configuration file.</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
@@ -2526,12 +2526,16 @@
<col width="20%" />
</colgroup>
<thead valign="bottom">
-<tr><th class="head">Option</th>
+<tr><th class="head">Key</th>
<th class="head">Description</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
+<tr><td><strong>[geany]</strong></td>
+<td> </td>
+<td> </td>
+</tr>
<tr><td>brace_match_ltgt</td>
<td>Whether to highlight <, > angle brackets.</td>
<td>false</td>
@@ -2558,6 +2562,16 @@
an existing line.</td>
<td>false</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>
@@ -3072,7 +3086,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2007-10-02 15:43 UTC.
+Generated on: 2007-10-02 16:10 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 2007-10-02 15:43:16 UTC (rev 1926)
+++ trunk/doc/geany.txt 2007-10-02 16:20:44 UTC (rev 1927)
@@ -2277,18 +2277,19 @@
Hidden preferences
==================
-There are some uncommon preferences that are not shown in the
-Preferences dialog. These can be set by editing ``~/.geany/geany.conf``,
-then restarting Geany. Search for the key name, then edit the value. Example:
+There are some uncommon preferences that are not shown in the Preferences
+dialog. These can be set by editing ``~/.geany/geany.conf``, then
+restarting Geany. Search for the key name, then edit the value. Example:
- ``brace_match_ltgt=true``
+ ``brace_match_ltgt=true``
-The table below refers to the key names in the configuration file,
-under the ``[geany]`` group.
+The table below show the key names of hidden preferences in the
+configuration file.
============================== ============================================ ==================
Key Description Default
============================== ============================================ ==================
+**[geany]**
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.
@@ -2300,6 +2301,10 @@
commands`_).
auto_complete_whilst_editing Whether to allow autocompletion when editing false
an existing line.
+**[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/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2007-10-02 15:43:16 UTC (rev 1926)
+++ trunk/src/keybindings.c 2007-10-02 16:20:44 UTC (rev 1927)
@@ -47,7 +47,6 @@
static const gboolean swap_alt_tab_order = FALSE;
-static gboolean enable_vte_bash_keys;
/* simple convenience function to allocate and fill the struct */
@@ -345,8 +344,6 @@
g_free(val);
}
}
- enable_vte_bash_keys =
- utils_get_setting_boolean(config, "Settings", "enable_vte_bash_keys", TRUE);
g_free(configfile);
g_key_file_free(config);
}
@@ -680,14 +677,12 @@
}
+#ifdef HAVE_VTE
static gboolean check_vte(GdkEventKey *event, guint keyval)
{
-#ifndef HAVE_VTE
- return FALSE;
-#else
GtkWidget *widget;
- if (! vte_info.have_vte)
+ if (! vc->enable_bash_keys)
return FALSE;
if (gtk_window_get_focus(GTK_WINDOW(app->window)) != vc->vte)
return FALSE;
@@ -731,8 +726,8 @@
gtk_widget_set_sensitive(widget, FALSE);
g_idle_add(&set_sensitive, (gpointer) widget);
return TRUE;
-#endif
}
+#endif
/* central keypress event handler, almost all keypress events go to this function */
@@ -755,8 +750,10 @@
event->state -= GDK_MOD2_MASK;
// special cases
- if (enable_vte_bash_keys && check_vte(event, keyval))
+#ifdef HAVE_VTE
+ if (vte_info.have_vte && check_vte(event, keyval))
return FALSE;
+#endif
if (check_construct_completion(event))
return TRUE;
Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c 2007-10-02 15:43:16 UTC (rev 1926)
+++ trunk/src/keyfile.c 2007-10-02 16:20:44 UTC (rev 1927)
@@ -327,6 +327,10 @@
write_hidden_pref_boolean(config, PACKAGE, "brace_match_ltgt", editor_prefs.brace_match_ltgt);
write_hidden_pref_boolean(config, PACKAGE, "use_gtk_word_boundaries", editor_prefs.use_gtk_word_boundaries);
write_hidden_pref_boolean(config, PACKAGE, "auto_complete_whilst_editing", editor_prefs.auto_complete_whilst_editing);
+#ifdef HAVE_VTE
+ if (vte_info.have_vte)
+ write_hidden_pref_boolean(config, "VTE", "enable_bash_keys", vc->enable_bash_keys);
+#endif
}
@@ -541,6 +545,7 @@
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->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/vte.h
===================================================================
--- trunk/src/vte.h 2007-10-02 15:43:16 UTC (rev 1926)
+++ trunk/src/vte.h 2007-10-02 16:20:44 UTC (rev 1927)
@@ -54,6 +54,7 @@
gboolean ignore_menu_bar_accel;
gboolean follow_path;
gboolean run_in_vte;
+ gboolean enable_bash_keys;
gint scrollback_lines;
gchar *emulation;
gchar *shell;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1926
http://geany.svn.sourceforge.net/geany/?rev=1926&view=rev
Author: ntrel
Date: 2007-10-02 08:43:16 -0700 (Tue, 02 Oct 2007)
Log Message:
-----------
Don't overwrite hidden prefs when quitting unless they are missing.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/keyfile.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-10-02 14:23:11 UTC (rev 1925)
+++ trunk/ChangeLog 2007-10-02 15:43:16 UTC (rev 1926)
@@ -2,6 +2,8 @@
* src/notebook.c:
Attempt to fix problem with tab close button size.
+ * src/keyfile.c, doc/geany.txt, doc/geany.html:
+ Don't overwrite hidden prefs when quitting unless they are missing.
2007-10-01 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2007-10-02 14:23:11 UTC (rev 1925)
+++ trunk/doc/geany.html 2007-10-02 15:43:16 UTC (rev 1926)
@@ -6,7 +6,7 @@
<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-09-13" />
+<meta name="date" content="2007-09-28" />
<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-09-13</td></tr>
+<td>2007-09-28</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.12</td></tr>
</tbody>
@@ -2513,16 +2513,10 @@
<div class="section">
<h1><a class="toc-backref" href="#id103" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h1>
<p>There are some uncommon preferences that are not shown in the
-Preferences dialog. These can be set in two ways:</p>
-<ol class="arabic simple">
-<li>By quitting all instances of Geany and using another editor to edit
-<tt class="docutils literal"><span class="pre">~/.geany/geany.conf</span></tt>.</li>
-<li>By using Geany to edit <tt class="docutils literal"><span class="pre">~/.geany/geany.conf</span></tt>, then after saving
-the file, start a second instance of Geany, and the new settings
-will be used. Make sure to then quit the first instance.</li>
-</ol>
-<p>Otherwise, the configuration file changes are overwritten when Geany
-is closed.</p>
+Preferences dialog. These can be set by editing <tt class="docutils literal"><span class="pre">~/.geany/geany.conf</span></tt>,
+then restarting Geany. Search for the key name, then edit the value. Example:</p>
+<blockquote>
+<tt class="docutils literal"><span class="pre">brace_match_ltgt=true</span></tt></blockquote>
<p>The table below refers to the key names in the configuration file,
under the <tt class="docutils literal"><span class="pre">[geany]</span></tt> group.</p>
<table border="1" class="docutils">
@@ -3078,7 +3072,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2007-09-28 15:47 UTC.
+Generated on: 2007-10-02 15:43 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 2007-10-02 14:23:11 UTC (rev 1925)
+++ trunk/doc/geany.txt 2007-10-02 15:43:16 UTC (rev 1926)
@@ -2278,22 +2278,16 @@
==================
There are some uncommon preferences that are not shown in the
-Preferences dialog. These can be set in two ways:
+Preferences dialog. These can be set by editing ``~/.geany/geany.conf``,
+then restarting Geany. Search for the key name, then edit the value. Example:
-1. By quitting all instances of Geany and using another editor to edit
- ``~/.geany/geany.conf``.
-2. By using Geany to edit ``~/.geany/geany.conf``, then after saving
- the file, start a second instance of Geany, and the new settings
- will be used. Make sure to then quit the first instance.
+ ``brace_match_ltgt=true``
-Otherwise, the configuration file changes are overwritten when Geany
-is closed.
-
The table below refers to the key names in the configuration file,
under the ``[geany]`` group.
============================== ============================================ ==================
-Option Description Default
+Key Description Default
============================== ============================================ ==================
brace_match_ltgt Whether to highlight <, > angle brackets. false
show_editor_scrollbars Whether to display scrollbars when the true
Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c 2007-10-02 14:23:11 UTC (rev 1925)
+++ trunk/src/keyfile.c 2007-10-02 15:43:16 UTC (rev 1926)
@@ -175,7 +175,6 @@
g_key_file_set_boolean(config, PACKAGE, "show_line_endings", editor_prefs.show_line_endings);
g_key_file_set_boolean(config, PACKAGE, "show_markers_margin", editor_prefs.show_markers_margin);
g_key_file_set_boolean(config, PACKAGE, "show_linenumber_margin", editor_prefs.show_linenumber_margin);
- g_key_file_set_boolean(config, PACKAGE, "show_editor_scrollbars", editor_prefs.show_scrollbars);
g_key_file_set_integer(config, PACKAGE, "long_line_type", editor_prefs.long_line_type);
g_key_file_set_integer(config, PACKAGE, "long_line_column", editor_prefs.long_line_column);
g_key_file_set_string(config, PACKAGE, "long_line_color", editor_prefs.long_line_color);
@@ -185,10 +184,8 @@
g_key_file_set_boolean(config, PACKAGE, "use_folding", editor_prefs.folding);
g_key_file_set_boolean(config, PACKAGE, "unfold_all_children", editor_prefs.unfold_all_children);
g_key_file_set_integer(config, PACKAGE, "indent_mode", editor_prefs.indent_mode);
- g_key_file_set_boolean(config, PACKAGE, "use_tab_to_indent", editor_prefs.use_tab_to_indent);
g_key_file_set_boolean(config, PACKAGE, "use_indicators", editor_prefs.use_indicators);
g_key_file_set_boolean(config, PACKAGE, "line_breaking", editor_prefs.line_wrapping);
- g_key_file_set_boolean(config, PACKAGE, "brace_match_ltgt", editor_prefs.brace_match_ltgt);
g_key_file_set_boolean(config, PACKAGE, "auto_close_xml_tags", editor_prefs.auto_close_xml_tags);
g_key_file_set_boolean(config, PACKAGE, "auto_complete_constructs", editor_prefs.auto_complete_constructs);
g_key_file_set_boolean(config, PACKAGE, "auto_complete_symbols", editor_prefs.auto_complete_symbols);
@@ -196,8 +193,6 @@
g_key_file_set_boolean(config, PACKAGE, "pref_editor_use_tabs", editor_prefs.use_tabs);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_disable_dnd", editor_prefs.disable_dnd);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_smart_home_key", editor_prefs.smart_home_key);
- g_key_file_set_boolean(config, PACKAGE, "use_gtk_word_boundaries", editor_prefs.use_gtk_word_boundaries);
- g_key_file_set_boolean(config, PACKAGE, "auto_complete_whilst_editing", editor_prefs.auto_complete_whilst_editing);
// files
g_key_file_set_string(config, PACKAGE, "pref_editor_default_new_encoding", encodings[prefs.default_new_encoding].charset);
@@ -320,6 +315,21 @@
}
+// hidden prefs (don't overwrite them so users can edit them manually)
+#define write_hidden_pref_boolean(conf, pkg, key, val) \
+ if (! g_key_file_has_key((conf), (pkg), (key), NULL)) \
+ g_key_file_set_boolean((conf), (pkg), (key), (val));
+
+static void save_hidden_prefs(GKeyFile *config)
+{
+ write_hidden_pref_boolean(config, PACKAGE, "show_editor_scrollbars", editor_prefs.show_scrollbars);
+ write_hidden_pref_boolean(config, PACKAGE, "use_tab_to_indent", editor_prefs.use_tab_to_indent);
+ write_hidden_pref_boolean(config, PACKAGE, "brace_match_ltgt", editor_prefs.brace_match_ltgt);
+ write_hidden_pref_boolean(config, PACKAGE, "use_gtk_word_boundaries", editor_prefs.use_gtk_word_boundaries);
+ write_hidden_pref_boolean(config, PACKAGE, "auto_complete_whilst_editing", editor_prefs.auto_complete_whilst_editing);
+}
+
+
void configuration_save()
{
GKeyFile *config = g_key_file_new();
@@ -329,6 +339,7 @@
g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE, NULL);
save_dialog_prefs(config);
+ save_hidden_prefs(config);
save_ui_prefs(config);
project_save_prefs(config); // save project filename, etc.
save_recent_files(config);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.