diff --git a/SparkleShare/Makefile.am b/SparkleShare/Makefile.am index caa77a1b..28025497 100644 --- a/SparkleShare/Makefile.am +++ b/SparkleShare/Makefile.am @@ -10,6 +10,7 @@ LINK = $(REF_SPARKLESHARE) SOURCES = \ SparkleBubble.cs \ SparkleController.cs \ + SparkleDialog.cs \ SparkleEntry.cs \ SparkleInfobar.cs \ SparkleIntro.cs \ diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs new file mode 100644 index 00000000..a317b9df --- /dev/null +++ b/SparkleShare/SparkleDialog.cs @@ -0,0 +1,209 @@ +// 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 (button_bar, false, false, 0); + + string image_path = SparkleHelpers.CombineMore (Defines.PREFIX, "share", "pixmaps", + "sparkleshare-about.png"); + + wrapper.PackStart (new Image (image_path), false, false, 0); + wrapper.PackStart (vbox, true, true, 0); + + Add (wrapper); + + } + + } + +} + diff --git a/SparkleShare/SparkleStatusIcon.cs b/SparkleShare/SparkleStatusIcon.cs index fc339ed6..e74112c3 100644 --- a/SparkleShare/SparkleStatusIcon.cs +++ b/SparkleShare/SparkleStatusIcon.cs @@ -25,6 +25,8 @@ using System.Timers; namespace SparkleShare { + // TODO: Menu doesn't update anymore + // The statusicon that stays in the // user's notification area public class SparkleStatusIcon : StatusIcon { @@ -224,14 +226,12 @@ namespace SparkleShare { Menu.Add (new SeparatorMenuItem ()); // A menu item that takes the user to http://www.sparkleshare.org/ - MenuItem about_item = new MenuItem (_("Visit Website")); + MenuItem about_item = new MenuItem (_("About")); about_item.Activated += delegate { - Process process = new Process (); - process.StartInfo.FileName = "xdg-open"; - process.StartInfo.Arguments = "http://www.sparkleshare.org/"; - process.Start (); + SparkleDialog dialog = new SparkleDialog (); + dialog.ShowAll (); }; diff --git a/data/Makefile.am b/data/Makefile.am index 93d0f071..575bf8d8 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = \ EXTRA_DIST = \ sparkleshare-gnome.svg \ sparkleshare-mist.svg \ - work-status-icons.svg \ + sparkleshare-about.png \ side-splash.png MAINTAINERCLEANFILES = \ @@ -13,6 +13,8 @@ MAINTAINERCLEANFILES = \ install-data-local: $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps $(INSTALL_DATA) $(srcdir)/side-splash.png $(DESTDIR)$(datadir)/pixmaps/side-splash.png + $(INSTALL_DATA) $(srcdir)/sparkleshare-about.png $(DESTDIR)$(datadir)/pixmaps/sparkleshare-about.png uninstall-hook: rm -f $(DESTDIR)$(datadir)/pixmaps/side-splash.png + rm -f $(DESTDIR)$(datadir)/pixmaps/sparkleshare-about.png diff --git a/data/info.plist b/data/info.plist new file mode 100644 index 00000000..971a6798 --- /dev/null +++ b/data/info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + sparkleshare + CFBundleIconFile + sparkleshare.icns + CFBundleIdentifier + org.sparkleshare.sparkleshare + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + SparkleShare + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.2 + CFBundleSignature + xmmd + CFBundleVersion + 0.2 + NSAppleScriptEnabled + NO + + diff --git a/data/sparkleshare-about.png b/data/sparkleshare-about.png new file mode 100644 index 00000000..173542ff Binary files /dev/null and b/data/sparkleshare-about.png differ diff --git a/data/sparkleshare-about.svg b/data/sparkleshare-about.svg new file mode 100644 index 00000000..597c3335 --- /dev/null +++ b/data/sparkleshare-about.svg @@ -0,0 +1,2534 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/sparkleshare-osx-start b/data/sparkleshare-osx-start new file mode 100644 index 00000000..ac44f13a --- /dev/null +++ b/data/sparkleshare-osx-start @@ -0,0 +1,52 @@ +#!/bin/sh + +#get the bundle's MacOS directory full path +DIR=$(cd "$(dirname "$0")"; pwd) + +#change these values to match your app +EXE_PATH="$DIR\SparkleShare.exe" +PROCESS_NAME=sparkleshare-osx-start +APPNAME="SparkleShare" + +#set up environment +MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current +export DYLD_FALLBACK_LIBRARY_PATH="$DIR:$MONO_FRAMEWORK_PATH/lib:/lib:/usr/lib" +export PATH="$MONO_FRAMEWORK_PATH/bin:$PATH" + +#mono version check +REQUIRED_MAJOR=2 +REQUIRED_MINOR=4 + +VERSION_TITLE="Cannot launch $APPNAME" +VERSION_MSG="$APPNAME requires the Mono Framework version $REQUIRED_MAJOR.$REQUIRED_MINOR or later." +DOWNLOAD_URL="http://www.go-mono.com/mono-downloads/download.html" + +MONO_VERSION="$(mono --version | grep 'Mono JIT compiler version ' | cut -f5 -d\ )" +MONO_VERSION_MAJOR="$(echo $MONO_VERSION | cut -f1 -d.)" +MONO_VERSION_MINOR="$(echo $MONO_VERSION | cut -f2 -d.)" +if [ -z "$MONO_VERSION" ] \ + || [ $MONO_VERSION_MAJOR -lt $REQUIRED_MAJOR ] \ + || [ $MONO_VERSION_MAJOR -eq $REQUIRED_MAJOR -a $MONO_VERSION_MINOR -lt $REQUIRED_MINOR ] +then + osascript \ + -e "set question to display dialog \"$VERSION_MSG\" with title \"$VERSION_TITLE\" buttons {\"Cancel\", \"Download...\"} default button 2" \ + -e "if button returned of question is equal to \"Download...\" then open location \"$DOWNLOAD_URL\"" + echo "$VERSION_TITLE" + echo "$VERSION_MSG" + exit 1 +fi + +#get an exec command that will work on the current OS version +OSX_VERSION=$(uname -r | cut -f1 -d.) +if [ $OSX_VERSION -lt 9 ]; then # If OSX version is 10.4 + MONO_EXEC="exec mono" +else + MONO_EXEC="exec -a \"$PROCESS_NAME\" mono" +fi + +#create log file directory if it doesn't exist +LOG_FILE="$HOME/Library/Logs/$APPNAME/$APPNAME.log" +mkdir -p "`dirname \"$LOG_FILE\"`" + +#run app using mono +$MONO_EXEC $MONO_OPTIONS "$EXE_PATH" $* 2>&1 1> "$LOG_FILE" diff --git a/data/work-status-icons.svg b/data/work-status-icons.svg deleted file mode 100644 index e92c2eba..00000000 --- a/data/work-status-icons.svg +++ /dev/null @@ -1,2336 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - Work in Progress Published New Target - - - - - - - - - - - - - - - - - - Don't touch please! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Finished - - - - - - - - - - - - - sparkleshare-work-finished - - -