Revision: 1254
http://svn.sourceforge.net/geany/?rev=1254&view=rev
Author: ntrel
Date: 2007-02-07 04:44:37 -0800 (Wed, 07 Feb 2007)
Log Message:
-----------
Fixed autocompletion missing tag matches.
Modified Paths:
--------------
branches/geany-0.10.1/NEWS
branches/geany-0.10.1/tagmanager/include/tm_tag.h
branches/geany-0.10.1/tagmanager/tm_tag.c
Modified: branches/geany-0.10.1/NEWS
===================================================================
--- branches/geany-0.10.1/NEWS 2007-02-07 12:28:09 UTC (rev 1253)
+++ branches/geany-0.10.1/NEWS 2007-02-07 12:44:37 UTC (rev 1254)
@@ -3,8 +3,9 @@
Bugs fixed:
* Wrong tab foreground colour for unmodified documents.
* Fixed crashes when closing dialogs by clicking X on some systems.
- * Fix missing global tags for C files when a C++ source file was
+ * Fixed missing global tags for C files when a C++ source file was
loaded first.
+ * Fixed autocompletion missing tag matches.
Geany 0.10 (December 21, 2006)
Modified: branches/geany-0.10.1/tagmanager/include/tm_tag.h
===================================================================
--- branches/geany-0.10.1/tagmanager/include/tm_tag.h 2007-02-07 12:28:09 UTC (rev 1253)
+++ branches/geany-0.10.1/tagmanager/include/tm_tag.h 2007-02-07 12:44:37 UTC (rev 1254)
@@ -281,7 +281,8 @@
\param name Name of the tag to locate.
\param partial If TRUE, matches the first part of the name instead of doing exact match.
*/
-TMTag **tm_tags_find(GPtrArray *sorted_tags_array, const char *name, gboolean partial, int * tagCount);
+TMTag **tm_tags_find(const GPtrArray *sorted_tags_array, const char *name,
+ gboolean partial, int * tagCount);
/*!
Completely frees an array of tags.
Modified: branches/geany-0.10.1/tagmanager/tm_tag.c
===================================================================
--- branches/geany-0.10.1/tagmanager/tm_tag.c 2007-02-07 12:28:09 UTC (rev 1253)
+++ branches/geany-0.10.1/tagmanager/tm_tag.c 2007-02-07 12:44:37 UTC (rev 1254)
@@ -562,7 +562,8 @@
}
}
-TMTag **tm_tags_find(GPtrArray *sorted_tags_array, const char *name, gboolean partial, int * tagCount)
+TMTag **tm_tags_find(const GPtrArray *sorted_tags_array, const char *name,
+ gboolean partial, int * tagCount)
{
static TMTag *tag = NULL;
TMTag **result;
@@ -578,15 +579,30 @@
s_partial = partial;
result = (TMTag **) bsearch(&tag, sorted_tags_array->pdata, sorted_tags_array->len
, sizeof(gpointer), tm_tag_compare);
+ // there can be matches on both sides of result
if (result)
{
- for (; result >= (TMTag **) sorted_tags_array->pdata; -- result) {
+ TMTag **last = (TMTag **) &sorted_tags_array->pdata[sorted_tags_array->len - 1];
+ TMTag **adv;
+
+ // First look for any matches after result
+ adv = result;
+ adv++;
+ for (; *adv && adv <= last; ++ adv)
+ {
+ if (0 != tm_tag_compare(&tag, adv))
+ break;
+ ++tagMatches;
+ }
+ // Now look for matches from result and below
+ for (; result >= (TMTag **) sorted_tags_array->pdata; -- result)
+ {
if (0 != tm_tag_compare(&tag, (TMTag **) result))
break;
++tagMatches;
}
*tagCount=tagMatches;
- ++ result;
+ ++ result; // correct address for the last successful match
}
s_partial = FALSE;
return (TMTag **) result;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1251
http://svn.sourceforge.net/geany/?rev=1251&view=rev
Author: ntrel
Date: 2007-02-06 09:15:44 -0800 (Tue, 06 Feb 2007)
Log Message:
-----------
Fix wrong tab foreground colour for unmodified documents.
Modified Paths:
--------------
branches/geany-0.10.1/NEWS
branches/geany-0.10.1/src/ui_utils.c
Modified: branches/geany-0.10.1/NEWS
===================================================================
--- branches/geany-0.10.1/NEWS 2007-02-06 16:13:57 UTC (rev 1250)
+++ branches/geany-0.10.1/NEWS 2007-02-06 17:15:44 UTC (rev 1251)
@@ -1,3 +1,9 @@
+Geany 0.10.1 (TBA)
+
+ Bugs fixed:
+ * Wrong tab foreground colour for unmodified documents.
+
+
Geany 0.10 (December 21, 2006)
Changes:
Modified: branches/geany-0.10.1/src/ui_utils.c
===================================================================
--- branches/geany-0.10.1/src/ui_utils.c 2007-02-06 16:13:57 UTC (rev 1250)
+++ branches/geany-0.10.1/src/ui_utils.c 2007-02-06 17:15:44 UTC (rev 1251)
@@ -1,8 +1,8 @@
/*
* ui_utils.c - this file is part of Geany, a fast and lightweight IDE
*
- * Copyright 2006 Enrico Troeger <enrico.troeger(a)uvena.de>
- * Copyright 2006 Nick Treleaven <nick.treleaven(a)btinternet.com>
+ * Copyright 2006-2007 Enrico Troeger <enrico.troeger(a)uvena.de>
+ * Copyright 2006-2007 Nick Treleaven <nick.treleaven(a)btinternet.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1179,16 +1179,13 @@
void ui_update_tab_status(gint idx)
{
GdkColor *color = document_get_status(idx);
- static GtkStyle *style = NULL;
- if (style == NULL) // use and store default foreground colour
- style = gtk_rc_get_style(doc_list[idx].tab_label);
+ // NULL color will reset to default
+ gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_NORMAL, color);
+ gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_ACTIVE, color);
+ gtk_widget_modify_fg(doc_list[idx].tabmenu_label, GTK_STATE_NORMAL, color);
+ gtk_widget_modify_fg(doc_list[idx].tabmenu_label, GTK_STATE_ACTIVE, color);
- gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_NORMAL,
- color ? color : &(style->fg[GTK_STATE_NORMAL]));
- gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_ACTIVE,
- color ? color : &(style->fg[GTK_STATE_ACTIVE]));
-
treeviews_openfiles_update(idx);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1248
http://svn.sourceforge.net/geany/?rev=1248&view=rev
Author: ntrel
Date: 2007-02-05 07:40:33 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
Prevent right click in Symbol list from selecting a tag.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/treeviews.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-02-03 17:49:03 UTC (rev 1247)
+++ trunk/ChangeLog 2007-02-05 15:40:33 UTC (rev 1248)
@@ -1,3 +1,9 @@
+2007-02-05 Nick Treleaven <nick.treleaven(a)btinternet.com>
+
+ * src/treeviews.c:
+ Prevent right click in Symbol list from selecting a tag.
+
+
2007-02-03 Nick Treleaven <nick.treleaven(a)btinternet.com>
* src/document.c:
Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c 2007-02-03 17:49:03 UTC (rev 1247)
+++ trunk/src/treeviews.c 2007-02-05 15:40:33 UTC (rev 1248)
@@ -413,8 +413,11 @@
gtk_menu_popup(GTK_MENU(tv.popup_openfiles), NULL, NULL, NULL, NULL,
event->button, event->time);
else if (GPOINTER_TO_INT(user_data) == TREEVIEW_SYMBOL)
+ {
gtk_menu_popup(GTK_MENU(tv.popup_taglist), NULL, NULL, NULL, NULL,
event->button, event->time);
+ return TRUE; // prevent selection changed signal for symbol tags
+ }
}
return FALSE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1247
http://svn.sourceforge.net/geany/?rev=1247&view=rev
Author: ntrel
Date: 2007-02-03 09:49:03 -0800 (Sat, 03 Feb 2007)
Log Message:
-----------
Add missing NULL terminator (oops).
Modified Paths:
--------------
trunk/src/build.c
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2007-02-03 17:38:49 UTC (rev 1246)
+++ trunk/src/build.c 2007-02-03 17:49:03 UTC (rev 1247)
@@ -339,7 +339,7 @@
{
msgwin_status_add(_("Command stopped because the current file has no extension."));
utils_beep();
- utils_free_pointers(locale_filename, executable);
+ utils_free_pointers(locale_filename, executable, NULL);
return (GPid) 1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.