SF.net SVN: geany: [489] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Mon Jun 26 16:19:35 UTC 2006


Revision: 489
Author:   eht16
Date:     2006-06-26 09:19:28 -0700 (Mon, 26 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=489&view=rev

Log Message:
-----------
Reload also the symbol list when reloading a file.
Changed some titles to plural. Added own definitions for filetype Python.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/document.c
    trunk/src/treeviews.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-06-26 16:17:57 UTC (rev 488)
+++ trunk/ChangeLog	2006-06-26 16:19:28 UTC (rev 489)
@@ -1,6 +1,9 @@
 2006-06-26  Enrico Troeger  <enrico.troeger at uvena.de>
 
  * src/sci_cb.c: Fixed broken auto completion for switch().
+ * src/document.c: Reload also the symbol list when reloading a file.
+ * src/treeviews.c: Changed some titles to plural. Added own
+                    definitions for filetype Python.
 
 
 2006-06-26  Nick Treleaven  <nick.treleaven at btinternet.com>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2006-06-26 16:17:57 UTC (rev 488)
+++ trunk/src/document.c	2006-06-26 16:19:28 UTC (rev 489)
@@ -524,7 +524,11 @@
 		document_set_filetype(idx, use_ft);
 		utils_build_show_hide(idx);
 	}
-
+	else 
+	{
+		document_update_tag_list(idx, TRUE);
+	}
+	
 	document_set_text_changed(idx);
 
 	g_free(data);
@@ -894,7 +898,8 @@
 void document_update_tag_list(gint idx, gboolean update)
 {
 	// if the filetype doesn't has a tag parser or it is a new file, leave
-	if (idx == -1 || ! doc_list[idx].file_type->has_tags || ! doc_list[idx].file_name) return;
+	if (idx == -1 || doc_list[idx].file_type == NULL ||
+		! doc_list[idx].file_type->has_tags || ! doc_list[idx].file_name) return;
 
 	if (doc_list[idx].tm_file == NULL)
 	{
@@ -978,8 +983,7 @@
 	}
 	sci_colourise(doc_list[idx].sci, 0, -1);
 	utils_build_show_hide(idx);
-	geany_debug("%s : %s (%s)",	(doc_list[idx].file_name) ? doc_list[idx].file_name : "(null)",
-								type->name, doc_list[idx].encoding);
+	geany_debug("%s : %s (%s)",	doc_list[idx].file_name, type->name, doc_list[idx].encoding);
 }
 
 

Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c	2006-06-26 16:17:57 UTC (rev 488)
+++ trunk/src/treeviews.c	2006-06-26 16:19:28 UTC (rev 489)
@@ -125,11 +125,11 @@
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_function), NULL);
 			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_function), 0, _("Methods"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_class), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_class), 0, _("Class"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_class), 0, _("Classes"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_member), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_member), 0, _("Singleton"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_member), 0, _("Singletons"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_macro), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_macro), 0, _("Mixin"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_macro), 0, _("Mixins"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_variable), NULL);
 			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_variable), 0, _("Variables"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_struct), NULL);
@@ -141,22 +141,43 @@
 */
 			break;
 		}
+		case GEANY_FILETYPES_PYTHON:
+		{
+			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_function), NULL);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_function), 0, _("Functions"), -1);
+			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_class), NULL);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_class), 0, _("Classes"), -1);
+			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_member), NULL);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_member), 0, _("Methods"), -1);
+/*			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_macro), NULL);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_macro), 0, _("Mixin"), -1);
+			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_variable), NULL);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_variable), 0, _("Variables"), -1);
+			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_struct), NULL);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_struct), 0, _("Members"), -1);
+			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_namespace), NULL);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_namespace), 0, _("Begin"), -1);
+			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_other), NULL);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_other), 0, _("Other"), -1);
+*/
+			break;
+		}
 		default:
 		{
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_function), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_function), 0, _("Function"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_function), 0, _("Functions"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_class), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_class), 0, _("Class"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_class), 0, _("Classes"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_member), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_member), 0, _("Methods"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_member), 0, _("Members"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_macro), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_macro), 0, _("Macro"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_macro), 0, _("Macros"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_variable), NULL);
 			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_variable), 0, _("Variables"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_namespace), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_namespace), 0, _("Namespace"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_namespace), 0, _("Namespaces"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_struct), NULL);
-			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_struct), 0, _("Struct / Typedef"), -1);
+			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_struct), 0, _("Structs / Typedefs"), -1);
 			gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_other), NULL);
 			gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_other), 0, _("Other"), -1);
 		}


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