// Import and initialize GTK+
Gtk = imports.gi.Gtk;
+Gdk = imports.gi.Gdk;
Gtk.init(null, null);
// Create the window
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();
// 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);
}