codejunky
codejunky

Reputation: 23

StatusIcon doesn't appear in notification area

I'm using following code to display a notfication icon in ubuntu 11.10 (gtk-sharp 2.12)

StatusIcon icon = StatusIcon.NewFromStock(Stock.Harddisk);
icon.Visible = true;

but the icon does not appear.

Do you have any advice?

Upvotes: 2

Views: 545

Answers (1)

Pete
Pete

Reputation: 11505

Newer releases of Ubuntu (using Unity) use a new system/library for notification icons called Application Indicators using the appindicator library. I suggest you look at using appindicator-sharp to create the indicator. You can see a sample patch for how it was implemented in Tomboy here. In order to have something that works for both Unity/Ubuntu and other traditional desktop environments, I suggest you take an approach similar to the one in Tomboy where at runtime you detect which style "notification icon" you should create.

Upvotes: 2

Related Questions