X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=tests%2Fstatus_icon.js;h=07658044ce03ee38f20ebabd5fc5bdc3d20c5083;hb=db91cf4f4b993a8b4ed3ef5166cd15a0473f3caa;hp=b2f6f9ee18368e5d659f8815992ac07c676e199d;hpb=b18f1b99a2757bcd3653e829977774c5855058d6;p=app.Builder.js diff --git a/tests/status_icon.js b/tests/status_icon.js index b2f6f9ee1..07658044c 100644 --- a/tests/status_icon.js +++ b/tests/status_icon.js @@ -2,6 +2,7 @@ // Import and initialize GTK+ Gtk = imports.gi.Gtk; +Gdk = imports.gi.Gdk; Gtk.init(null, null); // Create the window @@ -10,7 +11,7 @@ window.set_default_size(600, 500); window.signal.hide.connect(Gtk.main_quit); // Create the GtkStatusIcon from a file -var icon = new Gtk.StatusIcon({file : "/home/marin/Bureau/Bric_a_brac/notify/icon.png"}); +var icon = new Gtk.StatusIcon({stock : Gtk.STOCK_MEDIA_PLAY}); // Create the menu var menu = new Gtk.Menu(); @@ -27,10 +28,15 @@ function active(status_icon, button, time, data) // GtkMenu.popup, calling the Gtk.StatusIcon.position_menu function // var area = new Gdk.Rectangle(); - var orient = new Gtk.Orientation(); + var ret = {}; - status_icon.get_geometry(ret, area, orient); + status_icon.get_geometry(ret); + print(ret.orientation); + print(ret.area.width); + print(ret.area.height); + print(ret.area.x); + print(ret.area.y); menu.popup(null, null, Gtk.StatusIcon.position_menu, status_icon, button, time); }