diff --git a/lib/gtk.js b/lib/gtk.js index 5de4e87..c07ea6a 100644 --- a/lib/gtk.js +++ b/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,