diff --git a/SparkleShare/SparkleStatusIcon.cs b/SparkleShare/SparkleStatusIcon.cs index 58a43e91..6df38b6d 100644 --- a/SparkleShare/SparkleStatusIcon.cs +++ b/SparkleShare/SparkleStatusIcon.cs @@ -60,7 +60,7 @@ namespace SparkleShare { Menu.Add (StatusMenuItem); Menu.Add (new SeparatorMenuItem ()); - Action FolderAction = new Action ("", "SparkleShare Folder"); + Action FolderAction = new Action ("", "SparkleShare"); FolderAction.IconName = "folder-sparkleshare"; FolderAction.IsImportant = true; FolderAction.Activated += delegate { @@ -71,7 +71,7 @@ namespace SparkleShare { break; case "OSX": Process.StartInfo.FileName = "open"; - break; + break; } Process.StartInfo.Arguments = SparklePaths.SparklePath; Process.Start (); @@ -119,7 +119,7 @@ namespace SparkleShare { } }; - MenuItem AboutItem = new MenuItem (_("About SparkleShare")); + MenuItem AboutItem = new MenuItem (_("Visit Website")); AboutItem.Activated += delegate { Process Process = new Process (); switch (SparklePlatform.Name) { @@ -141,8 +141,7 @@ namespace SparkleShare { Menu.Add (QuitItem); Menu.ShowAll (); // TODO: Make sure the menu never overlaps the status icon - Menu.Popup (); - + Menu.Popup (null, null, SetPosition, 0, 0); } public void SetIdleState () { @@ -200,6 +199,13 @@ namespace SparkleShare { StateText = _("Error syncing"); } + // TODO: menu should not dissappear on mouse up + public void SetPosition (Menu menu, + out int x, out int y, + out bool push_in) { + PositionMenu (menu, out x, out y, out push_in, Handle); + } + // Quits the program public void Quit (object o, EventArgs args) { System.IO.File.Delete diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index 2aa0a5ab..3d95de2f 100644 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -54,13 +54,13 @@ namespace SparkleShare { break; } - // Add the SparkleShare folder to the bookmarks switch (SparklePlatform.Name) { case "GNOME": string BookmarksFileName = Path.Combine (SparklePaths.HomePath, ".gtk-bookmarks"); + if (File.Exists (BookmarksFileName)) { TextWriter TextWriter = File.AppendText (BookmarksFileName); TextWriter.WriteLine ("file://" + SparklePath + " SparkleShare"); @@ -68,6 +68,7 @@ namespace SparkleShare { } break; + } }