Tray changes
This commit is contained in:
parent
d3c42c3f5d
commit
b4a74487d4
@ -21,6 +21,11 @@ namespace Novell.CASA.GUI
|
||||
public static System.Drawing.Icon m_iconNormal;
|
||||
public static System.Drawing.Icon m_iconLocked;
|
||||
#endif
|
||||
#if LINUX
|
||||
EventBox eb;
|
||||
private Gtk.Image m_imageLocked = new Image("gtk-dialog-authentication", IconSize.Menu);
|
||||
private Gtk.Image m_imageUnlocked = new Image(Stock.MissingImage, IconSize.Menu);
|
||||
#endif
|
||||
|
||||
private static CasaMain mCasaMain = null;
|
||||
|
||||
@ -81,12 +86,11 @@ namespace Novell.CASA.GUI
|
||||
#endif
|
||||
#if LINUX
|
||||
/* in order to receive signals, we need a eventbox, because Gtk.Image doesn't receive signals */
|
||||
EventBox eb = new EventBox();
|
||||
eb.Add(new Image(Stock.MissingImage, IconSize.Menu)); // using stock icon
|
||||
eb = new EventBox();
|
||||
eb.Add(m_iconNormal); // using stock icon
|
||||
// hooking event
|
||||
eb.ButtonPressEvent += new ButtonPressEventHandler (this.OnImageClick);
|
||||
|
||||
|
||||
eb.ButtonPressEvent += new ButtonPressEventHandler (this.OnImageClick);
|
||||
|
||||
Egg.TrayIcon icon = new Egg.TrayIcon("Test");
|
||||
icon.Add(eb);
|
||||
// showing the trayicon
|
||||
@ -263,6 +267,13 @@ namespace Novell.CASA.GUI
|
||||
else
|
||||
notifyIcon.Icon = m_iconNormal;
|
||||
#endif
|
||||
#if LINUX
|
||||
if (StoreIsLocked)
|
||||
eb.Reparent(m_imageLocked);
|
||||
else
|
||||
eb.Reparent(m_imageUnlocked);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user