Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=6f24e54a919685a3acaa69b785247a2ded118ddd

commit 6f24e54a919685a3acaa69b785247a2ded118ddd
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Fri Sep 10 12:09:21 2010 +0000

*change icon to systray when update available
*thanks centuri0 for the png

diff --git a/frugal-mono-tools/Main.cs b/frugal-mono-tools/Main.cs
index 0fcaa86..bfc0d0e 100644
--- a/frugal-mono-tools/Main.cs
+++ b/frugal-mono-tools/Main.cs
@@ -59,6 +59,9 @@ namespace frugalmonotools

if (Update.CheckUpdate())
{
+                               Pixbuf ico = 
global::Gdk.Pixbuf.LoadFromResource 
("frugalmonotools.Pictures.systrayupdate.png");
+                               trayIcon.Pixbuf=ico;
+
if(Debug.ModeDebug)
{
foreach (packageCheck pkg in Update.UpdatePkg)
@@ -70,6 +73,11 @@ namespace frugalmonotools
if(configuration.Get_ShowNotif()) notif.ShowMessage("Frugalware","Some update 
are available.");
Console.WriteLine("Some packages can be updated.");
}
+                       else
+                       {
+                               Pixbuf ico = 
global::Gdk.Pixbuf.LoadFromResource ("frugalmonotools.Pictures.systray.png");
+                               trayIcon.Pixbuf=ico;
+                       }
if(Fen!=null)
{
//update list to treeview
@@ -190,6 +198,11 @@ namespace frugalmonotools
//started with X session
Gtk.Application.Init();
Console.WriteLine("check update packages.");
+                                                       // Creation of the Icon
+                                                       Pixbuf ico = 
global::Gdk.Pixbuf.LoadFromResource ("frugalmonotools.Pictures.systray.png");
+
+                                                       trayIcon = new 
StatusIcon(ico);
+                                                       trayIcon.Visible = true;
check();
ServicesRc.CheckList();
Fen = new MainWindow();
@@ -200,9 +213,7 @@ namespace frugalmonotools
// Set the Interval to 1 hour.
aTimer.Interval=3600000;
aTimer.Enabled=true;
-                                                       // Creation of the Icon
-                                                       trayIcon = new 
StatusIcon(new Pixbuf ("/usr/share/pixmaps/FrugalTools.png"));
-                                                       trayIcon.Visible = true;
+

trayIcon.Activate +=  delegate {  Fen.Visible = !Fen.Visible; };

diff --git a/frugal-mono-tools/Pictures/systray.png 
b/frugal-mono-tools/Pictures/systray.png
new file mode 100644
index 0000000..66e80de
Binary files /dev/null and b/frugal-mono-tools/Pictures/systray.png differ
diff --git a/frugal-mono-tools/Pictures/systrayupdate.png 
b/frugal-mono-tools/Pictures/systrayupdate.png
new file mode 100644
index 0000000..2576a64
Binary files /dev/null and b/frugal-mono-tools/Pictures/systrayupdate.png differ
diff --git a/frugal-mono-tools/frugal-mono-tools.csproj 
b/frugal-mono-tools/frugal-mono-tools.csproj
index b4d7def..cfab48b 100644
--- a/frugal-mono-tools/frugal-mono-tools.csproj
+++ b/frugal-mono-tools/frugal-mono-tools.csproj
@@ -63,6 +63,8 @@
<EmbeddedResource Include="Pictures\lxdelogo.png" />
<EmbeddedResource Include="Pictures\splash.png" />
<EmbeddedResource Include="Pictures\nmlogo.png" />
+    <EmbeddedResource Include="Pictures\systray.png" />
+    <EmbeddedResource Include="Pictures\systrayupdate.png" />
<EmbeddedResource Include="Pictures\wicdlogo.png" />
<EmbeddedResource Include="Pictures\xfcelogo.png" />
<EmbeddedResource Include="Pictures\xorglogo.png" />
@@ -105,6 +107,8 @@
<ItemGroup>
<None Include="TODO" />
<None Include="LICENSE" />
+    <None Include="Pictures\systray.png" />
+    <None Include="Pictures\systrayupdate.png" />
</ItemGroup>
<ItemGroup>
<Content Include="Data\frugal-tweak.desktop" />
@@ -115,4 +119,4 @@
<Name>RSS.NET</Name>
</ProjectReference>
</ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to