diff --git a/SparkleShare/Windows/SparkleNotifyIcon.cs b/SparkleShare/Windows/SparkleNotifyIcon.cs index 89b867f3..2ac66a24 100644 --- a/SparkleShare/Windows/SparkleNotifyIcon.cs +++ b/SparkleShare/Windows/SparkleNotifyIcon.cs @@ -67,13 +67,28 @@ namespace SparkleShare { } } + public string HeaderText { + get { + return header_text; + } + + set { + header_text = value; + } + } + public string Text { get { return (string) GetValue (TextProperty); } set { - SetValue (TextProperty, value); + string text = value; + + if (!string.IsNullOrEmpty (header_text)) + text = header_text + "\n" + text; + + SetValue (TextProperty, text); } } @@ -108,6 +123,7 @@ namespace SparkleShare { "Text", typeof(string), typeof (SparkleNotifyIcon), new PropertyMetadata (OnTextChanged)); + private string header_text; private Forms.NotifyIcon notify_icon; private HookProc hook_proc_ref; private int mouse_hook_handle; diff --git a/SparkleShare/Windows/SparkleStatusIcon.cs b/SparkleShare/Windows/SparkleStatusIcon.cs index c2770925..a43e6d55 100644 --- a/SparkleShare/Windows/SparkleStatusIcon.cs +++ b/SparkleShare/Windows/SparkleStatusIcon.cs @@ -40,9 +40,7 @@ namespace SparkleShare { private SparkleMenuItem status_item; private SparkleMenuItem exit_item; - private SparkleNotifyIcon notify_icon = new SparkleNotifyIcon () { - Text = "SparkleShare" - }; + private SparkleNotifyIcon notify_icon = new SparkleNotifyIcon (); // Short alias for the translations @@ -59,11 +57,12 @@ namespace SparkleShare { ErrorIcon = SparkleUIHelpers.GetBitmap ("sparkleshare-syncing-error-windows"); this.notify_icon.Icon = AnimationFrames [0]; - + this.notify_icon.HeaderText = "SparkleShare"; + if (Controller.Folders.Length == 0) StateText = _("Welcome to SparkleShare!"); else - StateText = _("Files up to date") + Controller.FolderSize; + this.notify_icon.Text = StateText = _("Files up to date") + Controller.FolderSize; CreateMenu (); @@ -84,9 +83,9 @@ namespace SparkleShare { Animation.Stop (); if (Controller.Folders.Length == 0) - StateText = "Welcome to SparkleShare!"; + this.notify_icon.Text = StateText = "Welcome to SparkleShare!"; else - StateText = "Files up to date" + Controller.FolderSize; + this.notify_icon.Text = StateText = "Files up to date" + Controller.FolderSize; this.status_item.Header = StateText; @@ -99,7 +98,7 @@ namespace SparkleShare { case IconState.Syncing: { - StateText = "Syncing… " + + this.notify_icon.Text = StateText = "Syncing… " + Controller.ProgressPercentage + "% " + Controller.ProgressSpeed; @@ -115,7 +114,7 @@ namespace SparkleShare { Animation.Stop (); - StateText = _("Not everything is synced"); + this.notify_icon.Text = StateText = _("Not everything is synced"); this.status_item.Header = StateText; CreateMenu ();