SF.net SVN: geany:[4235] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Thu Sep 24 17:12:42 UTC 2009


Revision: 4235
          http://geany.svn.sourceforge.net/geany/?rev=4235&view=rev
Author:   eht16
Date:     2009-09-24 17:12:36 +0000 (Thu, 24 Sep 2009)

Log Message:
-----------
Add "html_asp_default_language" pseudo style to filetypes.xml to allow setting the used language in embedded ASP code (patch by Ross McKay, thanks).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/THANKS
    trunk/data/filetypes.xml
    trunk/src/about.c
    trunk/src/highlighting.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-09-24 16:54:08 UTC (rev 4234)
+++ trunk/ChangeLog	2009-09-24 17:12:36 UTC (rev 4235)
@@ -1,3 +1,11 @@
+2009-09-24  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * THANKS, src/about.c, src/highlighting.c, data/filetypes.xml:
+   Add "html_asp_default_language" pseudo style to filetypes.xml
+   to allow setting the used language in embedded ASP code
+   (patch by Ross McKay, thanks).
+
+
 2009-09-24  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * src/keybindings.c, THANKS:

Modified: trunk/THANKS
===================================================================
--- trunk/THANKS	2009-09-24 16:54:08 UTC (rev 4234)
+++ trunk/THANKS	2009-09-24 17:12:36 UTC (rev 4235)
@@ -69,6 +69,7 @@
 Jon Strait <jstrait(at)moonloop(dot)net> - Markdown filetype patch
 Forgeot Eric <eforgeot(at)yahoo(dot)fr> - Txt2Tags filetype patch
 Lex Trotman <elextr<at>gmail<dot>com> - Build commands configuration improvements, and more
+Ross McKay <rosko<at>zeta<dot>org<dot>au> - ASP preferred language option
 
 Translators:
 ------------

Modified: trunk/data/filetypes.xml
===================================================================
--- trunk/data/filetypes.xml	2009-09-24 16:54:08 UTC (rev 4234)
+++ trunk/data/filetypes.xml	2009-09-24 17:12:36 UTC (rev 4235)
@@ -71,6 +71,13 @@
 # for embedded Python script (<script language="python">...</script>), Python styles from
 # filetypes.python are used
 
+# default scripting language for ASP
+# 0x000001 = JavaScript (or leave blank for default)
+# 0x000002 = VBScript
+# 0x000003 = Python
+#html_asp_default_language=0x000002
+
+
 [keywords]
 html=a abbr acronym address applet area b base basefont bdo big blockquote body br button caption center cite code col colgroup dd del dfn dir div dl dt em embed fieldset font form frame frameset h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex kbd label legend li link map menu meta noframes noscript object ol optgroup option p param pre q quality s samp script select small span strike strong style sub sup table tbody td textarea tfoot th thead title tr tt u ul var xmlns leftmargin topmargin abbr accept-charset accept accesskey action align alink alt archive axis background bgcolor border cellpadding cellspacing char charoff charset checked cite class classid clear codebase codetype color cols colspan compact content coords data datafld dataformatas datapagesize datasrc datetime declare defer dir disabled enctype face for frame frameborder selected headers height href hreflang hspace http-equiv id ismap label lang language link longdesc marginwidth marginheight maxlength media framespacing method multiple name nohref noresize noshade nowrap object onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseover onmouseout onmouseup onreset onselect onsubmit onunload profile prompt pluginspage readonly rel rev rows rowspan rules scheme scope scrolling shape size span src standby start style summary tabindex target text title type usemap valign value valuetype version vlink vspace width text password checkbox radio submit reset file hidden image public doctype xml xml:lang
 javascript=abs abstract acos anchor asin atan atan2 big bold boolean break byte case catch ceil char charAt charCodeAt class concat const continue cos Date debugger default delete do double else enum escape eval exp export extends false final finally fixed float floor fontcolor fontsize for fromCharCode function goto if implements import in indexOf Infinity instanceof int interface isFinite isNaN italics join lastIndexOf length link log long Math max MAX_VALUE min MIN_VALUE NaN native NEGATIVE_INFINITY new null Number package parseFloat parseInt pop POSITIVE_INFINITY pow private protected public push random return reverse round shift short sin slice small sort splice split sqrt static strike string String sub substr substring sup super switch synchronized tan this throw throws toLowerCase toString toUpperCase transient true try typeof undefined unescape unshift valueOf var void volatile while with

Modified: trunk/src/about.c
===================================================================
--- trunk/src/about.c	2009-09-24 16:54:08 UTC (rev 4234)
+++ trunk/src/about.c	2009-09-24 17:12:36 UTC (rev 4235)
@@ -85,7 +85,7 @@
 "Elias Pschernig, Eric Forgeot, Eugene Arshinov, Felipe Pena, François Cami, "
 "Giuseppe Torelli, Guillaume de Rorthais, Guillaume Hoffmann, Herbert Voss, Jason Oster, Jean-François Wauthy, Jeff Pohlmeyer, "
 "Jesse Mayes, John Gabriele, Jon Strait, Josef Whiter, Kevin Ellwood, Kristoffer A. Tjernås, Marko Peric, Matti Mårds, Moritz Barsnick, "
-"Peter Strand, Philipp Gildein, Pierre Joye, Rob van der Linde, Robert McGinley, Roland Baudin, S Jagannathan, Saleem Abdulrasool, "
+"Peter Strand, Philipp Gildein, Pierre Joye, Rob van der Linde, Robert McGinley, Roland Baudin, Ross McKay, S Jagannathan, Saleem Abdulrasool, "
 "Sebastian Kraft, Shiv, Slava Semushin, Stefan Oltmanns, Tamim, Thomas Martitz, Tomás Vírseda, "
 "Tyler Mulligan, Walery Studennikov, Yura Siamashka";
 

Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c	2009-09-24 16:54:08 UTC (rev 4234)
+++ trunk/src/highlighting.c	2009-09-24 17:12:36 UTC (rev 4235)
@@ -1313,7 +1313,7 @@
 
 static void styleset_markup_init(gint ft_id, GKeyFile *config, GKeyFile *config_home)
 {
-	new_styleset(GEANY_FILETYPES_XML, 56);
+	new_styleset(GEANY_FILETYPES_XML, 57);
 	get_keyfile_hex(config, config_home, "html_default", 0x000000, 0xffffff, FALSE, &style_sets[GEANY_FILETYPES_XML].styling[0]);
 	get_keyfile_hex(config, config_home, "html_tag", 0x000099, 0xffffff, FALSE, &style_sets[GEANY_FILETYPES_XML].styling[1]);
 	get_keyfile_hex(config, config_home, "html_tagunknown", 0xff0000, 0xffffff, FALSE, &style_sets[GEANY_FILETYPES_XML].styling[2]);
@@ -1373,6 +1373,8 @@
 	get_keyfile_hex(config, config_home, "jscript_symbols", 0x301010, 0xffffff, FALSE, &style_sets[GEANY_FILETYPES_XML].styling[53]);
 	get_keyfile_hex(config, config_home, "jscript_stringeol", 0x000000, 0xe0c0e0, FALSE, &style_sets[GEANY_FILETYPES_XML].styling[54]);
 	get_keyfile_hex(config, config_home, "jscript_regex", 0x105090, 0xffffff, FALSE, &style_sets[GEANY_FILETYPES_XML].styling[55]);
+	/* custom hack for asp.default.language setting, uses foreground only */
+	get_keyfile_hex(config, config_home, "html_asp_default_language", 0x000001, 0x000000, FALSE, &style_sets[GEANY_FILETYPES_XML].styling[56]);
 
 	style_sets[GEANY_FILETYPES_XML].keywords = g_new(gchar*, 7);
 	get_keyfile_keywords(config, config_home, "html", GEANY_FILETYPES_XML, 0, "a abbr acronym address applet area b base basefont bdo big blockquote body br button caption center cite code col colgroup dd del dfn dir div dl dt em embed fieldset font form frame frameset h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex kbd label legend li link map menu meta noframes noscript object ol optgroup option p param pre q quality s samp script select small span strike strong style sub sup table tbody td textarea tfoot th thead title tr tt u ul var xmlns leftmargin topmargin abbr accept-charset accept accesskey action align alink alt archive axis background bgcolor border cellpadding cellspacing char charoff charset checked cite class classid clear codebase codetype color cols colspan compact content coords data datafld dataformatas datapagesize datasrc datetime declare defer dir disabled enctype face for frame frameborder selected headers height href hreflang hspace http-equiv id ismap label lang language link longdesc marginwidth marginheight maxlength media framespacing method multiple name nohref noresize noshade nowrap object onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseover onmouseout onmouseup onreset onselect onsubmit onunload profile prompt pluginspage readonly rel rev rows rowspan rules scheme scope scrolling shape size span src standby start style summary tabindex target text title type usemap valign value valuetype version vlink vspace width text password checkbox radio submit reset file hidden image public doctype xml xml:lang");
@@ -1388,6 +1390,7 @@
 static void styleset_markup(ScintillaObject *sci, gboolean set_keywords)
 {
 	guint i;
+	gint asp_default_language;
 	const gchar *keywords;
 
 	/* Used by several filetypes */
@@ -1538,6 +1541,16 @@
 
 	SSM(sci, SCI_SETPROPERTY, (uptr_t) "fold.html", (sptr_t) "1");
 	SSM(sci, SCI_SETPROPERTY, (uptr_t) "fold.html.preprocessor", (sptr_t) "0");
+
+	/* hack to check for asp.default.language setting in filetypes.xml file */
+	asp_default_language = style_sets[GEANY_FILETYPES_XML].styling[56].foreground;
+	asp_default_language >>= 16; /* encodeded as BBGGRR, grab just BB */
+	if (asp_default_language > 1)
+	{
+		gchar *asp_default_lang = g_strdup_printf("%d", asp_default_language);
+		SSM(sci, SCI_SETPROPERTY, (uptr_t) "asp.default.language", (sptr_t) &asp_default_lang[0]);
+		g_free(asp_default_lang);
+	}
 }
 
 


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