Revision: 627 Author: eht16 Date: 2006-07-25 03:13:35 -0700 (Tue, 25 Jul 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=627&view=rev
Log Message: ----------- Reordered the filetypes (just a cosmetic change).
Modified Paths: -------------- trunk/ChangeLog trunk/src/filetypes.c trunk/src/filetypes.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-07-25 09:12:51 UTC (rev 626) +++ trunk/ChangeLog 2006-07-25 10:13:35 UTC (rev 627) @@ -2,6 +2,7 @@
* src/encodings.c, src/document.c, src/keyfile.c, src/main.c: Save default encoding for new files as charset string. + * src/filetypes.c: Reordered the filetypes (just a cosmetic change).
2006-07-24 Enrico Tröger enrico.troeger@uvena.de
Modified: trunk/src/filetypes.c =================================================================== --- trunk/src/filetypes.c 2006-07-25 09:12:51 UTC (rev 626) +++ trunk/src/filetypes.c 2006-07-25 10:13:35 UTC (rev 627) @@ -91,6 +91,25 @@ filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_CPP]->title, filetypes[GEANY_FILETYPES_CPP]); filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_CPP]->title, filetypes[GEANY_FILETYPES_CPP]);
+#define D + filetypes[GEANY_FILETYPES_D] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_D]->id = GEANY_FILETYPES_D; + filetypes[GEANY_FILETYPES_D]->lang = 17; + filetypes[GEANY_FILETYPES_D]->name = g_strdup("D"); + filetypes[GEANY_FILETYPES_D]->has_tags = TRUE; + filetypes[GEANY_FILETYPES_D]->title = g_strdup(_("D source file")); + filetypes[GEANY_FILETYPES_D]->extension = g_strdup("d"); + filetypes[GEANY_FILETYPES_D]->pattern = g_new0(gchar*, 3); + filetypes[GEANY_FILETYPES_D]->pattern[0] = g_strdup("*.d"); + filetypes[GEANY_FILETYPES_D]->pattern[1] = g_strdup("*.di"); + filetypes[GEANY_FILETYPES_D]->pattern[2] = NULL; + filetypes[GEANY_FILETYPES_D]->comment_open = g_strdup("//"); + filetypes[GEANY_FILETYPES_D]->comment_close = NULL; + filetypes[GEANY_FILETYPES_D]->style_func_ptr = styleset_d; + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_D]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_D]->title, filetypes[GEANY_FILETYPES_D]); + filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_D]->title, filetypes[GEANY_FILETYPES_D]); + #define JAVA filetypes[GEANY_FILETYPES_JAVA] = g_new0(filetype, 1); filetypes[GEANY_FILETYPES_JAVA]->id = GEANY_FILETYPES_JAVA; @@ -109,6 +128,63 @@ filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_JAVA]->title, filetypes[GEANY_FILETYPES_JAVA]); filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_JAVA]->title, filetypes[GEANY_FILETYPES_JAVA]);
+#define PAS // to avoid warnings when building under Windows, the symbol PASCAL is there defined + filetypes[GEANY_FILETYPES_PASCAL] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_PASCAL]->id = GEANY_FILETYPES_PASCAL; + filetypes[GEANY_FILETYPES_PASCAL]->lang = 4; + filetypes[GEANY_FILETYPES_PASCAL]->name = g_strdup("Pascal"); + filetypes[GEANY_FILETYPES_PASCAL]->has_tags = TRUE; + filetypes[GEANY_FILETYPES_PASCAL]->title = g_strdup(_("Pascal source file")); + filetypes[GEANY_FILETYPES_PASCAL]->extension = g_strdup("pas"); + filetypes[GEANY_FILETYPES_PASCAL]->pattern = g_new0(gchar*, 6); + filetypes[GEANY_FILETYPES_PASCAL]->pattern[0] = g_strdup("*.pas"); + filetypes[GEANY_FILETYPES_PASCAL]->pattern[1] = g_strdup("*.pp"); + filetypes[GEANY_FILETYPES_PASCAL]->pattern[2] = g_strdup("*.inc"); + filetypes[GEANY_FILETYPES_PASCAL]->pattern[3] = g_strdup("*.dpr"); + filetypes[GEANY_FILETYPES_PASCAL]->pattern[4] = g_strdup("*.dpk"); + filetypes[GEANY_FILETYPES_PASCAL]->pattern[5] = NULL; + filetypes[GEANY_FILETYPES_PASCAL]->style_func_ptr = styleset_pascal; + filetypes[GEANY_FILETYPES_PASCAL]->comment_open = g_strdup("{"); + filetypes[GEANY_FILETYPES_PASCAL]->comment_close = g_strdup("}"); + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_PASCAL]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_PASCAL]->title, filetypes[GEANY_FILETYPES_PASCAL]); + filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_PASCAL]->title, filetypes[GEANY_FILETYPES_PASCAL]); + +#define ASM + filetypes[GEANY_FILETYPES_ASM] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_ASM]->id = GEANY_FILETYPES_ASM; + filetypes[GEANY_FILETYPES_ASM]->lang = 9; + filetypes[GEANY_FILETYPES_ASM]->name = g_strdup("ASM"); + filetypes[GEANY_FILETYPES_ASM]->has_tags = TRUE; + filetypes[GEANY_FILETYPES_ASM]->title = g_strdup(_("Assembler source file")); + filetypes[GEANY_FILETYPES_ASM]->extension = g_strdup("asm"); + filetypes[GEANY_FILETYPES_ASM]->pattern = g_new0(gchar*, 2); + filetypes[GEANY_FILETYPES_ASM]->pattern[0] = g_strdup("*.asm"); + filetypes[GEANY_FILETYPES_ASM]->pattern[1] = NULL; + filetypes[GEANY_FILETYPES_ASM]->style_func_ptr = styleset_asm; + filetypes[GEANY_FILETYPES_ASM]->comment_open = g_strdup(";"); + filetypes[GEANY_FILETYPES_ASM]->comment_close = NULL; + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_ASM]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_ASM]->title, filetypes[GEANY_FILETYPES_ASM]); + +#define CAML + filetypes[GEANY_FILETYPES_CAML] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_CAML]->id = GEANY_FILETYPES_CAML; + filetypes[GEANY_FILETYPES_CAML]->lang = -2; + filetypes[GEANY_FILETYPES_CAML]->name = g_strdup("CAML"); + filetypes[GEANY_FILETYPES_CAML]->has_tags = FALSE; + filetypes[GEANY_FILETYPES_CAML]->title = g_strdup(_("(O)Caml source file")); + filetypes[GEANY_FILETYPES_CAML]->extension = g_strdup("ml"); + filetypes[GEANY_FILETYPES_CAML]->pattern = g_new0(gchar*, 3); + filetypes[GEANY_FILETYPES_CAML]->pattern[0] = g_strdup("*.ml"); + filetypes[GEANY_FILETYPES_CAML]->pattern[1] = g_strdup("*.mli"); + filetypes[GEANY_FILETYPES_CAML]->pattern[2] = NULL; + filetypes[GEANY_FILETYPES_CAML]->style_func_ptr = styleset_caml; + filetypes[GEANY_FILETYPES_CAML]->comment_open = g_strdup("(*"); + filetypes[GEANY_FILETYPES_CAML]->comment_close = g_strdup("*)"); + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_CAML]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_CAML]->title, filetypes[GEANY_FILETYPES_CAML]); + #define PERL filetypes[GEANY_FILETYPES_PERL] = g_new0(filetype, 1); filetypes[GEANY_FILETYPES_PERL]->id = GEANY_FILETYPES_PERL; @@ -151,41 +227,6 @@ filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_PHP]->title, filetypes[GEANY_FILETYPES_PHP]); filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_PHP]->title, filetypes[GEANY_FILETYPES_PHP]);
-#define XML - filetypes[GEANY_FILETYPES_XML] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_XML]->id = GEANY_FILETYPES_XML; - filetypes[GEANY_FILETYPES_XML]->lang = -2; - filetypes[GEANY_FILETYPES_XML]->name = g_strdup("XML"); - filetypes[GEANY_FILETYPES_XML]->has_tags = FALSE; - filetypes[GEANY_FILETYPES_XML]->title = g_strdup(_("XML source file")); - filetypes[GEANY_FILETYPES_XML]->extension = g_strdup("xml"); - filetypes[GEANY_FILETYPES_XML]->pattern = g_new0(gchar*, 3); - filetypes[GEANY_FILETYPES_XML]->pattern[0] = g_strdup("*.xml"); - filetypes[GEANY_FILETYPES_XML]->pattern[1] = g_strdup("*.sgml"); - filetypes[GEANY_FILETYPES_XML]->pattern[2] = NULL; - filetypes[GEANY_FILETYPES_XML]->style_func_ptr = styleset_xml; - filetypes[GEANY_FILETYPES_XML]->comment_open = g_strdup("<!--"); - filetypes[GEANY_FILETYPES_XML]->comment_close = g_strdup("-->"); - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_XML]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_XML]->title, filetypes[GEANY_FILETYPES_XML]); - -#define DOCBOOK - filetypes[GEANY_FILETYPES_DOCBOOK] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_DOCBOOK]->id = GEANY_FILETYPES_DOCBOOK; - filetypes[GEANY_FILETYPES_DOCBOOK]->lang = 12; - filetypes[GEANY_FILETYPES_DOCBOOK]->name = g_strdup("Docbook"); - filetypes[GEANY_FILETYPES_DOCBOOK]->has_tags = TRUE; - filetypes[GEANY_FILETYPES_DOCBOOK]->title = g_strdup(_("Docbook source file")); - filetypes[GEANY_FILETYPES_DOCBOOK]->extension = g_strdup("docbook"); - filetypes[GEANY_FILETYPES_DOCBOOK]->pattern = g_new0(gchar*, 2); - filetypes[GEANY_FILETYPES_DOCBOOK]->pattern[0] = g_strdup("*.docbook"); - filetypes[GEANY_FILETYPES_DOCBOOK]->pattern[1] = NULL; - filetypes[GEANY_FILETYPES_DOCBOOK]->style_func_ptr = styleset_docbook; - filetypes[GEANY_FILETYPES_DOCBOOK]->comment_open = g_strdup("<!--"); - filetypes[GEANY_FILETYPES_DOCBOOK]->comment_close = g_strdup("-->"); - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_DOCBOOK]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_DOCBOOK]->title, filetypes[GEANY_FILETYPES_DOCBOOK]); - #define PYTHON filetypes[GEANY_FILETYPES_PYTHON] = g_new0(filetype, 1); filetypes[GEANY_FILETYPES_PYTHON]->id = GEANY_FILETYPES_PYTHON; @@ -204,46 +245,43 @@ filetypes_init_build_programs(filetypes[GEANY_FILETYPES_PYTHON]); filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_PYTHON]->title, filetypes[GEANY_FILETYPES_PYTHON]);
-#define LATEX - filetypes[GEANY_FILETYPES_LATEX] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_LATEX]->id = GEANY_FILETYPES_LATEX; - filetypes[GEANY_FILETYPES_LATEX]->lang = 8; - filetypes[GEANY_FILETYPES_LATEX]->name = g_strdup("LaTeX"); - filetypes[GEANY_FILETYPES_LATEX]->has_tags = TRUE; - filetypes[GEANY_FILETYPES_LATEX]->title = g_strdup(_("LaTeX source file")); - filetypes[GEANY_FILETYPES_LATEX]->extension = g_strdup("tex"); - filetypes[GEANY_FILETYPES_LATEX]->pattern = g_new0(gchar*, 4); - filetypes[GEANY_FILETYPES_LATEX]->pattern[0] = g_strdup("*.tex"); - filetypes[GEANY_FILETYPES_LATEX]->pattern[1] = g_strdup("*.sty"); - filetypes[GEANY_FILETYPES_LATEX]->pattern[2] = g_strdup("*.idx"); - filetypes[GEANY_FILETYPES_LATEX]->pattern[3] = NULL; - filetypes[GEANY_FILETYPES_LATEX]->style_func_ptr = styleset_latex; - filetypes[GEANY_FILETYPES_LATEX]->comment_open = g_strdup("%"); - filetypes[GEANY_FILETYPES_LATEX]->comment_close = NULL; - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_LATEX]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_LATEX]->title, filetypes[GEANY_FILETYPES_LATEX]); +#define RUBY + filetypes[GEANY_FILETYPES_RUBY] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_RUBY]->id = GEANY_FILETYPES_RUBY; + filetypes[GEANY_FILETYPES_RUBY]->lang = 14; + filetypes[GEANY_FILETYPES_RUBY]->name = g_strdup("Ruby"); + filetypes[GEANY_FILETYPES_RUBY]->has_tags = TRUE; + filetypes[GEANY_FILETYPES_RUBY]->title = g_strdup(_("Ruby source file")); + filetypes[GEANY_FILETYPES_RUBY]->extension = g_strdup("rb"); + filetypes[GEANY_FILETYPES_RUBY]->pattern = g_new0(gchar*, 3); + filetypes[GEANY_FILETYPES_RUBY]->pattern[0] = g_strdup("*.rb"); + filetypes[GEANY_FILETYPES_RUBY]->pattern[1] = g_strdup("*.rhtml"); + filetypes[GEANY_FILETYPES_RUBY]->pattern[2] = NULL; + filetypes[GEANY_FILETYPES_RUBY]->style_func_ptr = styleset_ruby; + filetypes[GEANY_FILETYPES_RUBY]->comment_open = g_strdup("#"); + filetypes[GEANY_FILETYPES_RUBY]->comment_close = NULL; + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_RUBY]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_RUBY]->title, filetypes[GEANY_FILETYPES_RUBY]); + filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_RUBY]->title, filetypes[GEANY_FILETYPES_RUBY]);
-#define PAS // to avoid warnings when building under Windows, the symbol PASCAL is there defined - filetypes[GEANY_FILETYPES_PASCAL] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_PASCAL]->id = GEANY_FILETYPES_PASCAL; - filetypes[GEANY_FILETYPES_PASCAL]->lang = 4; - filetypes[GEANY_FILETYPES_PASCAL]->name = g_strdup("Pascal"); - filetypes[GEANY_FILETYPES_PASCAL]->has_tags = TRUE; - filetypes[GEANY_FILETYPES_PASCAL]->title = g_strdup(_("Pascal source file")); - filetypes[GEANY_FILETYPES_PASCAL]->extension = g_strdup("pas"); - filetypes[GEANY_FILETYPES_PASCAL]->pattern = g_new0(gchar*, 6); - filetypes[GEANY_FILETYPES_PASCAL]->pattern[0] = g_strdup("*.pas"); - filetypes[GEANY_FILETYPES_PASCAL]->pattern[1] = g_strdup("*.pp"); - filetypes[GEANY_FILETYPES_PASCAL]->pattern[2] = g_strdup("*.inc"); - filetypes[GEANY_FILETYPES_PASCAL]->pattern[3] = g_strdup("*.dpr"); - filetypes[GEANY_FILETYPES_PASCAL]->pattern[4] = g_strdup("*.dpk"); - filetypes[GEANY_FILETYPES_PASCAL]->pattern[5] = NULL; - filetypes[GEANY_FILETYPES_PASCAL]->style_func_ptr = styleset_pascal; - filetypes[GEANY_FILETYPES_PASCAL]->comment_open = g_strdup("{"); - filetypes[GEANY_FILETYPES_PASCAL]->comment_close = g_strdup("}"); - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_PASCAL]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_PASCAL]->title, filetypes[GEANY_FILETYPES_PASCAL]); - filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_PASCAL]->title, filetypes[GEANY_FILETYPES_PASCAL]); +#define TCL + filetypes[GEANY_FILETYPES_TCL] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_TCL]->id = GEANY_FILETYPES_TCL; + filetypes[GEANY_FILETYPES_TCL]->lang = 15; + filetypes[GEANY_FILETYPES_TCL]->name = g_strdup("Tcl"); + filetypes[GEANY_FILETYPES_TCL]->has_tags = TRUE; + filetypes[GEANY_FILETYPES_TCL]->title = g_strdup(_("Tcl source file")); + filetypes[GEANY_FILETYPES_TCL]->extension = g_strdup("tcl"); + filetypes[GEANY_FILETYPES_TCL]->pattern = g_new0(gchar*, 4); + filetypes[GEANY_FILETYPES_TCL]->pattern[0] = g_strdup("*.tcl"); + filetypes[GEANY_FILETYPES_TCL]->pattern[1] = g_strdup("*.tk"); + filetypes[GEANY_FILETYPES_TCL]->pattern[2] = g_strdup("*.wish"); + filetypes[GEANY_FILETYPES_TCL]->pattern[3] = NULL; + filetypes[GEANY_FILETYPES_TCL]->style_func_ptr = styleset_tcl; + filetypes[GEANY_FILETYPES_TCL]->comment_open = g_strdup("#"); + filetypes[GEANY_FILETYPES_TCL]->comment_close = NULL; + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_TCL]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_TCL]->title, filetypes[GEANY_FILETYPES_TCL]);
#define SH filetypes[GEANY_FILETYPES_SH] = g_new0(filetype, 1); @@ -287,6 +325,41 @@ filetypes_init_build_programs(filetypes[GEANY_FILETYPES_MAKE]); filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_MAKE]->title, filetypes[GEANY_FILETYPES_MAKE]);
+#define XML + filetypes[GEANY_FILETYPES_XML] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_XML]->id = GEANY_FILETYPES_XML; + filetypes[GEANY_FILETYPES_XML]->lang = -2; + filetypes[GEANY_FILETYPES_XML]->name = g_strdup("XML"); + filetypes[GEANY_FILETYPES_XML]->has_tags = FALSE; + filetypes[GEANY_FILETYPES_XML]->title = g_strdup(_("XML source file")); + filetypes[GEANY_FILETYPES_XML]->extension = g_strdup("xml"); + filetypes[GEANY_FILETYPES_XML]->pattern = g_new0(gchar*, 3); + filetypes[GEANY_FILETYPES_XML]->pattern[0] = g_strdup("*.xml"); + filetypes[GEANY_FILETYPES_XML]->pattern[1] = g_strdup("*.sgml"); + filetypes[GEANY_FILETYPES_XML]->pattern[2] = NULL; + filetypes[GEANY_FILETYPES_XML]->style_func_ptr = styleset_xml; + filetypes[GEANY_FILETYPES_XML]->comment_open = g_strdup("<!--"); + filetypes[GEANY_FILETYPES_XML]->comment_close = g_strdup("-->"); + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_XML]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_XML]->title, filetypes[GEANY_FILETYPES_XML]); + +#define DOCBOOK + filetypes[GEANY_FILETYPES_DOCBOOK] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_DOCBOOK]->id = GEANY_FILETYPES_DOCBOOK; + filetypes[GEANY_FILETYPES_DOCBOOK]->lang = 12; + filetypes[GEANY_FILETYPES_DOCBOOK]->name = g_strdup("Docbook"); + filetypes[GEANY_FILETYPES_DOCBOOK]->has_tags = TRUE; + filetypes[GEANY_FILETYPES_DOCBOOK]->title = g_strdup(_("Docbook source file")); + filetypes[GEANY_FILETYPES_DOCBOOK]->extension = g_strdup("docbook"); + filetypes[GEANY_FILETYPES_DOCBOOK]->pattern = g_new0(gchar*, 2); + filetypes[GEANY_FILETYPES_DOCBOOK]->pattern[0] = g_strdup("*.docbook"); + filetypes[GEANY_FILETYPES_DOCBOOK]->pattern[1] = NULL; + filetypes[GEANY_FILETYPES_DOCBOOK]->style_func_ptr = styleset_docbook; + filetypes[GEANY_FILETYPES_DOCBOOK]->comment_open = g_strdup("<!--"); + filetypes[GEANY_FILETYPES_DOCBOOK]->comment_close = g_strdup("-->"); + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_DOCBOOK]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_DOCBOOK]->title, filetypes[GEANY_FILETYPES_DOCBOOK]); + #define CSS filetypes[GEANY_FILETYPES_CSS] = g_new0(filetype, 1); filetypes[GEANY_FILETYPES_CSS]->id = GEANY_FILETYPES_CSS; @@ -304,44 +377,6 @@ filetypes_init_build_programs(filetypes[GEANY_FILETYPES_CSS]); filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_CSS]->title, filetypes[GEANY_FILETYPES_CSS]);
-#define CONF - filetypes[GEANY_FILETYPES_CONF] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_CONF]->id = GEANY_FILETYPES_CONF; - filetypes[GEANY_FILETYPES_CONF]->lang = 10; - filetypes[GEANY_FILETYPES_CONF]->name = g_strdup("Conf"); - filetypes[GEANY_FILETYPES_CONF]->has_tags = TRUE; - filetypes[GEANY_FILETYPES_CONF]->title = g_strdup(_("Config file")); - filetypes[GEANY_FILETYPES_CONF]->extension = g_strdup("conf"); - filetypes[GEANY_FILETYPES_CONF]->pattern = g_new0(gchar*, 6); - filetypes[GEANY_FILETYPES_CONF]->pattern[0] = g_strdup("*.conf"); - filetypes[GEANY_FILETYPES_CONF]->pattern[1] = g_strdup("*.ini"); - filetypes[GEANY_FILETYPES_CONF]->pattern[2] = g_strdup("config"); - filetypes[GEANY_FILETYPES_CONF]->pattern[3] = g_strdup("*rc"); - filetypes[GEANY_FILETYPES_CONF]->pattern[4] = g_strdup("*.cfg"); - filetypes[GEANY_FILETYPES_CONF]->pattern[5] = NULL; - filetypes[GEANY_FILETYPES_CONF]->style_func_ptr = styleset_conf; - filetypes[GEANY_FILETYPES_CONF]->comment_open = g_strdup("#"); - filetypes[GEANY_FILETYPES_CONF]->comment_close = NULL; - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_CONF]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_CONF]->title, filetypes[GEANY_FILETYPES_CONF]); - -#define ASM - filetypes[GEANY_FILETYPES_ASM] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_ASM]->id = GEANY_FILETYPES_ASM; - filetypes[GEANY_FILETYPES_ASM]->lang = 9; - filetypes[GEANY_FILETYPES_ASM]->name = g_strdup("ASM"); - filetypes[GEANY_FILETYPES_ASM]->has_tags = TRUE; - filetypes[GEANY_FILETYPES_ASM]->title = g_strdup(_("Assembler source file")); - filetypes[GEANY_FILETYPES_ASM]->extension = g_strdup("asm"); - filetypes[GEANY_FILETYPES_ASM]->pattern = g_new0(gchar*, 2); - filetypes[GEANY_FILETYPES_ASM]->pattern[0] = g_strdup("*.asm"); - filetypes[GEANY_FILETYPES_ASM]->pattern[1] = NULL; - filetypes[GEANY_FILETYPES_ASM]->style_func_ptr = styleset_asm; - filetypes[GEANY_FILETYPES_ASM]->comment_open = g_strdup(";"); - filetypes[GEANY_FILETYPES_ASM]->comment_close = NULL; - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_ASM]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_ASM]->title, filetypes[GEANY_FILETYPES_ASM]); - #define SQL filetypes[GEANY_FILETYPES_SQL] = g_new0(filetype, 1); filetypes[GEANY_FILETYPES_SQL]->id = GEANY_FILETYPES_SQL; @@ -359,23 +394,24 @@ filetypes_init_build_programs(filetypes[GEANY_FILETYPES_SQL]); filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_SQL]->title, filetypes[GEANY_FILETYPES_SQL]);
-#define CAML - filetypes[GEANY_FILETYPES_CAML] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_CAML]->id = GEANY_FILETYPES_CAML; - filetypes[GEANY_FILETYPES_CAML]->lang = -2; - filetypes[GEANY_FILETYPES_CAML]->name = g_strdup("CAML"); - filetypes[GEANY_FILETYPES_CAML]->has_tags = FALSE; - filetypes[GEANY_FILETYPES_CAML]->title = g_strdup(_("(O)Caml source file")); - filetypes[GEANY_FILETYPES_CAML]->extension = g_strdup("ml"); - filetypes[GEANY_FILETYPES_CAML]->pattern = g_new0(gchar*, 3); - filetypes[GEANY_FILETYPES_CAML]->pattern[0] = g_strdup("*.ml"); - filetypes[GEANY_FILETYPES_CAML]->pattern[1] = g_strdup("*.mli"); - filetypes[GEANY_FILETYPES_CAML]->pattern[2] = NULL; - filetypes[GEANY_FILETYPES_CAML]->style_func_ptr = styleset_caml; - filetypes[GEANY_FILETYPES_CAML]->comment_open = g_strdup("(*"); - filetypes[GEANY_FILETYPES_CAML]->comment_close = g_strdup("*)"); - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_CAML]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_CAML]->title, filetypes[GEANY_FILETYPES_CAML]); +#define LATEX + filetypes[GEANY_FILETYPES_LATEX] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_LATEX]->id = GEANY_FILETYPES_LATEX; + filetypes[GEANY_FILETYPES_LATEX]->lang = 8; + filetypes[GEANY_FILETYPES_LATEX]->name = g_strdup("LaTeX"); + filetypes[GEANY_FILETYPES_LATEX]->has_tags = TRUE; + filetypes[GEANY_FILETYPES_LATEX]->title = g_strdup(_("LaTeX source file")); + filetypes[GEANY_FILETYPES_LATEX]->extension = g_strdup("tex"); + filetypes[GEANY_FILETYPES_LATEX]->pattern = g_new0(gchar*, 4); + filetypes[GEANY_FILETYPES_LATEX]->pattern[0] = g_strdup("*.tex"); + filetypes[GEANY_FILETYPES_LATEX]->pattern[1] = g_strdup("*.sty"); + filetypes[GEANY_FILETYPES_LATEX]->pattern[2] = g_strdup("*.idx"); + filetypes[GEANY_FILETYPES_LATEX]->pattern[3] = NULL; + filetypes[GEANY_FILETYPES_LATEX]->style_func_ptr = styleset_latex; + filetypes[GEANY_FILETYPES_LATEX]->comment_open = g_strdup("%"); + filetypes[GEANY_FILETYPES_LATEX]->comment_close = NULL; + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_LATEX]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_LATEX]->title, filetypes[GEANY_FILETYPES_LATEX]);
#define OMS filetypes[GEANY_FILETYPES_OMS] = g_new0(filetype, 1); @@ -394,63 +430,27 @@ filetypes_init_build_programs(filetypes[GEANY_FILETYPES_OMS]); filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_OMS]->title, filetypes[GEANY_FILETYPES_OMS]);
-#define RUBY - filetypes[GEANY_FILETYPES_RUBY] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_RUBY]->id = GEANY_FILETYPES_RUBY; - filetypes[GEANY_FILETYPES_RUBY]->lang = 14; - filetypes[GEANY_FILETYPES_RUBY]->name = g_strdup("Ruby"); - filetypes[GEANY_FILETYPES_RUBY]->has_tags = TRUE; - filetypes[GEANY_FILETYPES_RUBY]->title = g_strdup(_("Ruby source file")); - filetypes[GEANY_FILETYPES_RUBY]->extension = g_strdup("rb"); - filetypes[GEANY_FILETYPES_RUBY]->pattern = g_new0(gchar*, 3); - filetypes[GEANY_FILETYPES_RUBY]->pattern[0] = g_strdup("*.rb"); - filetypes[GEANY_FILETYPES_RUBY]->pattern[1] = g_strdup("*.rhtml"); - filetypes[GEANY_FILETYPES_RUBY]->pattern[2] = NULL; - filetypes[GEANY_FILETYPES_RUBY]->style_func_ptr = styleset_ruby; - filetypes[GEANY_FILETYPES_RUBY]->comment_open = g_strdup("#"); - filetypes[GEANY_FILETYPES_RUBY]->comment_close = NULL; - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_RUBY]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_RUBY]->title, filetypes[GEANY_FILETYPES_RUBY]); - filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_RUBY]->title, filetypes[GEANY_FILETYPES_RUBY]); +#define CONF + filetypes[GEANY_FILETYPES_CONF] = g_new0(filetype, 1); + filetypes[GEANY_FILETYPES_CONF]->id = GEANY_FILETYPES_CONF; + filetypes[GEANY_FILETYPES_CONF]->lang = 10; + filetypes[GEANY_FILETYPES_CONF]->name = g_strdup("Conf"); + filetypes[GEANY_FILETYPES_CONF]->has_tags = TRUE; + filetypes[GEANY_FILETYPES_CONF]->title = g_strdup(_("Config file")); + filetypes[GEANY_FILETYPES_CONF]->extension = g_strdup("conf"); + filetypes[GEANY_FILETYPES_CONF]->pattern = g_new0(gchar*, 6); + filetypes[GEANY_FILETYPES_CONF]->pattern[0] = g_strdup("*.conf"); + filetypes[GEANY_FILETYPES_CONF]->pattern[1] = g_strdup("*.ini"); + filetypes[GEANY_FILETYPES_CONF]->pattern[2] = g_strdup("config"); + filetypes[GEANY_FILETYPES_CONF]->pattern[3] = g_strdup("*rc"); + filetypes[GEANY_FILETYPES_CONF]->pattern[4] = g_strdup("*.cfg"); + filetypes[GEANY_FILETYPES_CONF]->pattern[5] = NULL; + filetypes[GEANY_FILETYPES_CONF]->style_func_ptr = styleset_conf; + filetypes[GEANY_FILETYPES_CONF]->comment_open = g_strdup("#"); + filetypes[GEANY_FILETYPES_CONF]->comment_close = NULL; + filetypes_init_build_programs(filetypes[GEANY_FILETYPES_CONF]); + filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_CONF]->title, filetypes[GEANY_FILETYPES_CONF]);
-#define TCL - filetypes[GEANY_FILETYPES_TCL] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_TCL]->id = GEANY_FILETYPES_TCL; - filetypes[GEANY_FILETYPES_TCL]->lang = 15; - filetypes[GEANY_FILETYPES_TCL]->name = g_strdup("Tcl"); - filetypes[GEANY_FILETYPES_TCL]->has_tags = TRUE; - filetypes[GEANY_FILETYPES_TCL]->title = g_strdup(_("Tcl source file")); - filetypes[GEANY_FILETYPES_TCL]->extension = g_strdup("tcl"); - filetypes[GEANY_FILETYPES_TCL]->pattern = g_new0(gchar*, 4); - filetypes[GEANY_FILETYPES_TCL]->pattern[0] = g_strdup("*.tcl"); - filetypes[GEANY_FILETYPES_TCL]->pattern[1] = g_strdup("*.tk"); - filetypes[GEANY_FILETYPES_TCL]->pattern[2] = g_strdup("*.wish"); - filetypes[GEANY_FILETYPES_TCL]->pattern[3] = NULL; - filetypes[GEANY_FILETYPES_TCL]->style_func_ptr = styleset_tcl; - filetypes[GEANY_FILETYPES_TCL]->comment_open = g_strdup("#"); - filetypes[GEANY_FILETYPES_TCL]->comment_close = NULL; - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_TCL]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_TCL]->title, filetypes[GEANY_FILETYPES_TCL]); - -#define D - filetypes[GEANY_FILETYPES_D] = g_new0(filetype, 1); - filetypes[GEANY_FILETYPES_D]->id = GEANY_FILETYPES_D; - filetypes[GEANY_FILETYPES_D]->lang = 17; - filetypes[GEANY_FILETYPES_D]->name = g_strdup("D"); - filetypes[GEANY_FILETYPES_D]->has_tags = TRUE; - filetypes[GEANY_FILETYPES_D]->title = g_strdup(_("D source file")); - filetypes[GEANY_FILETYPES_D]->extension = g_strdup("d"); - filetypes[GEANY_FILETYPES_D]->pattern = g_new0(gchar*, 3); - filetypes[GEANY_FILETYPES_D]->pattern[0] = g_strdup("*.d"); - filetypes[GEANY_FILETYPES_D]->pattern[1] = g_strdup("*.di"); - filetypes[GEANY_FILETYPES_D]->pattern[2] = NULL; - filetypes[GEANY_FILETYPES_D]->comment_open = g_strdup("//"); - filetypes[GEANY_FILETYPES_D]->comment_close = NULL; - filetypes[GEANY_FILETYPES_D]->style_func_ptr = styleset_d; - filetypes_init_build_programs(filetypes[GEANY_FILETYPES_D]); - filetypes_create_menu_item(filetype_menu, filetypes[GEANY_FILETYPES_D]->title, filetypes[GEANY_FILETYPES_D]); - filetypes_create_newmenu_item(template_menu, filetypes[GEANY_FILETYPES_D]->title, filetypes[GEANY_FILETYPES_D]); - #define ALL filetypes[GEANY_FILETYPES_ALL] = g_new0(filetype, 1); filetypes[GEANY_FILETYPES_ALL]->id = GEANY_FILETYPES_ALL; @@ -467,7 +467,6 @@ filetypes[GEANY_FILETYPES_ALL]->comment_close = NULL; filetypes_init_build_programs(filetypes[GEANY_FILETYPES_ALL]); filetypes_create_menu_item(filetype_menu, _("None"), filetypes[GEANY_FILETYPES_ALL]); - }
Modified: trunk/src/filetypes.h =================================================================== --- trunk/src/filetypes.h 2006-07-25 09:12:51 UTC (rev 626) +++ trunk/src/filetypes.h 2006-07-25 10:13:35 UTC (rev 627) @@ -29,29 +29,33 @@ { GEANY_FILETYPES_C = 0, // 0 GEANY_FILETYPES_CPP, // 1 - GEANY_FILETYPES_JAVA, // 2 - GEANY_FILETYPES_PERL, // 3 - GEANY_FILETYPES_PHP, // 4 - GEANY_FILETYPES_XML, // 5 - GEANY_FILETYPES_DOCBOOK, // 6 - GEANY_FILETYPES_PYTHON, // 7 - GEANY_FILETYPES_LATEX, // 8 - GEANY_FILETYPES_PASCAL, // 9 - GEANY_FILETYPES_SH, // 10 - GEANY_FILETYPES_MAKE, // 11 - GEANY_FILETYPES_CSS, // 12 - GEANY_FILETYPES_CONF, // 13 - GEANY_FILETYPES_ASM, // 14 - GEANY_FILETYPES_SQL, // 15 - GEANY_FILETYPES_CAML, // 16 - GEANY_FILETYPES_OMS, // 17 - GEANY_FILETYPES_RUBY, // 18 - GEANY_FILETYPES_TCL, // 19 - GEANY_FILETYPES_D, // 20 - GEANY_FILETYPES_ALL, // 21 - GEANY_MAX_FILE_TYPES // 22 + GEANY_FILETYPES_D, // 2 + GEANY_FILETYPES_JAVA, // 3 + GEANY_FILETYPES_PASCAL, // 4 + GEANY_FILETYPES_ASM, // 5 + GEANY_FILETYPES_CAML, // 6 + GEANY_FILETYPES_PERL, // 7 + GEANY_FILETYPES_PHP, // 8 + GEANY_FILETYPES_PYTHON, // 9 + GEANY_FILETYPES_RUBY, // 10 + GEANY_FILETYPES_TCL, // 11 + GEANY_FILETYPES_SH, // 12 + GEANY_FILETYPES_MAKE, // 13 + GEANY_FILETYPES_XML, // 14 + GEANY_FILETYPES_DOCBOOK, // 15 +/* + GEANY_FILETYPES_HTML, // 16 +*/ + GEANY_FILETYPES_CSS, // 17 + GEANY_FILETYPES_SQL, // 18 + GEANY_FILETYPES_LATEX, // 19 + GEANY_FILETYPES_OMS, // 20 + GEANY_FILETYPES_CONF, // 21 + GEANY_FILETYPES_ALL, // 22 + GEANY_MAX_FILE_TYPES // 23 };
+ struct build_menu_items { GtkWidget *menu; @@ -74,6 +78,7 @@ typedef struct filetype { guint id; + guint uid; // unique id as reference for saved filetype in config file langType lang; // represents the langType of tagmanager(see the table // in tagmanager/parsers.h), -1 represents all, -2 none gchar *name; // will be used as name for tagmanager
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.