[latexila/vala-0.13] Switch to Vala 0.13
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila/vala-0.13] Switch to Vala 0.13
- Date: Thu, 8 Sep 2011 13:36:30 +0000 (UTC)
commit f62c95efa77bdf73ba5f1a3d7d927ca16d9e61fc
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 params). It will be fixed before
the next minor release.
But before merging this commit in the master branch, the following bug
must be fixed:
https://bugzilla.gnome.org/show_bug.cgi?id=658555
CMakeLists.txt | 8 ++++----
INSTALL | 2 +-
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 +++--
11 files changed, 26 insertions(+), 32 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f7a67e..cc73500 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.4" 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/INSTALL b/INSTALL
index 447eb63..67e4a8b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -12,7 +12,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..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]