[latexila/vala-0.13] Switch to Vala 0.13



commit 33338d237634e984b0dce7ba29130cd7871bbaba
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Mon Aug 22 19:47:46 2011 +0200

    Switch to Vala 0.13
    
    A lot of warning messages remain (out param), and there is bug with
    MarkupParser, which is fixed in Vala master:
    
    https://bugzilla.gnome.org/show_bug.cgi?id=657262

 CMakeLists.txt             |    8 ++++----
 src/build_tools.vala       |    5 +++--
 src/completion.vala        |    5 +++--
 src/document.vala          |    5 +++--
 src/latex_menu.vala        |    2 +-
 src/main_window.vala       |    2 +-
 src/most_used_symbols.vala |    5 +++--
 src/projects.vala          |    5 +++--
 src/structure_model.vala   |   14 +-------------
 src/templates.vala         |    5 +++--
 10 files changed, 25 insertions(+), 31 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8780e9..bfa0386 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,10 +26,10 @@ set (ICONS_DIR "${CMAKE_INSTALL_PREFIX}/share/icons/hicolor")
 
 if (BUILD_VALA)
 	list (APPEND CMAKE_MODULE_PATH "${latexila_SOURCE_DIR}/cmake/vala")
-	find_package (Vala "0.12.1" REQUIRED)
-	if (${VALA_VERSION} VERSION_GREATER "0.12.99")
-		message (FATAL_ERROR "Vala 0.12.x required")
-	endif ()
+	find_package (Vala "0.13.3" REQUIRED)
+	#if (${VALA_VERSION} VERSION_GREATER "0.12.99")
+	#	message (FATAL_ERROR "Vala 0.12.x required")
+	#endif ()
 	include (${VALA_USE_FILE})
 endif ()
 
diff --git a/src/build_tools.vala b/src/build_tools.vala
index fba09f3..b427a13 100644
--- a/src/build_tools.vala
+++ b/src/build_tools.vala
@@ -268,8 +268,9 @@ public class BuildTools
                 if (! file.query_exists ())
                     continue;
 
-                string contents;
-                file.load_contents (null, out contents);
+                uint8[] chars;
+                file.load_contents (null, out chars);
+                string contents = (string) (owned) chars;
 
                 MarkupParser parser =
                     { parser_start, parser_end, parser_text, null, null };
diff --git a/src/completion.vala b/src/completion.vala
index 1828f64..962a73b 100644
--- a/src/completion.vala
+++ b/src/completion.vala
@@ -87,8 +87,9 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
         {
             File file = File.new_for_path (Config.DATA_DIR + "/completion.xml");
 
-            string contents;
-            file.load_contents (null, out contents);
+            uint8[] chars;
+            file.load_contents (null, out chars);
+            string contents = (string) (owned) chars;
 
             MarkupParser parser = { parser_start, parser_end, parser_text, null, null };
             MarkupParseContext context = new MarkupParseContext (parser, 0, this, null);
diff --git a/src/document.vala b/src/document.vala
index ca2f301..f63b560 100644
--- a/src/document.vala
+++ b/src/document.vala
@@ -119,8 +119,9 @@ public class Document : Gtk.SourceBuffer
 
         try
         {
-            string text;
-            location.load_contents (null, out text, null, out _etag);
+            uint8[] chars;
+            location.load_contents (null, out chars, out _etag);
+            string text = (string) (owned) chars;
 
             if (text.validate ())
                 set_contents (text);
diff --git a/src/latex_menu.vala b/src/latex_menu.vala
index cd272fe..d25f8c5 100644
--- a/src/latex_menu.vala
+++ b/src/latex_menu.vala
@@ -21,7 +21,7 @@ using Gtk;
 
 public class LatexMenu : Gtk.ActionGroup
 {
-    private const ActionEntry[] latex_action_entries =
+    private const Gtk.ActionEntry[] latex_action_entries =
     {
         // LaTeX
         { "Latex", null, "_LaTeX" },
diff --git a/src/main_window.vala b/src/main_window.vala
index 868b839..da0f3e7 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -23,7 +23,7 @@ public class MainWindow : Window
 {
     // for the menu and the toolbar
     // name, stock_id, label, accelerator, tooltip, callback
-    private const ActionEntry[] action_entries =
+    private const Gtk.ActionEntry[] action_entries =
     {
         // File
         { "File", null, N_("_File") },
diff --git a/src/most_used_symbols.vala b/src/most_used_symbols.vala
index 8474e32..a042d54 100644
--- a/src/most_used_symbols.vala
+++ b/src/most_used_symbols.vala
@@ -47,8 +47,9 @@ public class MostUsedSymbols : GLib.Object
 
         try
         {
-            string contents;
-            file.load_contents (null, out contents);
+            uint8[] chars;
+            file.load_contents (null, out chars);
+            string contents = (string) (owned) chars;
 
             MarkupParser parser = { parser_start, null, null, null, null };
             MarkupParseContext context = new MarkupParseContext (parser, 0, this, null);
diff --git a/src/projects.vala b/src/projects.vala
index 1118f8b..c237b46 100644
--- a/src/projects.vala
+++ b/src/projects.vala
@@ -43,8 +43,9 @@ public class Projects
 
         try
         {
-            string contents;
-            file.load_contents (null, out contents);
+            uint8[] chars;
+            file.load_contents (null, out chars);
+            string contents = (string) (owned) chars;
 
             MarkupParser parser = { parser_start, null, null, null, null };
             MarkupParseContext context = new MarkupParseContext (parser, 0, this, null);
diff --git a/src/structure_model.vala b/src/structure_model.vala
index a4563c7..43b08f6 100644
--- a/src/structure_model.vala
+++ b/src/structure_model.vala
@@ -317,9 +317,7 @@ public class StructureModel : TreeModel, GLib.Object
         return true;
     }
 
-    // TODO TreePath -> TreePath? when the next version of Vala is released
-    // See https://bugzilla.gnome.org/show_bug.cgi?id=651871
-    public TreePath get_path (TreeIter iter)
+    public TreePath? get_path (TreeIter iter)
     {
         return_val_if_fail (iter_is_valid (iter), null);
 
@@ -336,16 +334,6 @@ public class StructureModel : TreeModel, GLib.Object
         return path;
     }
 
-    // TODO remove (un)ref_node() when the next version of Vala is released
-    // See https://bugzilla.gnome.org/show_bug.cgi?id=651872
-    public void ref_node (TreeIter iter)
-    {
-    }
-
-    public void unref_node (TreeIter iter)
-    {
-    }
-
 
     /*************************************************************************/
     // Custom methods
diff --git a/src/templates.vala b/src/templates.vala
index 187d406..922d970 100644
--- a/src/templates.vala
+++ b/src/templates.vala
@@ -347,8 +347,9 @@ public class Templates : GLib.Object
     {
         try
         {
-            string contents;
-            file.load_contents (null, out contents, null, null);
+            uint8[] chars;
+            file.load_contents (null, out chars);
+            string contents = (string) (owned) chars;
             add_template_from_string (store, name, icon_id, contents);
         }
         catch (Error e)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]