[latexila] Constructor for the BuildTool struct
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Constructor for the BuildTool struct
- Date: Fri, 13 Jul 2012 03:41:12 +0000 (UTC)
commit 9f7df3864f4db403f2e0f6b34647c3483829e383
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Fri Jul 13 03:24:32 2012 +0200
Constructor for the BuildTool struct
src/build_tool_dialog.vala | 2 --
src/build_tools.vala | 16 +++++++++++++---
2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/build_tool_dialog.vala b/src/build_tool_dialog.vala
index 303ee9f..ea146ec 100644
--- a/src/build_tool_dialog.vala
+++ b/src/build_tool_dialog.vala
@@ -497,8 +497,6 @@ private class BuildToolDialog : Dialog
/* Jobs */
- tool.jobs = new Gee.ArrayList<BuildJob?> ();
-
model = _jobs_store as TreeModel;
bool valid = _jobs_store.get_iter_first (out iter);
diff --git a/src/build_tools.vala b/src/build_tools.vala
index bf7d379..1784c0a 100644
--- a/src/build_tools.vala
+++ b/src/build_tools.vala
@@ -45,6 +45,18 @@ public struct BuildTool
bool enabled;
bool compilation;
Gee.ArrayList<BuildJob?> jobs;
+
+ public BuildTool ()
+ {
+ description = "";
+ extensions = "";
+ label = "";
+ icon = "";
+ files_to_open = "";
+ enabled = false;
+ compilation = false;
+ jobs = new Gee.ArrayList<BuildJob?> ();
+ }
}
public class BuildTools : GLib.Object
@@ -264,8 +276,6 @@ public class BuildTools : GLib.Object
case "tool":
_cur_tool = BuildTool ();
- _cur_tool.compilation = false;
- _cur_tool.jobs = new Gee.ArrayList<BuildJob?> ();
for (int i = 0 ; i < attr_names.length ; i++)
{
@@ -332,7 +342,7 @@ public class BuildTools : GLib.Object
case "tool":
// the description is optional
- if (_cur_tool.description == null)
+ if (_cur_tool.description == "")
_cur_tool.description = _cur_tool.label;
_cur_tool.compilation = is_compilation (_cur_tool);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]