From ab6c379e46014f6942cb1849b79a26250a81c96a Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 26 Aug 2012 17:16:11 +0100 Subject: [PATCH] statusicon: Fix some warnings --- SparkleShare/Linux/SparkleStatusIcon.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/SparkleShare/Linux/SparkleStatusIcon.cs b/SparkleShare/Linux/SparkleStatusIcon.cs index e37896d1..b76f6bb9 100644 --- a/SparkleShare/Linux/SparkleStatusIcon.cs +++ b/SparkleShare/Linux/SparkleStatusIcon.cs @@ -29,8 +29,6 @@ namespace SparkleShare { public SparkleStatusIconController Controller = new SparkleStatusIconController (); - private Gdk.Pixbuf [] animation_frames; - private Menu menu; private MenuItem recent_events_item; private MenuItem quit_item; @@ -40,20 +38,21 @@ namespace SparkleShare { private ApplicationIndicator indicator; #else private StatusIcon status_icon; + private Gdk.Pixbuf [] animation_frames; #endif public SparkleStatusIcon () { - CreateAnimationFrames (); - #if HAVE_APP_INDICATOR this.indicator = new ApplicationIndicator ("sparkleshare", "process-syncing-i", Category.ApplicationStatus); this.indicator.Status = Status.Active; #else - this.status_icon = new StatusIcon (); + CreateAnimationFrames (); + + this.status_icon = new StatusIcon (); this.status_icon.Pixbuf = this.animation_frames [0]; this.status_icon.Activate += ShowMenu; // Primary mouse button click @@ -278,7 +277,8 @@ namespace SparkleShare { }; } - + + #if !HAVE_APP_INDICATOR private void CreateAnimationFrames () { this.animation_frames = new Gdk.Pixbuf [] { @@ -289,7 +289,8 @@ namespace SparkleShare { SparkleUIHelpers.GetIcon ("process-syncing-iiiii", 24) }; } - + #endif + #if !HAVE_APP_INDICATOR // Makes the menu visible