Revision: 3176
http://geany.svn.sourceforge.net/geany/?rev=3176&view=rev
Author: ntrel
Date: 2008-11-05 16:25:49 +0000 (Wed, 05 Nov 2008)
Log Message:
-----------
Clarify that if patches don't follow existing code style, we'll have to manually reformat them ourselves.
Modified Paths:
--------------
trunk/HACKING
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2008-11-05 16:18:52 UTC (rev 3175)
+++ trunk/HACKING 2008-11-05 16:25:49 UTC (rev 3176)
@@ -146,8 +146,8 @@
* We don't put spaces between function names and the opening brace for
argument lists.
* Try to fit in with the existing code brace indenting style, comments,
- operator spacing etc. It's not required but it makes our lives easier
- ;-)
+ operator spacing etc. It's not required for patches but it will save
+ us having to manually reformat them.
Libraries
---------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3174
http://geany.svn.sourceforge.net/geany/?rev=3174&view=rev
Author: ntrel
Date: 2008-11-05 12:58:53 +0000 (Wed, 05 Nov 2008)
Log Message:
-----------
Fix sorting tags with missing parents by line if the names and
scopes are identical.
Modified Paths:
--------------
branches/symbol-tree/ChangeLog
branches/symbol-tree/src/symbols.c
Modified: branches/symbol-tree/ChangeLog
===================================================================
--- branches/symbol-tree/ChangeLog 2008-11-05 12:50:29 UTC (rev 3173)
+++ branches/symbol-tree/ChangeLog 2008-11-05 12:58:53 UTC (rev 3174)
@@ -2,6 +2,9 @@
* src/symbols.c:
Replace macro with static function.
+ * src/symbols.c:
+ Fix sorting tags with missing parents by line if the names and
+ scopes are identical.
2008-11-04 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/symbol-tree/src/symbols.c
===================================================================
--- branches/symbol-tree/src/symbols.c 2008-11-05 12:50:29 UTC (rev 3173)
+++ branches/symbol-tree/src/symbols.c 2008-11-05 12:58:53 UTC (rev 3174)
@@ -1105,8 +1105,11 @@
cmp = strcmp(astr, bstr);
/* sort duplicate 'ScopeName::OverloadedTagName' items by line as well */
- if ((!sort_by_name || cmp == 0) && tag_a && tag_b)
- cmp = compare_symbol_lines(tag_a, tag_b);
+ if (tag_a && tag_b)
+ if (!sort_by_name ||
+ (utils_str_equal(tag_a->name, tag_b->name) &&
+ utils_str_equal(tag_a->atts.entry.scope, tag_b->atts.entry.scope)))
+ cmp = compare_symbol_lines(tag_a, tag_b);
}
g_free(astr);
g_free(bstr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3173
http://geany.svn.sourceforge.net/geany/?rev=3173&view=rev
Author: ntrel
Date: 2008-11-05 12:50:29 +0000 (Wed, 05 Nov 2008)
Log Message:
-----------
Replace macro with static function.
Modified Paths:
--------------
branches/symbol-tree/ChangeLog
branches/symbol-tree/src/symbols.c
Modified: branches/symbol-tree/ChangeLog
===================================================================
--- branches/symbol-tree/ChangeLog 2008-11-04 18:14:04 UTC (rev 3172)
+++ branches/symbol-tree/ChangeLog 2008-11-05 12:50:29 UTC (rev 3173)
@@ -1,3 +1,9 @@
+2008-11-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/symbols.c:
+ Replace macro with static function.
+
+
2008-11-04 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/symbols.c:
Modified: branches/symbol-tree/src/symbols.c
===================================================================
--- branches/symbol-tree/src/symbols.c 2008-11-04 18:14:04 UTC (rev 3172)
+++ branches/symbol-tree/src/symbols.c 2008-11-05 12:50:29 UTC (rev 3173)
@@ -1061,12 +1061,13 @@
}
-/* Whether iters can be sorted based on tag name and line, not scope.
- * If the scope was prepended, e.g. 'ScopeNameWithNoTag::TagName', this returns FALSE */
-#define tag_is_name_sortable(tag, iter) \
- ((tag) && \
- (!NZV((tag)->atts.entry.scope) || \
- gtk_tree_store_iter_depth(GTK_TREE_STORE(model), (iter)) > 1))
+static gboolean tag_has_missing_parent(const TMTag *tag, GtkTreeStore *store,
+ GtkTreeIter *iter)
+{
+ /* if the tag has a parent tag, it should be at depth >= 2 */
+ return NZV(tag->atts.entry.scope) &&
+ gtk_tree_store_iter_depth(store, iter) == 1;
+}
static gint tree_sort_func(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b,
@@ -1078,8 +1079,10 @@
gtk_tree_model_get(model, a, SYMBOLS_COLUMN_TAG, &tag_a, -1);
gtk_tree_model_get(model, b, SYMBOLS_COLUMN_TAG, &tag_b, -1);
- if (tag_is_name_sortable(tag_a, a) &&
- tag_is_name_sortable(tag_b, b))
+ /* Check if the iters can be sorted based on tag name and line, not tree item name.
+ * Sort by tree name if the scope was prepended, e.g. 'ScopeNameWithNoTag::TagName'. */
+ if (tag_a && !tag_has_missing_parent(tag_a, GTK_TREE_STORE(model), a) &&
+ tag_b && !tag_has_missing_parent(tag_b, GTK_TREE_STORE(model), b))
{
return sort_by_name ? compare_symbol(tag_a, tag_b) :
compare_symbol_lines(tag_a, tag_b);
@@ -1103,7 +1106,7 @@
/* sort duplicate 'ScopeName::OverloadedTagName' items by line as well */
if ((!sort_by_name || cmp == 0) && tag_a && tag_b)
- cmp = tag_a->atts.entry.line - tag_b->atts.entry.line;
+ cmp = compare_symbol_lines(tag_a, tag_b);
}
g_free(astr);
g_free(bstr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3172
http://geany.svn.sourceforge.net/geany/?rev=3172&view=rev
Author: ntrel
Date: 2008-11-04 18:14:04 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
Fix sorting tags whose scope name doesn't have a tag (e.g. for C++
source file methods with class definition in a header file).
Modified Paths:
--------------
branches/symbol-tree/ChangeLog
branches/symbol-tree/src/symbols.c
Modified: branches/symbol-tree/ChangeLog
===================================================================
--- branches/symbol-tree/ChangeLog 2008-11-04 13:43:30 UTC (rev 3171)
+++ branches/symbol-tree/ChangeLog 2008-11-04 18:14:04 UTC (rev 3172)
@@ -1,3 +1,10 @@
+2008-11-04 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/symbols.c:
+ Fix sorting tags whose scope name doesn't have a tag (e.g. for C++
+ source file methods with class definition in a header file).
+
+
2008-11-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* treeviews.c, treeviews.h, symbols.c:
Modified: branches/symbol-tree/src/symbols.c
===================================================================
--- branches/symbol-tree/src/symbols.c 2008-11-04 13:43:30 UTC (rev 3171)
+++ branches/symbol-tree/src/symbols.c 2008-11-04 18:14:04 UTC (rev 3172)
@@ -1061,6 +1061,14 @@
}
+/* Whether iters can be sorted based on tag name and line, not scope.
+ * If the scope was prepended, e.g. 'ScopeNameWithNoTag::TagName', this returns FALSE */
+#define tag_is_name_sortable(tag, iter) \
+ ((tag) && \
+ (!NZV((tag)->atts.entry.scope) || \
+ gtk_tree_store_iter_depth(GTK_TREE_STORE(model), (iter)) > 1))
+
+
static gint tree_sort_func(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b,
gpointer user_data)
{
@@ -1070,7 +1078,8 @@
gtk_tree_model_get(model, a, SYMBOLS_COLUMN_TAG, &tag_a, -1);
gtk_tree_model_get(model, b, SYMBOLS_COLUMN_TAG, &tag_b, -1);
- if (tag_a && tag_b)
+ if (tag_is_name_sortable(tag_a, a) &&
+ tag_is_name_sortable(tag_b, b))
{
return sort_by_name ? compare_symbol(tag_a, tag_b) :
compare_symbol_lines(tag_a, tag_b);
@@ -1085,10 +1094,17 @@
/* if a is toplevel, b must be also */
if (gtk_tree_store_iter_depth(GTK_TREE_STORE(model), a) == 0)
+ {
cmp = compare_top_level_names(astr, bstr);
+ }
else
+ {
cmp = strcmp(astr, bstr);
+ /* sort duplicate 'ScopeName::OverloadedTagName' items by line as well */
+ if ((!sort_by_name || cmp == 0) && tag_a && tag_b)
+ cmp = tag_a->atts.entry.line - tag_b->atts.entry.line;
+ }
g_free(astr);
g_free(bstr);
return cmp;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3170
http://geany.svn.sourceforge.net/geany/?rev=3170&view=rev
Author: ntrel
Date: 2008-11-04 13:33:08 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
Fix Prefs dialog Tools tab Context Action open button showing the
file dialog twice.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/prefs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-04 13:05:15 UTC (rev 3169)
+++ trunk/ChangeLog 2008-11-04 13:33:08 UTC (rev 3170)
@@ -3,7 +3,11 @@
* src/editor.c:
Fix snippets and smart indent using too much indentation when the
line contains whitespace after non-whitespace characters. This
- might also have affected other features (auto table, etc).
+ might also have affected other features (auto table, etc). (Fixes
+ #2215044).
+ * src/prefs.c:
+ Fix Prefs dialog Tools tab Context Action open button showing the
+ file dialog twice.
2008-11-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2008-11-04 13:05:15 UTC (rev 3169)
+++ trunk/src/prefs.c 2008-11-04 13:33:08 UTC (rev 3170)
@@ -1659,8 +1659,6 @@
/* tools commands */
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_contextaction"),
"clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"));
- g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_contextaction"),
- "clicked", G_CALLBACK(on_prefs_tools_button_clicked), lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"));
/* printing */
g_signal_connect(lookup_widget(ui_widgets.prefs_dialog, "button_print_external_cmd"),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3169
http://geany.svn.sourceforge.net/geany/?rev=3169&view=rev
Author: ntrel
Date: 2008-11-04 13:05:15 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
Fix snippets and smart indent using too much indentation when the
line contains whitespace after non-whitespace characters. This
might also have affected other features (auto table, etc).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-03 18:45:47 UTC (rev 3168)
+++ trunk/ChangeLog 2008-11-04 13:05:15 UTC (rev 3169)
@@ -1,3 +1,11 @@
+2008-11-04 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/editor.c:
+ Fix snippets and smart indent using too much indentation when the
+ line contains whitespace after non-whitespace characters. This
+ might also have affected other features (auto table, etc).
+
+
2008-11-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/callbacks.c:
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2008-11-03 18:45:47 UTC (rev 3168)
+++ trunk/src/editor.c 2008-11-04 13:05:15 UTC (rev 3169)
@@ -901,7 +901,6 @@
guint i, len, j = 0;
gint line;
gchar *linebuf;
- const GeanyIndentPrefs *iprefs = editor_get_indent_prefs(editor);
line = sci_get_line_from_position(sci, pos);
@@ -912,7 +911,7 @@
{
if (linebuf[i] == ' ' || linebuf[i] == '\t') /* simple indentation */
indent[j++] = linebuf[i];
- else if (iprefs->auto_indent_mode <= GEANY_AUTOINDENT_BASIC)
+ else
break;
}
indent[j] = '\0';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.