<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -20,7 +20,7 @@ deps.append ({'lib': 'libglade-2.0',        'ver': '2.5.0'})
 deps.append ({'lib': 'libgnomeui-2.0',      'ver': '2.12.0'})
 deps.append ({'lib': 'libxml-2.0',          'ver': '2.6.0'})
 deps.append ({'lib': 'libgnomecanvas-2.0',  'ver': '2.12.0'})
-deps.append ({'lib': 'gtksourceview-1.0',   'ver': '1.0'})
+deps.append ({'lib': 'gtksourceview-2.0',   'ver': '2.0'})
 deps.append ({'lib': 'cairo',               'ver': '1.2.0'})
 
 # CUSTOM CHECK FUNC #</diff>
      <filename>SConstruct</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,12 @@
+import os
 Import ('CEnv')
 
+resources = Split (&quot;&quot;&quot;
+	netlist.lang
+	&quot;&quot;&quot;)
+
+CEnv.Alias('install', CEnv.Install (os.path.join (CEnv['INSTALL_DIR'], 'share/oregano/language-specs'), resources))
+
 SConscript ('libraries/SConscript');
 SConscript ('dialogs/SConscript')
 SConscript ('models/SConscript')</diff>
      <filename>data/SConscript</filename>
    </modified>
    <modified>
      <diff>@@ -1,54 +1,72 @@
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-&lt;!DOCTYPE language SYSTEM &quot;language.dtd&quot;&gt;
-&lt;language _name=&quot;Netlist&quot; version=&quot;1.0&quot; _section=&quot;Markup&quot; mimetypes=&quot;text/xml&quot;&gt;
-	&lt;block-comment _name=&quot;Block Comment&quot; style=&quot;Comment&quot;&gt;
-		&lt;start-regex&gt;^\*&lt;/start-regex&gt;
-		&lt;end-regex&gt;\n&lt;/end-regex&gt;
-	&lt;/block-comment&gt;
-	
-	&lt;pattern-item _name = &quot;Decimal&quot; style = &quot;Decimal&quot;&gt;
-		&lt;regex&gt;\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b&lt;/regex&gt;
-	&lt;/pattern-item&gt;
-	
-	&lt;pattern-item _name = &quot;Floating Point Number&quot; style = &quot;Floating Point&quot;&gt;
-		&lt;regex&gt;\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?&lt;/regex&gt;
-	&lt;/pattern-item&gt;
+&lt;language id=&quot;netlist&quot; _name=&quot;Netlist&quot; version=&quot;2.0&quot; _section=&quot;Markup&quot;&gt;
+  &lt;metadata&gt;
+    &lt;property name=&quot;mimetypes&quot;&gt;application/x-oregano&lt;/property&gt;
+    &lt;property name=&quot;globs&quot;&gt;*.netlist&lt;/property&gt;
+  &lt;/metadata&gt;
 
-	&lt;keyword-list _name = &quot;Keywords&quot; style = &quot;Keyword&quot; case-sensitive=&quot;TRUE&quot;&gt;
-		&lt;keyword&gt;print&lt;/keyword&gt;
-		&lt;keyword&gt;tran&lt;/keyword&gt;
-		&lt;keyword&gt;op&lt;/keyword&gt;
-		&lt;keyword&gt;dc&lt;/keyword&gt;
-		&lt;keyword&gt;options&lt;/keyword&gt;
-		&lt;keyword&gt;end&lt;/keyword&gt;
-		&lt;keyword&gt;ac&lt;/keyword&gt;
-		&lt;keyword&gt;fourier&lt;/keyword&gt;
- 	&lt;/keyword-list&gt;	
+  &lt;styles&gt;
+    &lt;style id=&quot;comment&quot; _name=&quot;Comment&quot; map-to=&quot;def:comment&quot;/&gt;
+    &lt;style id=&quot;floating-point&quot; _name=&quot;Floating Point&quot; map-to=&quot;def:floating-point&quot;/&gt;
+    &lt;style id=&quot;decimal&quot; _name=&quot;Decimal&quot; map-to=&quot;def:decimal&quot;/&gt;
+    &lt;style id=&quot;preprocessor&quot; _name=&quot;Preprocessor&quot; map-to=&quot;def:identifier&quot;/&gt;
+    &lt;style id=&quot;keyword&quot; _name=&quot;Keyword&quot; map-to=&quot;def:keyword&quot;/&gt;
+    &lt;style id=&quot;values&quot; _name=&quot;Values&quot; map-to=&quot;def:special-char&quot;/&gt;
+  &lt;/styles&gt;
 
-	&lt;pattern-item _name=&quot;Entity&quot; style=&quot;Preprocessor&quot;&gt;
-		&lt;regex&gt;(v|i)(\(.\))&lt;/regex&gt;
-	&lt;/pattern-item&gt;
-
-	&lt;keyword-list _name = &quot;Common Macro&quot; style = &quot;Preprocessor&quot; case-sensitive=&quot;TRUE&quot;&gt;
-		&lt;keyword&gt;UIC&lt;/keyword&gt;
-		&lt;keyword&gt;OUT&lt;/keyword&gt;
-		&lt;keyword&gt;TEMP&lt;/keyword&gt;
-		&lt;keyword&gt;GMIN&lt;/keyword&gt;
-		&lt;keyword&gt;ABSTOL&lt;/keyword&gt;
-		&lt;keyword&gt;CHGTOL&lt;/keyword&gt;
-		&lt;keyword&gt;RELTOL&lt;/keyword&gt;
-		&lt;keyword&gt;VNTOL&lt;/keyword&gt;
-		&lt;keyword&gt;ITL1&lt;/keyword&gt;
-		&lt;keyword&gt;ITL2&lt;/keyword&gt;
-		&lt;keyword&gt;ITL4&lt;/keyword&gt;
-		&lt;keyword&gt;PIVREL&lt;/keyword&gt;
-		&lt;keyword&gt;PIVTOL&lt;/keyword&gt;
-		&lt;keyword&gt;TNOM&lt;/keyword&gt;
-		&lt;keyword&gt;TRTOL&lt;/keyword&gt;
-		&lt;keyword&gt;DEFAD&lt;/keyword&gt;
-		&lt;keyword&gt;DEFAS&lt;/keyword&gt;
-		&lt;keyword&gt;DEFL&lt;/keyword&gt;
-		&lt;keyword&gt;DEFW&lt;/keyword&gt;
-	&lt;/keyword-list&gt;
+  &lt;definitions&gt;
+    &lt;context id=&quot;block-comment&quot; style-ref=&quot;comment&quot; end-at-line-end=&quot;true&quot;&gt;
+      &lt;start&gt;\*&lt;/start&gt;
+    &lt;/context&gt;
+    &lt;context id=&quot;decimal&quot; style-ref=&quot;decimal&quot;&gt;
+      &lt;match&gt;\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b&lt;/match&gt;
+    &lt;/context&gt;
+    &lt;context id=&quot;floating-point-number&quot; style-ref=&quot;floating-point&quot;&gt;
+      &lt;match&gt;\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?&lt;/match&gt;
+    &lt;/context&gt;
+    &lt;context id=&quot;keywords&quot; style-ref=&quot;keyword&quot;&gt;
+      &lt;keyword&gt;print&lt;/keyword&gt;
+      &lt;keyword&gt;tran&lt;/keyword&gt;
+      &lt;keyword&gt;op&lt;/keyword&gt;
+      &lt;keyword&gt;dc&lt;/keyword&gt;
+      &lt;keyword&gt;options&lt;/keyword&gt;
+      &lt;keyword&gt;end&lt;/keyword&gt;
+      &lt;keyword&gt;ac&lt;/keyword&gt;
+      &lt;keyword&gt;fourier&lt;/keyword&gt;
+    &lt;/context&gt;
+    &lt;context id=&quot;entity&quot; style-ref=&quot;values&quot;&gt;
+      &lt;match&gt;(v|i)(\(.*\))&lt;/match&gt;
+    &lt;/context&gt;
+    &lt;context id=&quot;common-macro&quot; style-ref=&quot;preprocessor&quot;&gt;
+      &lt;keyword&gt;UIC&lt;/keyword&gt;
+      &lt;keyword&gt;OUT&lt;/keyword&gt;
+      &lt;keyword&gt;TEMP&lt;/keyword&gt;
+      &lt;keyword&gt;GMIN&lt;/keyword&gt;
+      &lt;keyword&gt;ABSTOL&lt;/keyword&gt;
+      &lt;keyword&gt;CHGTOL&lt;/keyword&gt;
+      &lt;keyword&gt;RELTOL&lt;/keyword&gt;
+      &lt;keyword&gt;VNTOL&lt;/keyword&gt;
+      &lt;keyword&gt;ITL1&lt;/keyword&gt;
+      &lt;keyword&gt;ITL2&lt;/keyword&gt;
+      &lt;keyword&gt;ITL4&lt;/keyword&gt;
+      &lt;keyword&gt;PIVREL&lt;/keyword&gt;
+      &lt;keyword&gt;PIVTOL&lt;/keyword&gt;
+      &lt;keyword&gt;TNOM&lt;/keyword&gt;
+      &lt;keyword&gt;TRTOL&lt;/keyword&gt;
+      &lt;keyword&gt;DEFAD&lt;/keyword&gt;
+      &lt;keyword&gt;DEFAS&lt;/keyword&gt;
+      &lt;keyword&gt;DEFL&lt;/keyword&gt;
+      &lt;keyword&gt;DEFW&lt;/keyword&gt;
+    &lt;/context&gt;
+    &lt;context id=&quot;netlist&quot;&gt;
+      &lt;include&gt;
+        &lt;context ref=&quot;block-comment&quot;/&gt;
+        &lt;context ref=&quot;decimal&quot;/&gt;
+        &lt;context ref=&quot;floating-point-number&quot;/&gt;
+        &lt;context ref=&quot;keywords&quot;/&gt;
+        &lt;context ref=&quot;entity&quot;/&gt;
+        &lt;context ref=&quot;common-macro&quot;/&gt;
+      &lt;/include&gt;
+    &lt;/context&gt;
+  &lt;/definitions&gt;
 &lt;/language&gt;
-</diff>
      <filename>data/netlist.lang</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,7 @@ LocaleDir         = '-DGNOMELOCALEDIR=\\&quot;&quot;'+SrcEnv['DATADIR']+'/locale&quot;\\&quot;'
 OreganoGladeDir   = '-DOREGANO_GLADEDIR=\\&quot;&quot;'+SrcEnv['OREGANODIR']+'/dialogs&quot;\\&quot;'
 OreganoLibraryDir = '-DOREGANO_LIBRARYDIR=\\&quot;&quot;'+SrcEnv['OREGANODIR']+'/libraries&quot;\\&quot;'
 OreganoModelDir   = '-DOREGANO_MODELDIR=\\&quot;&quot;'+SrcEnv['OREGANODIR']+'/models&quot;\\&quot;'
+OreganoLangDir    = '-DOREGANO_LANGDIR=\\&quot;&quot;'+SrcEnv['OREGANODIR']+'&quot;/language-specs\\&quot;'
 VersionFlag       = '-DVERSION=\\&quot;'+SrcEnv['VERSION']+'\\&quot;'
 DataDir           = '-DDATADIR=\\&quot;'+SrcEnv['DATADIR']+'\\&quot;'
 Package           = '-DPACKAGE=\\&quot;oregano\\&quot;'
@@ -22,7 +23,8 @@ SrcEnv.Append (CCFLAGS = [
 	LocaleDir,
 	OreganoGladeDir,
 	OreganoLibraryDir,
-	OreganoModelDir
+	OreganoModelDir,
+	OreganoLangDir
 	])
 
 Export ('SrcEnv')</diff>
      <filename>src/SConscript</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@
 #include &lt;stdio.h&gt;
 #include &lt;stdlib.h&gt;
 #include &lt;gnome.h&gt;
-#include &lt;gtksourceview/gtksourceprintjob.h&gt;
+#include &lt;gtksourceview/gtksourceprintcompositor.h&gt;
 
 static void netlist_editor_finalize (GObject *object);
 static void netlist_editor_dispose (GObject *object);
@@ -47,7 +47,7 @@ struct _NetlistEditorPriv {
 	SchematicView *sv;
 	gchar * font;
 	GdkColor bgcolor, selectcolor, textcolor;
-	GtkSourceLanguagesManager *lm;
+	GtkSourceLanguageManager *lm;
 	GtkTextView *view;
 	GtkSourceBuffer *buffer;
 	GtkWindow *toplevel;
@@ -283,12 +283,13 @@ netlist_editor_save (GtkWidget * widget, NetlistEditor * nle)
 
 NetlistEditor *
 netlist_editor_new (GtkSourceBuffer * textbuffer) {
+	gchar* lang_files[3];
 	NetlistEditor * nle;
 	GladeXML * gui;
 	GtkWidget * toplevel;
 	GtkScrolledWindow * scroll;
 	GtkSourceView * source_view;
-	GtkSourceLanguagesManager * lm;
+	GtkSourceLanguageManager * lm;
 	GtkButton * save, * sim, * close, * print;
 	GtkSourceLanguage *lang=NULL;
 	const GSList *list;
@@ -319,24 +320,26 @@ netlist_editor_new (GtkSourceBuffer * textbuffer) {
 	scroll = GTK_SCROLLED_WINDOW (glade_xml_get_widget (gui, &quot;netlist-scrolled-window&quot;));
 	
 	source_view = GTK_SOURCE_VIEW (gtk_source_view_new ());
-	lm = GTK_SOURCE_LANGUAGES_MANAGER (gtk_source_languages_manager_new ());
+	lm = GTK_SOURCE_LANGUAGE_MANAGER (gtk_source_language_manager_new ());
+
+ 	lang_files[0] = OREGANO_LANGDIR;
+	/* FIXME : This is needed because RealxNG files are required. */
+ 	lang_files[1] = &quot;/usr/share/gtksourceview-2.0/language-specs/&quot;;
+	lang_files[2] = NULL;
+
+	gtk_source_language_manager_set_search_path (lm, lang_files);
 	
-	g_object_set_data_full (G_OBJECT (source_view), &quot;languages-manager&quot;,
+	g_object_set_data_full (G_OBJECT (source_view), &quot;language-manager&quot;,
 		lm, (GDestroyNotify) g_object_unref);
 
-	list = gtk_source_languages_manager_get_available_languages (lm);
-	while (list) {
-		GtkSourceLanguage *l = (GtkSourceLanguage *)list-&gt;data;
-		if (!g_strcasecmp(gtk_source_language_get_name (l), &quot;netlist&quot;)) {
-			lang = l;
-			break;
-		}
-		list = list-&gt;next;
-	}
+	lang = gtk_source_language_manager_get_language (lm, &quot;netlist&quot;);
 
 	if (lang) {
 		gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (textbuffer), lang);
-		gtk_source_buffer_set_highlight (GTK_SOURCE_BUFFER (textbuffer), TRUE);
+		gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (textbuffer), TRUE);
+		gtk_source_buffer_set_highlight_matching_brackets (GTK_SOURCE_BUFFER (textbuffer), TRUE);
+	} else {
+		g_warning (&quot;Can't load netlist.lang in %s&quot;, OREGANO_LANGDIR &quot;/netlist.lang&quot;);
 	}
 
 	gtk_text_view_set_editable (GTK_TEXT_VIEW (source_view), TRUE);</diff>
      <filename>src/netlist-editor.c</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@
 #include &lt;gconf/gconf-client.h&gt;
 #include &lt;gtk/gtk.h&gt;
 #include &lt;gtksourceview/gtksourceview.h&gt;
-#include &lt;gtksourceview/gtksourcelanguagesmanager.h&gt;
+#include &lt;gtksourceview/gtksourcelanguagemanager.h&gt;
 #include &quot;schematic-view.h&quot;
 #include &quot;errors.h&quot;
 #include &quot;engine.h&quot;</diff>
      <filename>src/netlist-editor.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3bca995f1e63e11bc3e35b816361e03c4d647f6d</id>
    </parent>
  </parents>
  <author>
    <name>Ricardo Markiewicz</name>
    <email>gazer.arg@gmail.com</email>
  </author>
  <url>http://github.com/Gazer/oregano/commit/92e871ff5ec30281d950255fbe467a15506a27ff</url>
  <id>92e871ff5ec30281d950255fbe467a15506a27ff</id>
  <committed-date>2009-06-16T09:45:27-07:00</committed-date>
  <authored-date>2009-06-16T09:45:27-07:00</authored-date>
  <message>Upgrade GtkSourceView to version 2.0

Closes #1332.</message>
  <tree>e93803e322004e251fccde532e0003c85687354c</tree>
  <committer>
    <name>Ricardo Markiewicz</name>
    <email>gazer.arg@gmail.com</email>
  </committer>
</commit>
