Kaydet (Commit) 2269d3d4 authored tarafından Enrico Tröger's avatar Enrico Tröger

Reload also the symbol list when reloading a file.

Changed some titles to plural. Added own definitions for filetype Python.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@489 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 3188cf2d
2006-06-26 Enrico Troeger <enrico.troeger@uvena.de> 2006-06-26 Enrico Troeger <enrico.troeger@uvena.de>
* src/sci_cb.c: Fixed broken auto completion for switch(). * 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@btinternet.com> 2006-06-26 Nick Treleaven <nick.treleaven@btinternet.com>
......
...@@ -524,7 +524,11 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado ...@@ -524,7 +524,11 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado
document_set_filetype(idx, use_ft); document_set_filetype(idx, use_ft);
utils_build_show_hide(idx); utils_build_show_hide(idx);
} }
else
{
document_update_tag_list(idx, TRUE);
}
document_set_text_changed(idx); document_set_text_changed(idx);
g_free(data); g_free(data);
...@@ -894,7 +898,8 @@ void document_set_font(gint idx, const gchar *font_name, gint size) ...@@ -894,7 +898,8 @@ void document_set_font(gint idx, const gchar *font_name, gint size)
void document_update_tag_list(gint idx, gboolean update) 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 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) if (doc_list[idx].tm_file == NULL)
{ {
...@@ -978,8 +983,7 @@ void document_set_filetype(gint idx, filetype *type) ...@@ -978,8 +983,7 @@ void document_set_filetype(gint idx, filetype *type)
} }
sci_colourise(doc_list[idx].sci, 0, -1); sci_colourise(doc_list[idx].sci, 0, -1);
utils_build_show_hide(idx); utils_build_show_hide(idx);
geany_debug("%s : %s (%s)", (doc_list[idx].file_name) ? doc_list[idx].file_name : "(null)", geany_debug("%s : %s (%s)", doc_list[idx].file_name, type->name, doc_list[idx].encoding);
type->name, doc_list[idx].encoding);
} }
......
...@@ -125,11 +125,11 @@ void treeviews_init_tag_list(gint idx) ...@@ -125,11 +125,11 @@ void treeviews_init_tag_list(gint idx)
gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_function), NULL); 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_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_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_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_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_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_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_append(doc_list[idx].tag_store, &(tv.tag_struct), NULL);
...@@ -141,22 +141,43 @@ void treeviews_init_tag_list(gint idx) ...@@ -141,22 +141,43 @@ void treeviews_init_tag_list(gint idx)
*/ */
break; break;
} }
default: case GEANY_FILETYPES_PYTHON:
{ {
gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_function), NULL); 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_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_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, _("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, _("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, _("Members"), -1);
gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_macro), NULL); 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_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_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_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_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_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); gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_other), 0, _("Other"), -1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment