From 143e833a8dccc87a559cebb684e27bb473474053 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Wed, 12 Oct 2005 23:10:40 +0000 Subject: [PATCH] Changes for linux --- c_gui/CasaTray.cs | 70 +++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/c_gui/CasaTray.cs b/c_gui/CasaTray.cs index d689bcbd..50e8cb91 100644 --- a/c_gui/CasaTray.cs +++ b/c_gui/CasaTray.cs @@ -10,7 +10,7 @@ using Novell.CASA; using Novell.CASA.MiCasa.Common; using Novell.CASA.MiCasa.Communication; -namespace Novell.CASA.GUI +namespace Novell.CASA.GUI { public class CasaTray { @@ -23,8 +23,8 @@ namespace Novell.CASA.GUI #endif #if LINUX EventBox eb; - private Gtk.Image m_imageLocked = new Image("../images/CASA_16.png", IconSize.Menu); - private Gtk.Image m_imageUnlocked = new Image("../images/CASA_16.png", IconSize.Menu); + private Gtk.Image m_imageLocked = new Image("images/CASA_16.png", IconSize.Menu); + private Gtk.Image m_imageUnlocked = new Image(Stock.Find, IconSize.Menu); #endif @@ -90,7 +90,7 @@ namespace Novell.CASA.GUI #if LINUX /* in order to receive signals, we need a eventbox, because Gtk.Image doesn't receive signals */ eb = new EventBox(); - eb.Add(); // using stock icon + eb.Add(m_imageUnlocked); // using stock icon // hooking event eb.ButtonPressEvent += new ButtonPressEventHandler (this.OnImageClick); @@ -110,7 +110,7 @@ namespace Novell.CASA.GUI MenuItem miSep3 = new MenuItem(); ImageMenuItem menuLaunchGUI = new ImageMenuItem ("Manage Secrets"); - Image appimg = new Image("../images/CASA_16.png", IconSize.Menu); + Image appimg = new Image(Stock.New, IconSize.Menu); menuLaunchGUI.Image = appimg; // sets the menu item's image menuLaunchGUI.Activated +=new EventHandler(menuLaunchGUI_Activated); popupMenu.Add(menuLaunchGUI); @@ -249,34 +249,34 @@ namespace Novell.CASA.GUI string MICASA_PASSCODE_BY_MASTER_PASSWD_FILE = "/.miCASAPCByMPasswd"; string fileName = Environment.GetEnvironmentVariable("HOME")+MICASA_PASSCODE_BY_MASTER_PASSWD_FILE; return (File.Exists(fileName)); - } - */ - - private void notifyIcon_DoubleClick(object sender, EventArgs e) - { - menuLockMiCasa_Activated(sender, e); - } - - private void menuDestroyMiCasa_Activated(object sender, EventArgs e) - { - CommonGUI.menuDestroyMiCasa_Activated(sender, e); - } - - internal void UpdateTrayIcon(bool StoreIsLocked) - { -#if W32 - if (StoreIsLocked) - { - notifyIcon.Text = "miCASA - Locked"; - notifyIcon.Icon = m_iconLocked; - } - else - { - notifyIcon.Text = "miCASA - Not Locked"; - notifyIcon.Icon = m_iconNormal; - } -#endif - - } + } + */ + + private void notifyIcon_DoubleClick(object sender, EventArgs e) + { + menuLockMiCasa_Activated(sender, e); + } + + private void menuDestroyMiCasa_Activated(object sender, EventArgs e) + { + CommonGUI.menuDestroyMiCasa_Activated(sender, e); + } + + internal void UpdateTrayIcon(bool StoreIsLocked) + { +#if W32 + if (StoreIsLocked) + { + notifyIcon.Text = "miCASA - Locked"; + notifyIcon.Icon = m_iconLocked; + } + else + { + notifyIcon.Text = "miCASA - Not Locked"; + notifyIcon.Icon = m_iconNormal; + } +#endif + + } } -} \ No newline at end of file +}