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 ()
{
if (InstallationInfo.OperatingSystem == OS.Ubuntu) {
#if HAVE_APP_INDICATOR
#if HAVE_APP_INDICATOR
indicator = new Indicator ("sparkleshare", "sparkleshare", (int) IndicatorCategory.ApplicationStatus) {
IconName = "process-syncing-idle",
IconName = "org.sparkleshare.SparkleShare",
Status = (int) IndicatorStatus.Active
};
#endif
Console.WriteLine ("INDICATOR: " + indicator.IconName);
#endif
} else {
this.status_icon = new Gtk.StatusIcon { IconName = "org.sparkleshare.SparkleShare" };
@ -67,9 +69,9 @@ namespace SparkleShare {
Application.Invoke (delegate {
string icon_name = "org.sparkleshare.SparkleShare";
if (InstallationInfo.OperatingSystem == OS.Ubuntu) {
icon_name = "process-syncing-idle";
}
// if (InstallationInfo.OperatingSystem == OS.Ubuntu) {
// icon_name = "process-syncing-idle";
// }
if (state == IconState.SyncingUp)
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'
# if appindicator.found()
# args = [args, '-define:HAVE_APP_INDICATOR']
# endif
if appindicator.found()
args = [args, '-define:HAVE_APP_INDICATOR']
endif
sparkleshare = executable('SparkleShare',
dependencies: [gtk, gdk, gio, glib, webkit, notify, appindicator],