mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Added support GTK GladeXML (fix indentation)
This commit is contained in:
parent
db28783338
commit
dba45ac30e
46
lib/gtk.js
46
lib/gtk.js
|
@ -167,8 +167,8 @@ var GTKExecCommand = function(command) {
|
||||||
|
|
||||||
console.log(line);
|
console.log(line);
|
||||||
|
|
||||||
GTKServer.StdIn.WriteLine(line);
|
GTKServer.StdIn.WriteLine(line);
|
||||||
return GTKServer.StdOut.ReadLine();
|
return GTKServer.StdOut.ReadLine();
|
||||||
};
|
};
|
||||||
|
|
||||||
// GTKInit
|
// GTKInit
|
||||||
|
@ -422,29 +422,29 @@ var GTKWait = function(callback) {
|
||||||
|
|
||||||
// GladeXML
|
// GladeXML
|
||||||
var GladeXML = function() {
|
var GladeXML = function() {
|
||||||
var xml;
|
var xml;
|
||||||
|
|
||||||
this.load = function(filename) {
|
this.load = function(filename) {
|
||||||
xml = GTKExecCommand([
|
xml = GTKExecCommand([
|
||||||
"glade_xml_new",
|
"glade_xml_new",
|
||||||
filename,
|
filename,
|
||||||
"NULL",
|
"NULL",
|
||||||
"NULL"
|
"NULL"
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.findWidget = function(widgetName) {
|
this.findWidget = function(widgetName) {
|
||||||
var widgetId = GTKExecCommand([
|
var widgetId = GTKExecCommand([
|
||||||
"glade_xml_get_widget",
|
"glade_xml_get_widget",
|
||||||
xml,
|
xml,
|
||||||
widgetName
|
widgetName
|
||||||
]);
|
]);
|
||||||
var widget = new GTKWidget({
|
var widget = new GTKWidget({
|
||||||
widgetId: widgetId
|
widgetId: widgetId
|
||||||
});
|
});
|
||||||
widget.create();
|
widget.create();
|
||||||
return widget;
|
return widget;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.Widget = GTKWidget;
|
exports.Widget = GTKWidget;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user