From dbe9ceea19180d164ddc7aa4b69f3fbe5384120e Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 17 Apr 2017 09:50:32 +0100 Subject: [PATCH] linux: Add ifdef for Run method to work on different gtk-sharp versions --- SparkleShare/Linux/UserInterface.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SparkleShare/Linux/UserInterface.cs b/SparkleShare/Linux/UserInterface.cs index f147ed30..8cb4c2e6 100644 --- a/SparkleShare/Linux/UserInterface.cs +++ b/SparkleShare/Linux/UserInterface.cs @@ -61,8 +61,15 @@ namespace SparkleShare { public void Run (string [] args) - { - (application as GLib.Application).Run (0, null); + { + // FIXME: Hack to cover API differences between Ubuntu and latest GNOME + if (InstallationInfo.OperatingSystem == OS.Ubuntu) { + #if HAVE_APP_INDICATOR + (application as GLib.Application).Run (0, null); + #endif + } else { + (application as GLib.Application).Run ("org.sparkleshare.SparkleShare", new string [0]); + } }