Fix appindicator

This commit is contained in:
Hylke Bons 2018-03-17 10:30:26 +00:00
parent a895f2a66c
commit 07c41546bf
2 changed files with 11 additions and 9 deletions

View file

@ -48,12 +48,14 @@ namespace SparkleShare {
public StatusIcon () public StatusIcon ()
{ {
if (InstallationInfo.OperatingSystem == OS.Ubuntu) { if (InstallationInfo.OperatingSystem == OS.Ubuntu) {
#if HAVE_APP_INDICATOR #if HAVE_APP_INDICATOR
indicator = new Indicator ("sparkleshare", "sparkleshare", (int) IndicatorCategory.ApplicationStatus) { indicator = new Indicator ("sparkleshare", "sparkleshare", (int) IndicatorCategory.ApplicationStatus) {
IconName = "process-syncing-idle", IconName = "org.sparkleshare.SparkleShare",
Status = (int) IndicatorStatus.Active Status = (int) IndicatorStatus.Active
}; };
#endif
Console.WriteLine ("INDICATOR: " + indicator.IconName);
#endif
} else { } else {
this.status_icon = new Gtk.StatusIcon { IconName = "org.sparkleshare.SparkleShare" }; this.status_icon = new Gtk.StatusIcon { IconName = "org.sparkleshare.SparkleShare" };
@ -67,9 +69,9 @@ namespace SparkleShare {
Application.Invoke (delegate { Application.Invoke (delegate {
string icon_name = "org.sparkleshare.SparkleShare"; string icon_name = "org.sparkleshare.SparkleShare";
if (InstallationInfo.OperatingSystem == OS.Ubuntu) { // if (InstallationInfo.OperatingSystem == OS.Ubuntu) {
icon_name = "process-syncing-idle"; // icon_name = "process-syncing-idle";
} // }
if (state == IconState.SyncingUp) if (state == IconState.SyncingUp)
icon_name = "process-syncing-up"; icon_name = "process-syncing-up";

View file

@ -45,9 +45,9 @@ appindicator = dependency('appindicator3-sharp-0.1', required: get_option('ubunt
args = '-r:Mono.Posix' args = '-r:Mono.Posix'
# if appindicator.found() if appindicator.found()
# args = [args, '-define:HAVE_APP_INDICATOR'] args = [args, '-define:HAVE_APP_INDICATOR']
# endif endif
sparkleshare = executable('SparkleShare', sparkleshare = executable('SparkleShare',
dependencies: [gtk, gdk, gio, glib, webkit, notify, appindicator], dependencies: [gtk, gdk, gio, glib, webkit, notify, appindicator],