diff --git a/SparkleShare/Linux/Pixmaps/icons/Makefile.am b/SparkleShare/Linux/Pixmaps/icons/Makefile.am index c6dd2af2..9d4fca7d 100755 --- a/SparkleShare/Linux/Pixmaps/icons/Makefile.am +++ b/SparkleShare/Linux/Pixmaps/icons/Makefile.am @@ -13,14 +13,14 @@ system_theme_icons = \ apps,sparkleshare-256.png \ apps,sparkleshare-32.png \ apps,sparkleshare-48.png \ - status,process-syncing-up-24.png \ - status,process-syncing-down-24.png \ - status,process-syncing-24.png \ - status,process-syncing-error-24.png \ - status,process-syncing-up-48.png \ - status,process-syncing-down-48.png \ - status,process-syncing-48.png \ - status,process-syncing-error-48.png + status,process-syncing-up-24.png \ + status,process-syncing-down-24.png \ + status,process-syncing-24.png \ + status,process-syncing-error-24.png \ + status,process-syncing-up-48.png \ + status,process-syncing-down-48.png \ + status,process-syncing-48.png \ + status,process-syncing-error-48.png app_theme_icons = \ status,document-added-12.png \ diff --git a/SparkleShare/Linux/SparkleAbout.cs b/SparkleShare/Linux/SparkleAbout.cs index 74f424c3..cc15b4da 100755 --- a/SparkleShare/Linux/SparkleAbout.cs +++ b/SparkleShare/Linux/SparkleAbout.cs @@ -29,7 +29,9 @@ namespace SparkleShare { public SparkleAbout () : base ("About SparkleShare") { - IconName = "folder-sparkleshare"; + SetWmclass ("SparkleShare", "SparkleShare"); + + IconName = "sparkleshare"; Resizable = false; WindowPosition = WindowPosition.Center; diff --git a/SparkleShare/Linux/SparkleEventLog.cs b/SparkleShare/Linux/SparkleEventLog.cs index 07c46b61..db6ff3f9 100755 --- a/SparkleShare/Linux/SparkleEventLog.cs +++ b/SparkleShare/Linux/SparkleEventLog.cs @@ -42,10 +42,12 @@ namespace SparkleShare { public SparkleEventLog () : base ("Recent Changes") { + SetWmclass ("SparkleShare", "SparkleShare"); + Gdk.Rectangle monitor_0_rect = Gdk.Screen.Default.GetMonitorGeometry (0); SetSizeRequest (480, (int) (monitor_0_rect.Height * 0.8)); - IconName = "folder-sparkleshare"; + IconName = "sparkleshare"; this.pos_x = (int) (monitor_0_rect.Width * 0.61); this.pos_y = (int) (monitor_0_rect.Height * 0.5 - (HeightRequest * 0.5)); diff --git a/SparkleShare/Linux/SparkleSetupWindow.cs b/SparkleShare/Linux/SparkleSetupWindow.cs index 52505059..1e00f701 100755 --- a/SparkleShare/Linux/SparkleSetupWindow.cs +++ b/SparkleShare/Linux/SparkleSetupWindow.cs @@ -35,12 +35,15 @@ namespace SparkleShare { public SparkleSetupWindow () : base ("SparkleShare Setup") { - IconName = "folder-sparkleshare"; + SetWmclass ("SparkleShare", "SparkleShare"); + + IconName = "sparkleshare"; Resizable = false; WindowPosition = WindowPosition.Center; Deletable = false; TypeHint = Gdk.WindowTypeHint.Dialog; + SetSizeRequest (680, 400); DeleteEvent += delegate (object sender, DeleteEventArgs args) { args.RetVal = true; }; diff --git a/SparkleShare/Linux/SparkleUI.cs b/SparkleShare/Linux/SparkleUI.cs index a5dcf6f0..e7af9c2b 100644 --- a/SparkleShare/Linux/SparkleUI.cs +++ b/SparkleShare/Linux/SparkleUI.cs @@ -17,6 +17,7 @@ using System; +using GLib; using Gtk; using SparkleLib; @@ -32,25 +33,45 @@ namespace SparkleShare { public static string AssetsPath = Defines.INSTALL_DIR; + private Gtk.Application application; + // TODO: port sparkleshare.in public SparkleUI () { - Application.Init (); + application = new Gtk.Application ("org.sparkleshare.sparkleshare", 0); - Setup = new SparkleSetup (); - EventLog = new SparkleEventLog (); - About = new SparkleAbout (); - Bubbles = new SparkleBubbles (); - StatusIcon = new SparkleStatusIcon (); - - Program.Controller.UIHasLoaded (); + application.Register (null); + application.Activated += ApplicationActivatedDelegate; } - // Runs the application public void Run () + { + (application as GLib.Application).Run (0, null); + } + + + private void ApplicationActivatedDelegate (object sender, EventArgs args) { - Application.Run (); + if (application.Windows.Length > 0) { + foreach (Window window in application.Windows) { + if (window.Visible) + window.Present (); + } + + } else { + Setup = new SparkleSetup (); + EventLog = new SparkleEventLog (); + About = new SparkleAbout (); + Bubbles = new SparkleBubbles (); + StatusIcon = new SparkleStatusIcon (); + + Setup.Application = application; + EventLog.Application = application; + About.Application = application; + + Program.Controller.UIHasLoaded (); + } } } }