XObject.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 13 May 2010 10:41:46 +0000 (18:41 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 13 May 2010 10:41:46 +0000 (18:41 +0800)
XObject.js

index e808c0a..9a3c994 100644 (file)
@@ -75,7 +75,17 @@ function XObject (cfg) {
     }
     this.items = this.items || [];
     // pack can be false!
-    this.pack = typeof(this.pack) == 'undefined' ? ['add'] : this.pack;
+    if (typeof(this.pack) == 'undefined') {
+        var Gtk  = imports.gi.Gtk;
+        this.pack = [ 'add' ]
+        switch (true) {
+            // any others!!
+            case (this.xtype == Gtk.Menu)  this.pack = [ 'append' ]; break;
+            
+        }
+        
+    }
+    
     
     
 }