statusicon: Fix some warnings
This commit is contained in:
parent
cd831b5fe9
commit
a270fa1976
|
@ -29,8 +29,6 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public SparkleStatusIconController Controller = new SparkleStatusIconController ();
|
public SparkleStatusIconController Controller = new SparkleStatusIconController ();
|
||||||
|
|
||||||
private Gdk.Pixbuf [] animation_frames;
|
|
||||||
|
|
||||||
private Menu menu;
|
private Menu menu;
|
||||||
private MenuItem recent_events_item;
|
private MenuItem recent_events_item;
|
||||||
private MenuItem quit_item;
|
private MenuItem quit_item;
|
||||||
|
@ -40,20 +38,21 @@ namespace SparkleShare {
|
||||||
private ApplicationIndicator indicator;
|
private ApplicationIndicator indicator;
|
||||||
#else
|
#else
|
||||||
private StatusIcon status_icon;
|
private StatusIcon status_icon;
|
||||||
|
private Gdk.Pixbuf [] animation_frames;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
public SparkleStatusIcon ()
|
public SparkleStatusIcon ()
|
||||||
{
|
{
|
||||||
CreateAnimationFrames ();
|
|
||||||
|
|
||||||
#if HAVE_APP_INDICATOR
|
#if HAVE_APP_INDICATOR
|
||||||
this.indicator = new ApplicationIndicator ("sparkleshare",
|
this.indicator = new ApplicationIndicator ("sparkleshare",
|
||||||
"process-syncing-i", Category.ApplicationStatus);
|
"process-syncing-i", Category.ApplicationStatus);
|
||||||
|
|
||||||
this.indicator.Status = Status.Active;
|
this.indicator.Status = Status.Active;
|
||||||
#else
|
#else
|
||||||
this.status_icon = new StatusIcon ();
|
CreateAnimationFrames ();
|
||||||
|
|
||||||
|
this.status_icon = new StatusIcon ();
|
||||||
this.status_icon.Pixbuf = this.animation_frames [0];
|
this.status_icon.Pixbuf = this.animation_frames [0];
|
||||||
|
|
||||||
this.status_icon.Activate += ShowMenu; // Primary mouse button click
|
this.status_icon.Activate += ShowMenu; // Primary mouse button click
|
||||||
|
@ -278,7 +277,8 @@ namespace SparkleShare {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if !HAVE_APP_INDICATOR
|
||||||
private void CreateAnimationFrames ()
|
private void CreateAnimationFrames ()
|
||||||
{
|
{
|
||||||
this.animation_frames = new Gdk.Pixbuf [] {
|
this.animation_frames = new Gdk.Pixbuf [] {
|
||||||
|
@ -289,7 +289,8 @@ namespace SparkleShare {
|
||||||
SparkleUIHelpers.GetIcon ("process-syncing-iiiii", 24)
|
SparkleUIHelpers.GetIcon ("process-syncing-iiiii", 24)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !HAVE_APP_INDICATOR
|
#if !HAVE_APP_INDICATOR
|
||||||
// Makes the menu visible
|
// Makes the menu visible
|
||||||
|
|
Loading…
Reference in a new issue