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 (); }
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(); }