mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +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
|
||||
var GTKCreateWidget = function(widget) {
|
||||
var widgetID = "", commands = [];
|
||||
var widgetID, commands = [];
|
||||
|
||||
switch (widget.widgetType) {
|
||||
case "Window":
|
||||
|
@ -44,7 +44,7 @@ var GTKCreateWidget = function(widget) {
|
|||
// attach sub widgets to table
|
||||
var subWidgets = widget.attachedWidgets;
|
||||
var countSubWidgets = subWidgets.length;
|
||||
while(countSubWidgets > 0) {
|
||||
while (countSubWidgets > 0) {
|
||||
commands.push([
|
||||
"gtk_table_attach_defaults",
|
||||
this.widgetID,
|
||||
|
@ -72,6 +72,7 @@ var GTKCreateWidget = function(widget) {
|
|||
"NULL",
|
||||
"NULL"
|
||||
]);
|
||||
|
||||
break;
|
||||
|
||||
case "RadioBox":
|
||||
|
@ -94,8 +95,8 @@ var GTKCreateWidget = function(widget) {
|
|||
// get widgetID from first command
|
||||
widgetID = GTKExecCommand(commands.pop());
|
||||
|
||||
// execute next command
|
||||
while(commands.length > 0) {
|
||||
// execute next commands
|
||||
while (commands.length > 0) {
|
||||
GTKExecCommand(commands.pop());
|
||||
}
|
||||
|
||||
|
@ -210,7 +211,6 @@ var Entry = function() {
|
|||
]);
|
||||
};
|
||||
this.setText = function(text) {
|
||||
.
|
||||
return GTKExecCommand([
|
||||
"gtk_entry_set_text",
|
||||
this.widgetID,
|
||||
|
|
Loading…
Reference in New Issue
Block a user