X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Introspect%2FNameSpace.js;h=d919a63e567c48a89779c67c2cc15b149b7abfcd;hb=0df5f0f708dcd5db950c7a09f7ea3e5586e12cf4;hp=3d3acc811a10c468214a1606869ee4cb790c385b;hpb=49ca381acda2fe18850d11b8c6bf13609c50f04c;p=gnome.introspection-doc-generator diff --git a/Introspect/NameSpace.js b/Introspect/NameSpace.js index 3d3acc8..d919a63 100644 --- a/Introspect/NameSpace.js +++ b/Introspect/NameSpace.js @@ -9,7 +9,22 @@ XObject = imports.XObject.XObject; console = imports.console.console; - +// BC/FC +if (!GI.Repository) { + GI.Repository = GI.IRepository; + + GI.InfoType = GI.IInfoType; + + GI.IBaseInfo.prototype.get_name = function(n) { + return GI.base_info_get_name(this, n); + } + GI.IBaseInfo.prototype.get_namespace = function(n) { + return GI.base_info_get_namespace(this, n); + } + +} + + NameSpace = { @@ -127,7 +142,7 @@ NameSpace = { print ("SCAN NAMESPACE ALL DONE"); var gi = GI.Repository.get_default(); - var ver = GI.Repository.get_version(gi,ns); + var ver = gi.get_version(ns); var pth = GI.Repository.get_search_path (); var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0'); //console.log(fn); @@ -140,14 +155,14 @@ NameSpace = { }, - + // store all the interfaces, so we can show a list of them later... // called when you list the namespace clsGatherInterfaces : function(ns, cls) { // print("clsGatherInterfaces: " + ns + ", " + cls); var gi = GI.Repository.get_default(); - var bb = GI.Repository.find_by_name(gi,ns, cls); + var bb = gi.find_by_name(ns, cls); var fullname = ns+'.'+cls; this.ifaceList = this.ifaceList || { }; @@ -193,7 +208,7 @@ NameSpace = { console.log("LOAD DOCS: " + ns); var gi = GI.Repository.get_default(); - var ver = GI.Repository.get_version(gi,ns); + var ver = gi.get_version(ns); if (!ver) { this.comments[ns] = {}; return;