From a6a681c5bc2073d0d719ff69993a3c28f28f8f77 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Mon, 31 Jul 2017 12:25:23 +0100 Subject: [PATCH] build: Use right version of main loop on Ubuntu --- SparkleShare/Linux/UserInterface.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SparkleShare/Linux/UserInterface.cs b/SparkleShare/Linux/UserInterface.cs index 1f3d19ab..68921edf 100644 --- a/SparkleShare/Linux/UserInterface.cs +++ b/SparkleShare/Linux/UserInterface.cs @@ -20,9 +20,11 @@ using System; using Gtk; using Sparkles; -namespace SparkleShare { +namespace SparkleShare +{ - public class UserInterface { + public class UserInterface + { public static string AssetsPath = InstallationInfo.Directory; @@ -46,7 +48,7 @@ namespace SparkleShare { application.Register (null); application.Activated += ApplicationActivatedDelegate; - Gdk.Color color = UserInterfaceHelpers.RGBAToColor (new Label().StyleContext.GetColor (StateFlags.Insensitive)); + Gdk.Color color = UserInterfaceHelpers.RGBAToColor (new Label ().StyleContext.GetColor (StateFlags.Insensitive)); SecondaryTextColor = UserInterfaceHelpers.ColorToHex (color); var tree_view = new TreeView (); @@ -55,7 +57,7 @@ namespace SparkleShare { UserInterfaceHelpers.RGBAToColor (tree_view.StyleContext.GetColor (StateFlags.Selected)), UserInterfaceHelpers.RGBAToColor (tree_view.StyleContext.GetBackgroundColor (StateFlags.Selected)), 0.39); - + SecondaryTextColorSelected = UserInterfaceHelpers.ColorToHex (color); } @@ -68,8 +70,11 @@ namespace SparkleShare { (application as GLib.Application).Run (0, null); #endif } else { - (application as GLib.Application).Run ("org.sparkleshare.SparkleShare", new string [0]); - } + #if HAVE_APP_INDICATOR + #else + (application as GLib.Application).Run ("org.sparkleshare.SparkleShare", new string [0]); + #endif + } }