I'm playing around with AppIndicator in Ubuntu Lucid. This code works: public static void Main (string[] args) { Gtk.Application.Init ();
ApplicationIndicator indicator = new ApplicationIndicator ("gmail-notifier", "gmail", Category.ApplicationStatus); Gtk.Menu menu = new Gtk.Menu (); Gtk.MenuItem testMenuItem = new Gtk.ImageMenuItem (Gtk.Stock.About, null); menu.Add (testMenuItem); menu.ShowAll (); indicator.Menu = menu; indicator.Status = Status.Active; Gtk.Application.Run (); } However, it fails when I try to factor it out into a separate class. The app indicator briefly appears, then disappears after a split second. The code for creating the app indicator is exactly the same. The application continues execution, but the indicator isn't there. I see no error or warning. public class GmailAppIndicator { public GmailAppIndicator () { ApplicationIndicator indicator = new ApplicationIndicator ("gmail-notifier", "gmail", Category.ApplicationStatus); Gtk.Menu menu = new Gtk.Menu (); Gtk.MenuItem testMenuItem = new Gtk.ImageMenuItem (Gtk.Stock.About, null); menu.Add (testMenuItem); menu.ShowAll (); indicator.Menu = menu; indicator.Status = Status.Active; } } ... public static void Main (string[] args) { Gtk.Application.Init (); GmailAppIndicator indicator = new GmailAppIndicator (); Gtk.Application.Run (); } Any idea why this is happening?
_______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/gtk-sharp-list