mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-21 17:11:05 +00:00
Update gtk.js
This commit is contained in:
parent
9cd9bbc6b6
commit
e2c927f9ad
10
lib/gtk.js
10
lib/gtk.js
|
@ -23,7 +23,7 @@ var GTKWidget = function() {
|
||||||
|
|
||||||
// GTKCreateElement
|
// GTKCreateElement
|
||||||
var GTKCreateWidget = function(widget) {
|
var GTKCreateWidget = function(widget) {
|
||||||
var widgetID = "", commands = [];
|
var widgetID, commands = [];
|
||||||
|
|
||||||
switch (widget.widgetType) {
|
switch (widget.widgetType) {
|
||||||
case "Window":
|
case "Window":
|
||||||
|
@ -44,7 +44,7 @@ var GTKCreateWidget = function(widget) {
|
||||||
// attach sub widgets to table
|
// attach sub widgets to table
|
||||||
var subWidgets = widget.attachedWidgets;
|
var subWidgets = widget.attachedWidgets;
|
||||||
var countSubWidgets = subWidgets.length;
|
var countSubWidgets = subWidgets.length;
|
||||||
while(countSubWidgets > 0) {
|
while (countSubWidgets > 0) {
|
||||||
commands.push([
|
commands.push([
|
||||||
"gtk_table_attach_defaults",
|
"gtk_table_attach_defaults",
|
||||||
this.widgetID,
|
this.widgetID,
|
||||||
|
@ -72,6 +72,7 @@ var GTKCreateWidget = function(widget) {
|
||||||
"NULL",
|
"NULL",
|
||||||
"NULL"
|
"NULL"
|
||||||
]);
|
]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "RadioBox":
|
case "RadioBox":
|
||||||
|
@ -94,8 +95,8 @@ var GTKCreateWidget = function(widget) {
|
||||||
// get widgetID from first command
|
// get widgetID from first command
|
||||||
widgetID = GTKExecCommand(commands.pop());
|
widgetID = GTKExecCommand(commands.pop());
|
||||||
|
|
||||||
// execute next command
|
// execute next commands
|
||||||
while(commands.length > 0) {
|
while (commands.length > 0) {
|
||||||
GTKExecCommand(commands.pop());
|
GTKExecCommand(commands.pop());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +211,6 @@ var Entry = function() {
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
this.setText = function(text) {
|
this.setText = function(text) {
|
||||||
.
|
|
||||||
return GTKExecCommand([
|
return GTKExecCommand([
|
||||||
"gtk_entry_set_text",
|
"gtk_entry_set_text",
|
||||||
this.widgetID,
|
this.widgetID,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user