diff --git a/SparkleLib/SparkleBackend.cs b/SparkleLib/SparkleBackend.cs index 7b5898b9..248cd3f6 100644 --- a/SparkleLib/SparkleBackend.cs +++ b/SparkleLib/SparkleBackend.cs @@ -55,6 +55,13 @@ namespace SparkleLib { } + public static string Version { + get { + return Defines.VERSION; + } + } + + // Strange magic needed by Platform () [DllImport ("libc")] static extern int uname (IntPtr buf); diff --git a/SparkleLib/SparklePlatform.cs b/SparkleLib/SparklePlatform.cs deleted file mode 100644 index 0601a7d0..00000000 --- a/SparkleLib/SparklePlatform.cs +++ /dev/null @@ -1,29 +0,0 @@ -// SparkleShare, a collaboration and sharing tool. -// Copyright (C) 2010 Hylke Bons -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - - -using System; -using System.IO; -using System.Collections.Generic; -using System.Xml; - -using Mono.Unix; - -namespace SparkleLib { - - - -} diff --git a/SparkleShare/Mac/SparkleAbout.cs b/SparkleShare/Mac/SparkleAbout.cs index 1f61f14b..8177789e 100644 --- a/SparkleShare/Mac/SparkleAbout.cs +++ b/SparkleShare/Mac/SparkleAbout.cs @@ -23,7 +23,6 @@ using MonoMac.Foundation; using MonoMac.AppKit; using MonoMac.ObjCRuntime; using MonoMac.WebKit; -using SparkleLib; namespace SparkleShare { @@ -101,7 +100,7 @@ namespace SparkleShare { }; VersionTextField = new NSTextField () { - StringValue = Defines.VERSION, + StringValue = SparkleShare.Controller.Version, Frame = new RectangleF (22, Frame.Height - 94, 318, 22), BackgroundColor = NSColor.White, Bordered = false, diff --git a/SparkleShare/SparkleAbout.cs b/SparkleShare/SparkleAbout.cs index 5484c99b..19ee9c8d 100644 --- a/SparkleShare/SparkleAbout.cs +++ b/SparkleShare/SparkleAbout.cs @@ -21,7 +21,6 @@ using System.IO; using System.Net; using Gtk; -using SparkleLib; using Mono.Unix; namespace SparkleShare { @@ -76,7 +75,7 @@ namespace SparkleShare { box.ModifyBg (StateType.Normal, new TreeView ().Style.Base (StateType.Normal)); Label header = new Label () { - Markup = "SparkleShare\n" + Defines.VERSION + "", + Markup = "SparkleShare\n" + SparkleShare.SparkleController.Version + "", Xalign = 0, Xpad = 18, Ypad = 18 diff --git a/SparkleShare/SparkleController.cs b/SparkleShare/SparkleController.cs index 5b8c8e5b..739f146e 100644 --- a/SparkleShare/SparkleController.cs +++ b/SparkleShare/SparkleController.cs @@ -985,6 +985,13 @@ namespace SparkleShare { } + public string Version { + get { + return SparkleBackend.Version; + } + } + + public void CheckForNewVersion () { WebClient web_client = new WebClient ();