SF.net SVN: geany: [491] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Mon Jun 26 17:44:28 UTC 2006


Revision: 491
Author:   eht16
Date:     2006-06-26 10:44:18 -0700 (Mon, 26 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=491&view=rev

Log Message:
-----------
Fixed bug which prevented tag creation for the first opened file.
Removed unused code.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c
    trunk/src/document.c
    trunk/tagmanager/tm_source_file.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-06-26 16:22:37 UTC (rev 490)
+++ trunk/ChangeLog	2006-06-26 17:44:18 UTC (rev 491)
@@ -5,6 +5,9 @@
  * src/treeviews.c: Changed some titles to plural. Added own
                     definitions for filetype Python.
  * src/filetypes.c, tagmanager/make.c: Add mk pattern for Makefile.
+ * tagmanager/tm_source_file.c: Fixed bug which prevented tag creation
+                                for the first opened file.
+ * src/document.c, src/callbacks.c: Removed unused code.
 
 
 2006-06-26  Nick Treleaven  <nick.treleaven at btinternet.com>

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2006-06-26 16:22:37 UTC (rev 490)
+++ trunk/src/callbacks.c	2006-06-26 17:44:18 UTC (rev 491)
@@ -1140,9 +1140,6 @@
 	if (idx < 0) return;
 
 	document_set_filetype(idx, (filetype*)user_data);
-
-	//sci_colourise(doc_list[idx].sci, 0, -1);
-	//document_update_tag_list(idx);
 }
 
 

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2006-06-26 16:22:37 UTC (rev 490)
+++ trunk/src/document.c	2006-06-26 17:44:18 UTC (rev 491)
@@ -915,19 +915,13 @@
 	}
 	else
 	{
-		gint len = sci_get_length(doc_list[idx].sci) + 1;
-		gchar *buf = (gchar*) g_malloc(len);
-
-		sci_get_text(doc_list[idx].sci, len, buf);
-
 		if (tm_source_file_update(doc_list[idx].tm_file, TRUE, FALSE, TRUE))
-		//if (tm_source_file_buffer_update(doc_list[idx].tm_file, buf, len, TRUE))
 		{
 			utils_update_tag_list(idx, TRUE);
 		}
 		else
 		{
-			geany_debug(_("tag list updating failed"));
+			geany_debug("tag list updating failed");
 		}
 	}
 }

Modified: trunk/tagmanager/tm_source_file.c
===================================================================
--- trunk/tagmanager/tm_source_file.c	2006-06-26 16:22:37 UTC (rev 490)
+++ trunk/tagmanager/tm_source_file.c	2006-06-26 17:44:18 UTC (rev 491)
@@ -39,10 +39,7 @@
 	if (FALSE == tm_work_object_init(&(source_file->work_object),
 		  source_file_class_id, file_name, FALSE))
 		return FALSE;
-	if (name == NULL) 
-		source_file->lang = LANG_AUTO;
-	else
-		source_file->lang = getNamedLanguage(name);
+
 	source_file->inactive = FALSE;
 	if (NULL == LanguageTable)
 	{
@@ -52,6 +49,11 @@
 			TagEntryFunction = tm_source_file_tags;
 	}
 
+	if (name == NULL) 
+		source_file->lang = LANG_AUTO;
+	else
+		source_file->lang = getNamedLanguage(name);
+
 	if (update)
 		tm_source_file_update(TM_WORK_OBJECT(source_file), FALSE, FALSE, FALSE);
 	return TRUE;


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