projects
/
gnome.introspection-doc-generator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fac42b6
)
Introspect/NameSpace.js
author
Alan Knowles
<alan@akkbhome.com>
Thu, 18 Nov 2010 23:53:51 +0000
(07:53 +0800)
committer
Alan Knowles
<alan@akkbhome.com>
Thu, 18 Nov 2010 23:53:51 +0000
(07:53 +0800)
Introspect/NameSpace.js
patch
|
blob
|
history
diff --git
a/Introspect/NameSpace.js
b/Introspect/NameSpace.js
index
0d92b75
..
fa0691d
100644
(file)
--- a/
Introspect/NameSpace.js
+++ b/
Introspect/NameSpace.js
@@
-27,29
+27,20
@@
NameSpace = {
if (!GLib.file_test(dir, GLib.FileTest.EXISTS)) {
return;
}
if (!GLib.file_test(dir, GLib.FileTest.EXISTS)) {
return;
}
- File.list(dir)
-
- while (true) {
-
- var fn = gdir.read_name ? gdir.read_name () : GLib.dir_read_name(gdir);
- // console.log('trying ' + fn);
- if (!fn) {
- gdir.close ? gdir.close() : GLib.dir_close(gdir);
- return;;
- }
+ File.list(dir).forEach(function(fn)
+ {
if (!fn.match(/.typelib$/)) {
if (!fn.match(/.typelib$/)) {
-
continue
;
+
return
;
}
var par = fn.split('-').shift();
//console.log('trying ' + par);
if (ret.indexOf(par) > -1) {
}
var par = fn.split('-').shift();
//console.log('trying ' + par);
if (ret.indexOf(par) > -1) {
-
continue
;
+
return
;
}
ret.push(par);
}
ret.push(par);
-
-
- }
+ });
}
}
+
var gi = GI.Repository.get_default();
var pth = GI.Repository.get_search_path ();
var gi = GI.Repository.get_default();
var pth = GI.Repository.get_search_path ();