projects
/
app.Builder.js
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bddc128
)
src/Project/Project.vala
author
Alan Knowles
<alan@roojs.com>
Thu, 14 May 2015 10:36:37 +0000
(18:36 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 14 May 2015 10:36:37 +0000
(18:36 +0800)
src/Project/Project.vala
patch
|
blob
|
history
diff --git
a/src/Project/Project.vala
b/src/Project/Project.vala
index
d17bd79
..
8e619dc
100644
(file)
--- a/
src/Project/Project.vala
+++ b/
src/Project/Project.vala
@@
-138,13
+138,26
@@
namespace Project {
return null;
}
return null;
}
+ public static Project getProjectByHash(string fn)
+ {
+
+ var iter = projects.map_iterator();
+ while (iter.next()) {
+ if (iter.get_value().fn == fn) {
+ return iter.get_value();
+ }
+
+ }
+
+ return null;
+ }
// load project data from project file.
public static void factoryFromFile(string jsonfile)
{
// load project data from project file.
public static void factoryFromFile(string jsonfile)
{
- GLib.debug("parse %s
\n
", jsonfile);
+ GLib.debug("parse %s", jsonfile);
var pa = new Json.Parser();
pa.load_from_file(jsonfile);
var pa = new Json.Parser();
pa.load_from_file(jsonfile);
@@
-152,7
+165,7
@@
namespace Project {
if (node == null || node.get_node_type () != Json.NodeType.OBJECT) {
if (node == null || node.get_node_type () != Json.NodeType.OBJECT) {
- GLib.debug("SKIP " + jsonfile + " - invalid format?
\n
");
+ GLib.debug("SKIP " + jsonfile + " - invalid format?");
return;
}
return;
}
@@
-379,7
+392,7
@@
namespace Project {
var f = fiter.get_value();
var f = fiter.get_value();
- GLib.debug ("Project.getByName: %s ?= %s
\n
" ,f.name , name);
+ GLib.debug ("Project.getByName: %s ?= %s" ,f.name , name);
if (f.name == name) {
return f;
}
if (f.name == name) {
return f;
}