GUI updates

This commit is contained in:
Jim Norman 2005-10-12 22:47:25 +00:00
parent e216a450b9
commit 3e2465c1bf
4 changed files with 22 additions and 19 deletions

View File

@ -21,10 +21,11 @@ namespace Novell.CASA.GUI
public static System.Drawing.Icon m_iconNormal;
public static System.Drawing.Icon m_iconLocked;
#endif
#if LINUX
#if W32
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;
@ -37,7 +38,7 @@ namespace Novell.CASA.GUI
notifyIcon = new System.Windows.Forms.NotifyIcon();
try
{
s = File.OpenRead("../images/notify1.ico");
s = File.OpenRead("../images/CASAIcons.ico");
m_iconNormal = new System.Drawing.Icon(s);
notifyIcon.Icon = m_iconNormal;
}
@ -60,14 +61,14 @@ namespace Novell.CASA.GUI
try
{
s = File.OpenRead("../images/notifyLocked.ico");
s = File.OpenRead("../images/CASAIconsLocked.ico");
m_iconLocked = new System.Drawing.Icon(s);
}
catch (Exception e)
{
Console.WriteLine("File 'notifyLocked.ico' cannot be found");
Console.WriteLine("File 'CASAIcons.ico' cannot be found");
return;
}
@ -81,13 +82,15 @@ namespace Novell.CASA.GUI
//notifyIcon.Click +=new EventHandler(notifyIcon_Click);
notifyIcon.DoubleClick +=new EventHandler(notifyIcon_DoubleClick);
notifyIcon.MouseUp +=new System.Windows.Forms.MouseEventHandler(notifyIcon_MouseUp);
notifyIcon.Text = "CASA Manager";
notifyIcon.Visible = true;
UpdateTrayIcon(MiCASAStore.IsLocked());
#endif
#if LINUX
/* in order to receive signals, we need a eventbox, because Gtk.Image doesn't receive signals */
eb = new EventBox();
eb.Add(m_iconNormal); // using stock icon
eb.Add(); // using stock icon
// hooking event
eb.ButtonPressEvent += new ButtonPressEventHandler (this.OnImageClick);
@ -106,8 +109,8 @@ namespace Novell.CASA.GUI
MenuItem miSep2 = new MenuItem();
MenuItem miSep3 = new MenuItem();
ImageMenuItem menuLaunchGUI = new ImageMenuItem ("Launch CASAManager");
Image appimg = new Image(Stock.New, IconSize.Menu);
ImageMenuItem menuLaunchGUI = new ImageMenuItem ("Manage Secrets");
Image appimg = new Image("../images/CASA_16.png", IconSize.Menu);
menuLaunchGUI.Image = appimg; // sets the menu item's image
menuLaunchGUI.Activated +=new EventHandler(menuLaunchGUI_Activated);
popupMenu.Add(menuLaunchGUI);
@ -263,15 +266,15 @@ namespace Novell.CASA.GUI
{
#if W32
if (StoreIsLocked)
{
notifyIcon.Text = "miCASA - Locked";
notifyIcon.Icon = m_iconLocked;
}
else
{
notifyIcon.Text = "miCASA - Not Locked";
notifyIcon.Icon = m_iconNormal;
#endif
#if LINUX
if (StoreIsLocked)
eb.Reparent(m_imageLocked);
else
eb.Reparent(m_imageUnlocked);
}
#endif
}

BIN
c_gui/images/CASAicons.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -12,7 +12,7 @@
<property name="default_height">525</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">True</property>
<property name="icon">micasa-logo.png</property>
<property name="icon">CASAicons.ico</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@ -708,7 +708,7 @@
<child>
<widget class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="pixbuf">micasa-logo.png</property>
<property name="pixbuf">CASA_32.png</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
@ -2064,7 +2064,7 @@ their backend stores.</property>
<property name="default_height">600</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">True</property>
<property name="icon">micasa-logo.png</property>
<property name="icon">CASAicons.ico</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
@ -2717,7 +2717,7 @@ their backend stores.</property>
<child>
<widget class="GtkImage" id="image1700">
<property name="visible">True</property>
<property name="pixbuf">micasa-logo.png</property>
<property name="pixbuf">CASA_32.png</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>