Revision: 1998 http://geany.svn.sourceforge.net/geany/?rev=1998&view=rev Author: ntrel Date: 2007-10-31 09:22:01 -0700 (Wed, 31 Oct 2007)
Log Message: ----------- Ensure empty symbol list is shown when tags cannot be parsed (fixes wrong symbol list shown when creating a new document with an unsaved filename set).
Modified Paths: -------------- trunk/src/document.c
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2007-10-31 16:20:13 UTC (rev 1997) +++ trunk/src/document.c 2007-10-31 16:22:01 UTC (rev 1998) @@ -1724,6 +1724,8 @@
void document_update_tag_list(gint idx, gboolean update) { + gboolean success = FALSE; + // if the filetype doesn't have a tag parser or it is a new file if (idx == -1 || doc_list[idx].file_type == NULL || ! filetype_has_tags(doc_list[idx].file_type) || ! doc_list[idx].file_name) @@ -1744,23 +1746,26 @@ locale_filename, FALSE, doc_list[idx].file_type->name); g_free(locale_filename); #endif - if (! doc_list[idx].tm_file) return; - tm_workspace_add_object(doc_list[idx].tm_file); - if (update) - tm_source_file_update(doc_list[idx].tm_file, TRUE, FALSE, TRUE); - treeviews_update_tag_list(idx, TRUE); + if (doc_list[idx].tm_file) + { + tm_workspace_add_object(doc_list[idx].tm_file); + if (update) + tm_source_file_update(doc_list[idx].tm_file, TRUE, FALSE, TRUE); + success = TRUE; + } } else { if (tm_source_file_update(doc_list[idx].tm_file, TRUE, FALSE, TRUE)) { - treeviews_update_tag_list(idx, TRUE); + success = TRUE; } else { geany_debug("tag list updating failed"); } } + treeviews_update_tag_list(idx, success); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.