diff --git a/SparkleLib/SparkleListenerTcp.cs b/SparkleLib/SparkleListenerTcp.cs index 1bb38a1d..24ec0f70 100755 --- a/SparkleLib/SparkleListenerTcp.cs +++ b/SparkleLib/SparkleListenerTcp.cs @@ -91,7 +91,8 @@ namespace SparkleLib { this.is_connected = false; this.is_connecting = false; - this.socket.Dispose (); + if (this.socket != null) + this.socket.Close (); OnDisconnected (e.Message); return; @@ -158,7 +159,8 @@ namespace SparkleLib { this.is_connected = false; this.is_connecting = false;; - this.socket.Dispose (); + if (this.socket != null) + this.socket.Close (); OnDisconnected ("Ping timeout"); return; @@ -244,6 +246,9 @@ namespace SparkleLib { this.thread.Abort (); this.thread.Join (); + if (this.socket != null) + this.socket.Close (); + base.Dispose (); } diff --git a/SparkleShare/Makefile.am b/SparkleShare/Makefile.am index ad557503..9b34f320 100755 --- a/SparkleShare/Makefile.am +++ b/SparkleShare/Makefile.am @@ -23,8 +23,8 @@ SOURCES = \ SparkleEventLog.cs \ SparkleEventLogController.cs \ SparkleExtensions.cs \ - SparkleOptions.cs \ SparkleInvite.cs \ + SparkleOptions.cs \ SparklePlugin.cs \ SparkleSetup.cs \ SparkleSetupController.cs \ diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 24354f5e..ea42c837 100755 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -74,6 +74,12 @@ namespace SparkleShare { SparkleHelpers.DebugInfo ("Controller", "Enabled autostart on login"); } } + + + public override void InstallProtocolHandler () + { + // TODO + } // Adds the SparkleShare folder to the user's diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index b4224018..ec9d54c6 100755 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -94,10 +94,6 @@ namespace SparkleShare { // Enables SparkleShare to start automatically at login public abstract void EnableSystemAutostart (); - // Installs a launcher so the user can launch SparkleShare - // from the Internet category if needed - public abstract void InstallLauncher (); - // Installs the sparkleshare:// protocol handler public abstract void InstallProtocolHandler (); @@ -136,7 +132,6 @@ namespace SparkleShare { public virtual void Initialize () { - InstallLauncher (); EnableSystemAutostart (); InstallProtocolHandler (); diff --git a/SparkleShare/SparkleEventLog.cs b/SparkleShare/SparkleEventLog.cs index 210bc935..6d21ad3d 100755 --- a/SparkleShare/SparkleEventLog.cs +++ b/SparkleShare/SparkleEventLog.cs @@ -57,7 +57,7 @@ namespace SparkleShare { Title = _("Recent Events"); IconName = "folder-sparkleshare"; - DeleteEvent += Close (object o, DeleteEventArgs args) { + DeleteEvent += delegate (object o, DeleteEventArgs args) { Controller.WindowClosed (); args.RetVal = true; }; @@ -269,15 +269,15 @@ namespace SparkleShare { AddAccelGroup (accel_group); // Close on Esc - close_1.AddAccelerator ("activate", accel_group, new AccelKey (Gdk.Key.W, Gdk.ModifierType.ControlMask, - AccelFlags.Visible)); + close_1.AddAccelerator ("activate", accel_group, new AccelKey (Gdk.Key.W, + Gdk.ModifierType.ControlMask, AccelFlags.Visible)); - close_1.Activated += delegate { HideAll (); }; + close_1.Activated += delegate { Controller.WindowClosed (); }; // Close on Ctrl+W - close_2.AddAccelerator ("activate", accel_group, new AccelKey (Gdk.Key.Escape, Gdk.ModifierType.None, - AccelFlags.Visible)); - close_2.Activated += delegate { HideAll (); }; + close_2.AddAccelerator ("activate", accel_group, new AccelKey (Gdk.Key.Escape, + Gdk.ModifierType.None, AccelFlags.Visible)); + close_2.Activated += delegate { Controller.WindowClosed (); }; file_menu.Append (close_1); file_menu.Append (close_2); diff --git a/SparkleShare/SparkleSetup.cs b/SparkleShare/SparkleSetup.cs index b4721915..b3b65a39 100755 --- a/SparkleShare/SparkleSetup.cs +++ b/SparkleShare/SparkleSetup.cs @@ -287,7 +287,7 @@ namespace SparkleShare { }; layout_address.PackStart (new Label () { - Markup = "" + _("Address") + "", + Markup = "" + _("Address:") + "", Xalign = 0 }, true, true, 0); @@ -308,7 +308,7 @@ namespace SparkleShare { }; layout_path.PackStart (new Label () { - Markup = "" + _("Remote Path") + "", + Markup = "" + _("Remote Path:") + "", Xalign = 0 }, true, true, 0); @@ -476,7 +476,7 @@ namespace SparkleShare { Button finish_button = new Button (_("Finish")); finish_button.Clicked += delegate { - Controller.FinishedPageCompleted (); + Controller.FinishPageCompleted (); }; diff --git a/SparkleShare/SparkleUI.cs b/SparkleShare/SparkleUI.cs index dc4bf6ef..e533fb03 100755 --- a/SparkleShare/SparkleUI.cs +++ b/SparkleShare/SparkleUI.cs @@ -64,7 +64,7 @@ namespace SparkleShare { StatusIcon = new SparkleStatusIcon (); if (Program.Controller.FirstRun) - Program.Controller.ShowSetupWindow (PageType.Setup) + Program.Controller.ShowSetupWindow (PageType.Setup); }