SF.net SVN: geany: [2054] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sun Nov 18 15:09:28 UTC 2007
Revision: 2054
http://geany.svn.sourceforge.net/geany/?rev=2054&view=rev
Author: eht16
Date: 2007-11-18 07:09:28 -0800 (Sun, 18 Nov 2007)
Log Message:
-----------
Add hidden pref to hide symbol list treeview expander (GTK >= 2.12).
Double click on symbol list sections now expands/collapses them.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/keyfile.c
trunk/src/plugindata.h
trunk/src/prefs.h
trunk/src/treeviews.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-17 19:27:50 UTC (rev 2053)
+++ trunk/ChangeLog 2007-11-18 15:09:28 UTC (rev 2054)
@@ -1,3 +1,11 @@
+2007-11-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * doc/geany.html, doc/geany.txt, src/keyfile.c, src/plugindata.h,
+ src/prefs.h, src/treeviews.c:
+ Add hidden pref to hide symbol list treeview expander (GTK >= 2.12).
+ Double click on symbol list sections now expands/collapses them.
+
+
2007-11-17 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/templates.c, src/utils.c, src/utils.h:
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2007-11-17 19:27:50 UTC (rev 2053)
+++ trunk/doc/geany.html 2007-11-18 15:09:28 UTC (rev 2054)
@@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
-<meta name="date" content="2007-11-12" />
+<meta name="date" content="2007-11-17" />
<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-11-12</td></tr>
+<td>2007-11-17</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.13</td></tr>
</tbody>
@@ -1499,7 +1499,8 @@
<pre class="literal-block">
gtk-print-preview-command = "epdfview %f"
</pre>
-<p>at the end of the file. Of course, you can also use xpdf, kpdf or whatever.</p>
+<p>at the end of the file. Of course, you can also use xpdf, kpdf or whatever
+as the print preview command.</p>
<p>Unfortunately, native GTK printing support is only available if Geany was
built against GTK 2.10 (or above) <strong>and</strong> is running with GTK 2.10 (or above).
If not, Geany provides basic printing support. This means you can print a
@@ -2603,6 +2604,12 @@
an existing line.</td>
<td>false</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>
@@ -3127,7 +3134,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2007-11-17 13:39 UTC.
+Generated on: 2007-11-18 15:02 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-11-17 19:27:50 UTC (rev 2053)
+++ trunk/doc/geany.txt 2007-11-18 15:09:28 UTC (rev 2054)
@@ -2349,6 +2349,9 @@
commands`_).
auto_complete_whilst_editing Whether to allow autocompletion when editing false
an existing line.
+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
Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c 2007-11-17 19:27:50 UTC (rev 2053)
+++ trunk/src/keyfile.c 2007-11-18 15:09:28 UTC (rev 2054)
@@ -339,6 +339,9 @@
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);
+#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);
@@ -459,6 +462,9 @@
prefs.editor_font = utils_get_setting_string(config, PACKAGE, "editor_font", GEANY_DEFAULT_FONT_EDITOR);
prefs.tagbar_font = utils_get_setting_string(config, PACKAGE, "tagbar_font", GEANY_DEFAULT_FONT_SYMBOL_LIST);
prefs.msgwin_font = utils_get_setting_string(config, PACKAGE, "msgwin_font", GEANY_DEFAULT_FONT_MSG_WINDOW);
+#if GTK_CHECK_VERSION(2, 12, 0)
+ prefs.show_symbol_list_expanders = utils_get_setting_boolean(config, PACKAGE, "show_symbol_list_expanders", TRUE);
+#endif
// display, editor
editor_prefs.long_line_type = utils_get_setting_integer(config, PACKAGE, "long_line_type", 0);
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2007-11-17 19:27:50 UTC (rev 2053)
+++ trunk/src/plugindata.h 2007-11-18 15:09:28 UTC (rev 2054)
@@ -71,12 +71,12 @@
/* The API version should be incremented whenever any plugin data types below are
* modified or appended to. */
-static const gint api_version = 29;
+static const gint api_version = 30;
/* The ABI version should be incremented whenever existing fields in the plugin
* data types below have to be changed or reordered. It should stay the same if fields
* are only appended, as this doesn't affect existing fields. */
-static const gint abi_version = 14;
+static const gint abi_version = 15;
/* This performs runtime checks that try to ensure:
* 1. Geany ABI data types are compatible with this plugin.
Modified: trunk/src/prefs.h
===================================================================
--- trunk/src/prefs.h 2007-11-17 19:27:50 UTC (rev 2053)
+++ trunk/src/prefs.h 2007-11-18 15:09:28 UTC (rev 2054)
@@ -53,6 +53,7 @@
gint tab_pos_msgwin;
gint tab_pos_sidebar;
gboolean statusbar_visible;
+ gboolean show_symbol_list_expanders;
/* toolbar */
gboolean toolbar_visible;
@@ -82,7 +83,6 @@
gchar *tools_browser_cmd;
gchar *tools_make_cmd;
gchar *tools_term_cmd;
- gchar *tools_print_cmd; /// TODO unused: remove this at next abi_verison change
gchar *tools_grep_cmd;
gchar *context_action_cmd;
Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c 2007-11-17 19:27:50 UTC (rev 2053)
+++ trunk/src/treeviews.c 2007-11-18 15:09:28 UTC (rev 2054)
@@ -120,6 +120,10 @@
gtk_tree_view_set_enable_search(GTK_TREE_VIEW(tree), FALSE);
+#if GTK_CHECK_VERSION(2, 12, 0)
+ gtk_tree_view_set_show_expanders(GTK_TREE_VIEW(tree), prefs.show_symbol_list_expanders);
+#endif
+
// selection handling
select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree));
gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE);
@@ -643,17 +647,39 @@
static gboolean on_treeviews_button_press_event(GtkWidget *widget, GdkEventButton *event,
- gpointer user_data)
+ gpointer user_data)
{
- if (event->button == 1 && GPOINTER_TO_INT(user_data) == TREEVIEW_SYMBOL)
- { // allow reclicking of taglist treeview item
+ if (event->type == GDK_2BUTTON_PRESS && GPOINTER_TO_INT(user_data) == TREEVIEW_SYMBOL)
+ { // double click on parent node(section) expands/collapses it
+ GtkTreeModel *model;
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+
+ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
+ if (gtk_tree_selection_get_selected(selection, &model, &iter))
+ {
+ if (gtk_tree_model_iter_has_child(model, &iter))
+ {
+ GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
+
+ if (gtk_tree_view_row_expanded(GTK_TREE_VIEW(widget), path))
+ gtk_tree_view_collapse_row(GTK_TREE_VIEW(widget), path);
+ else
+ gtk_tree_view_expand_row(GTK_TREE_VIEW(widget), path, FALSE);
+
+ gtk_tree_path_free(path);
+ return TRUE;
+ }
+ }
+ }
+ else if (event->button == 1 && GPOINTER_TO_INT(user_data) == TREEVIEW_SYMBOL)
+ { // allow reclicking of taglist treeview item
GtkTreeSelection *select = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
// delay the query of selection state because this callback is executed before GTK
// changes the selection (g_signal_connect_after would be better but it doesn't work)
g_idle_add((GSourceFunc) on_taglist_tree_selection_changed, select);
}
-
- if (event->button == 3)
+ else if (event->button == 3)
{ // popupmenu to hide or clear the active treeview
if (GPOINTER_TO_INT(user_data) == TREEVIEW_OPENFILES)
{
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