public static void Main(string[] args) { Application.Init (); MainWindow win = new MainWindow (); // creates the tray icon Tray test = new Tray (win); Application.Run (); }
public Tray(MainWindow win) { _mainwin = win; // we need a eventbox, because Gtk.Image doesn't receive signals EventBox eb = new EventBox (); eb.Add (new Image (Stock.Network, IconSize.Menu)); // using stock icon eb.ButtonPressEvent += new ButtonPressEventHandler (this.OnImageClick); TrayIcon icon = new TrayIcon ("MonoGnomeArt"); icon.Add (eb); // showing the trayicon icon.ShowAll (); }