diff --git a/SparkleShare/Mac/SparkleAbout.cs b/SparkleShare/Mac/SparkleAbout.cs index 02260106..6bc32d77 100644 --- a/SparkleShare/Mac/SparkleAbout.cs +++ b/SparkleShare/Mac/SparkleAbout.cs @@ -23,6 +23,7 @@ using MonoMac.Foundation; using MonoMac.AppKit; using MonoMac.ObjCRuntime; using MonoMac.WebKit; +using SparkleLib; namespace SparkleShare { @@ -69,7 +70,7 @@ namespace SparkleShare { }; VersionTextField = new NSTextField () { - StringValue = "0.2.0", + StringValue = Defines.VERSION, Frame = new RectangleF (22, Frame.Height - 94, 318, 22), BackgroundColor = NSColor.White, Bordered = false, diff --git a/SparkleShare/Makefile.am b/SparkleShare/Makefile.am index b98d31d4..b1885c9f 100644 --- a/SparkleShare/Makefile.am +++ b/SparkleShare/Makefile.am @@ -10,7 +10,7 @@ LINK = $(REF_SPARKLESHARE) $(NOTIFY_SHARP_LIBS) $(WEBKIT_SHARP_LIBS) SOURCES = \ SparkleBubble.cs \ SparkleController.cs \ - SparkleDialog.cs \ + SparkleAbout.cs \ SparkleEntry.cs \ SparkleInfobar.cs \ SparkleIntro.cs \ diff --git a/SparkleShare/SparkleAbout.cs b/SparkleShare/SparkleAbout.cs new file mode 100644 index 00000000..81105d09 --- /dev/null +++ b/SparkleShare/SparkleAbout.cs @@ -0,0 +1,128 @@ +// SparkleShare, an instant update workflow to Git. +// Copyright (C) 2010 Hylke Bons (hylkebons@gmail.com) +// +// 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 (http://www.gnu.org/licenses/). + + +using System; +using System.Diagnostics; + +using Gtk; +using SparkleLib; +using Mono.Unix; + +namespace SparkleShare { + + public class SparkleDialog : Window { + + // Short alias for the translations + public static string _(string s) + { + return Catalog.GetString (s); + } + + + public SparkleDialog () : base ("") + { + + DefaultSize = new Gdk.Size (360, 260); + + BorderWidth = 0; + IconName = "folder-sparkleshare"; + Resizable = true; + WindowPosition = WindowPosition.Center; + Title = "About SparkleShare"; + Resizable = false; + + Gdk.Color color = Style.Foreground (StateType.Insensitive); + string secondary_text_color = SparkleUIHelpers.GdkColorToHex (color); + + + EventBox box = new EventBox (); + box.ModifyBg (StateType.Normal, new TreeView ().Style.Base (StateType.Normal)); + + Label header = new Label () { + Markup = "SparkleShare\n" + Defines.VERSION + "", + Xalign = 0, + Xpad = 18, + Ypad = 18 + + }; + + box.Add (header); + + Label license = new Label () { + Xalign = 0, + Xpad = 18, + Ypad = 22, + LineWrap = true, + Wrap = true, + LineWrapMode = Pango.WrapMode.Word, + + Markup = "Copyright © 2010–" + DateTime.Now.Year + " Hylke Bons and others\n" + + "\n" + + "SparkleShare is Free and Open Source Software. " + + "You are free to use, modify, and redistribute it " + + "under the terms of the GNU General Public License version 3 or later." + }; + + VBox vbox = new VBox (false, 0) { + BorderWidth = 0 + }; + + HButtonBox button_bar = new HButtonBox () { + BorderWidth = 12 + }; + + Button credits_button = new Button ("_Show Credits") { + UseUnderline = true + }; + + credits_button.Clicked += delegate { + + Process process = new Process (); + process.StartInfo.FileName = "xdg-open"; + process.StartInfo.Arguments = "http://www.sparkleshare.org/credits"; + process.Start (); + + }; + + Button website_button = new Button (_("_Visit Website")) { + UseUnderline = true + }; + + website_button.Clicked += delegate { + + Process process = new Process (); + process.StartInfo.FileName = "xdg-open"; + process.StartInfo.Arguments = "http://www.sparkleshare.org/"; + process.Start (); + + }; + + button_bar.Add (website_button); + button_bar.Add (credits_button); + + vbox.PackStart (box, true, true, 0); + vbox.PackStart (license, true, true, 0); + vbox.PackStart (button_bar, false, false, 0); + + Add (vbox); + + } + + } + +} + diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs deleted file mode 100644 index ba2eb681..00000000 --- a/SparkleShare/SparkleDialog.cs +++ /dev/null @@ -1,210 +0,0 @@ -// SparkleShare, an instant update workflow to Git. -// Copyright (C) 2010 Hylke Bons (hylkebons@gmail.com) -// -// 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 (http://www.gnu.org/licenses/). - -using Gtk; -using SparkleLib; -using Mono.Unix; -using System.Diagnostics; - -namespace SparkleShare { - - public class SparkleDialog : Window { - - // Short alias for the translations - public static string _(string s) - { - return Catalog.GetString (s); - } - - - public SparkleDialog () : base ("") - { - - BorderWidth = 0; - IconName = "folder-sparkleshare"; - Resizable = true; - WindowPosition = WindowPosition.Center; - Title = "SparkleShare " + Defines.VERSION; - Resizable = false; - - SetSizeRequest (480, 480); - - Label label = new Label () { - Xalign = 0, - Xpad = 12, - Ypad = 12 - }; - - Gdk.Color color = Style.Foreground (StateType.Insensitive); - string secondary_text_color = SparkleUIHelpers.GdkColorToHex (color); - - label.Markup = "SparkleShare\n" + - "version " + Defines.VERSION + "\n\n" + - -@"Copyright © 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. - -Maintainer: - - Hylke Bons (hylkebons@gmail.com) - -Contributors: - - Alex Hudson (home@alexhudson.com) - Allan Day (allanpday@gmail.com) - Andreas Nilsson (andreasn@gnome.org) - Benjamin Podszun (benjamin.podszun@gmail.com) - Bertrand Lorentz (bertrand.lorentz@gmail.com) - Garrett LeSage (garrett@novell.com) - Jakub Steiner (jimmac@redhat.com) - Lapo Calamandrei (calamandrei@gmail.com) - Luis Cordova (cordoval@gmail.com) - Łukasz Jernaś (deejay1@srem.org) - Michael Monreal (michael.monreal@gmail.com) - Oleg Khlystov (pktfag@gmail.com) - Paul Cutler (pcutler@gnome.org) - Philipp Gildein (rmbl@openspeak-project.org) - Ruben Vermeersch (rubenv@gnome.org) - Sandy Armstrong (sanfordarmstrong@gmail.com) - Simon Pither (simon@pither.com) - Steven Harms (sharms@ubuntu.com) - Vincent Untz (vuntz@gnome.org) - -Thanks very much!"; - - -/* Git# is Copyright © 2007-2009 by the Git Development Community -See source file headers for specific contributor copyrights. - -All rights reserved. - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the following -conditions are met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - -- Neither the name of the Git Development Community nor the - names of its contributors may be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -SmartIrc4net - The IRC library for .NET/C# - -Copyright © 2003-2005 Mirco Bauer (meebey@meebey.net) - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library 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 Lesser General Public License for more details."; */ - - VBox wrapper = new VBox (false, 0); - - VBox vbox = new VBox (false, 0) { - BorderWidth = 0 - }; - - ScrolledWindow scrolled_window = new ScrolledWindow () { - HscrollbarPolicy = PolicyType.Never, - ShadowType = ShadowType.None, - BorderWidth = 0 - }; - - scrolled_window.AddWithViewport (label); - - (scrolled_window.Child as Viewport).ShadowType = ShadowType.None; - (scrolled_window.Child as Viewport).ModifyBg (StateType.Normal, - (new Entry () as Entry).Style.Base (StateType.Normal)); - - HButtonBox button_bar = new HButtonBox () { - BorderWidth = 12 - }; - - Button close_button = new Button (Stock.Close); - - close_button.Clicked += delegate { - Destroy (); - }; - - Button website_button = new Button (_("_Visit Website")) { - UseUnderline = true - }; - - website_button.Clicked += delegate { - - Process process = new Process (); - process.StartInfo.FileName = "xdg-open"; - process.StartInfo.Arguments = "http://www.sparkleshare.org/"; - process.Start (); - - }; - - button_bar.Add (website_button); - button_bar.Add (close_button); - - vbox.PackStart (scrolled_window, true, true, 0); - vbox.PackStart (new HSeparator (), false, false, 0); - vbox.PackStart (button_bar, false, false, 0); - - string image_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare", - "pixmaps", "sparkleshare-about.png"); - System.Console.WriteLine(image_path); - wrapper.PackStart (new Image (image_path), false, false, 0); - wrapper.PackStart (vbox, true, true, 0); - - Add (wrapper); - - } - - } - -} - diff --git a/SparkleShare/SparkleShare.csproj b/SparkleShare/SparkleShare.csproj index 3b4d5e73..1aaf5374 100644 --- a/SparkleShare/SparkleShare.csproj +++ b/SparkleShare/SparkleShare.csproj @@ -51,7 +51,7 @@ - + diff --git a/data/Makefile.am b/data/Makefile.am index ab84629f..24edd829 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -5,7 +5,6 @@ SUBDIRS = \ dist_pixmaps_DATA = \ sparkleshare-gnome.svg \ sparkleshare-mist.svg \ - sparkleshare-about.png \ side-splash.png pixmapsdir = $(pkgdatadir)/pixmaps/ diff --git a/data/sparkleshare-about.png b/data/sparkleshare-about.png deleted file mode 100644 index 173542ff..00000000 Binary files a/data/sparkleshare-about.png and /dev/null differ diff --git a/data/sparkleshare-about.svg b/data/sparkleshare-about.svg deleted file mode 100644 index 597c3335..00000000 --- a/data/sparkleshare-about.svg +++ /dev/null @@ -1,2534 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -