[latexila] Switch to Vala 0.14



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

    Switch to Vala 0.14
    
    A lot of warning messages remain (out params). It will be fixed before
    the next minor release.

 CMakeLists.txt             |    4 ++--
 INSTALL                    |    2 +-
 src/build_tools.vala       |    5 +++--
 src/completion.vala        |   11 +++++------
 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 +++--
 11 files changed, 26 insertions(+), 34 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3742671..82379fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,8 +29,8 @@ if (BUILD_VALA)
 	include ("${latexila_SOURCE_DIR}/cmake/find_vala.cmake")
 	include ("${latexila_SOURCE_DIR}/cmake/use_vala.cmake")
 
-	set (_vala_main_version "0.12")
-	set (_vala_min_version "0.12.1")
+	set (_vala_main_version "0.14")
+	set (_vala_min_version "0.14.0")
 
 	if (VALAC)
 		message (STATUS "Use custom valac: ${VALAC}")
diff --git a/INSTALL b/INSTALL
index a800871..514a584 100644
--- a/INSTALL
+++ b/INSTALL
@@ -13,7 +13,7 @@ CMake >= 2.6.4
 gettext
 ITS Tool (http://itstool.org/)
 gsettings-desktop-schemas (optional)
-Vala 0.12.x >= 0.12.1 (may be optional)
+Vala >= 0.13.4 (may be optional)
 
 If you are installing LaTeXila from a tarball, you don't have to install Vala
 because the C code is already generated.
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..4814f60 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);
@@ -131,8 +132,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
         bool valid_arg_contents = false;
         show_all_proposals = false;
 
-        TextIter iter = {};
-        context.get_iter (iter);
+        TextIter iter = context.get_iter ();
 
         // if text selected, NO completion
         TextBuffer buf = iter.get_buffer ();
@@ -166,8 +166,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
 
     public void populate (SourceCompletionContext context)
     {
-        TextIter iter = {};
-        context.get_iter (iter);
+        TextIter iter = context.get_iter ();
         string? cmd = get_latex_command_at_iter (iter);
 
         bool in_argument = false;
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 9fd811a..b1bdf7d 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 f5b1137..7485b5f 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]