SF.net SVN: geany: [523] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Sun Jul 2 11:21:38 UTC 2006
Revision: 523
Author: ntrel
Date: 2006-07-02 04:21:31 -0700 (Sun, 02 Jul 2006)
ViewCVS: http://svn.sourceforge.net/geany/?rev=523&view=rev
Log Message:
-----------
For Find Usage, ignore unnamed files (prevents a NULL filename GLib warning)
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-07-01 18:49:44 UTC (rev 522)
+++ trunk/ChangeLog 2006-07-02 11:21:31 UTC (rev 523)
@@ -1,3 +1,8 @@
+2006-07-02 Nick Treleaven <nick.treleaven at btinternet.com>
+
+ * src/callbacks.c: For Find Usage, ignore unnamed files.
+
+
2006-07-01 Enrico Tröger <enrico.troeger at uvena.de>
* src/document.c, src/keybindings.c: Added shortcut for Select All.
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2006-07-01 18:49:44 UTC (rev 522)
+++ trunk/src/callbacks.c 2006-07-02 11:21:31 UTC (rev 523)
@@ -1296,7 +1296,7 @@
on_find_usage1_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- gint i, pos, line;
+ gint i, pos, line = -1;
gint flags = SCFIND_MATCHCASE | SCFIND_WHOLEWORD;
struct TextToFind ttf;
gchar *buffer, *short_file_name, *string;
@@ -1305,7 +1305,7 @@
gtk_list_store_clear(msgwindow.store_msg);
for(i = 0; i < GEANY_MAX_OPEN_FILES; i++)
{
- if (doc_list[i].sci)
+ if (doc_list[i].sci && doc_list[i].file_name)
{
ttf.chrg.cpMin = 0;
ttf.chrg.cpMax = sci_get_length(doc_list[i].sci);
@@ -1332,6 +1332,8 @@
g_free(ttf.lpstrText);
}
}
+ if (line == -1) // no matches were found (searching from unnamed file)
+ msgwin_status_add(_("No matches found for '%s'."), current_word);
}
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