From 291d53f4d709932a1e3350cbf5bdbc0b3a33ab18 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 26 Jun 2015 00:03:54 +0100 Subject: [PATCH] linux statusicon: Implement pause states and change icons --- SparkleShare/Linux/SparkleStatusIcon.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SparkleShare/Linux/SparkleStatusIcon.cs b/SparkleShare/Linux/SparkleStatusIcon.cs index 82658724..1b7f2dd6 100644 --- a/SparkleShare/Linux/SparkleStatusIcon.cs +++ b/SparkleShare/Linux/SparkleStatusIcon.cs @@ -148,14 +148,18 @@ namespace SparkleShare { MenuItem resume_item; if (project.UnsyncedChangesInfo.Count > 0) { - string icons_path = new string [] {SparkleUI.AssetsPath, "icons", "hicolor", "12x12", "status"}.Combine (); + string icons_path = new string [] { + SparkleUI.AssetsPath, "icons", "hicolor", "12x12", "status"}.Combine (); - foreach (KeyValuePair pair in project.UnsyncedChangesInfo) - (item.Submenu as Menu).Add (new MenuItem (pair.Key) { - // Image = new Image () { - // File = new string [] {icons_path, pair.Value.Replace ("-12", "")}.Combine () }, + foreach (KeyValuePair pair in project.UnsyncedChangesInfo) { + string icon_path = new string [] { + icons_path, pair.Value.Replace ("-12", "")}.Combine (); + + (item.Submenu as Menu).Add (new SparkleMenuItem (pair.Key) { + Image = new Image (icon_path), Sensitive = false }); + } if (!string.IsNullOrEmpty (project.MoreUnsyncedChanges)) { (item.Submenu as Menu).Add (new MenuItem (project.MoreUnsyncedChanges) {