Merge remote-tracking branch 'upstream/master' into windows, add SparkleBubbles
Conflicts: SparkleLib/Git/SparkleRepoGit.cs SparkleLib/SparkleListenerIrc.cs SparkleShare/Program.cs SparkleShare/SparkleControllerBase.cs SparkleShare/SparkleExtensions.cs SparkleShare/SparkleLinController.cs SparkleShare/SparkleStatusIcon.cs SparkleShare/SparkleUI.cs
This commit is contained in:
commit
cad52d7072
0
Makefile.am
Normal file → Executable file
0
Makefile.am
Normal file → Executable file
2
NEWS
Normal file → Executable file
2
NEWS
Normal file → Executable file
|
@ -1,4 +1,4 @@
|
||||||
0.2.5 for Linux and Mac (...):
|
0.2.5 for Linux and Mac (Mon Jul 25 2011):
|
||||||
|
|
||||||
Hylke: Reimplement notes to be less buggy and backend independent. Polish
|
Hylke: Reimplement notes to be less buggy and backend independent. Polish
|
||||||
about dialog and event log html. Fix a bug where large collections of files
|
about dialog and event log html. Fix a bug where large collections of files
|
||||||
|
|
194
README
194
README
|
@ -1,194 +0,0 @@
|
||||||
SparkleShare
|
|
||||||
============
|
|
||||||
|
|
||||||
SparkleShare is a collaboration and sharing tool that is designed to keep
|
|
||||||
things simple and to stay out of your way. It allows you to instantly sync
|
|
||||||
with any Git repository you have access to.
|
|
||||||
|
|
||||||
Though SparkleShare is not made to be a graphical frontend
|
|
||||||
for git or a backup tool, it may be useful for other kinds of purposes as well,
|
|
||||||
like backing up small files or monitoring your favourite project. In contrast
|
|
||||||
to the projects name, we will very likely refuse to implement your personal
|
|
||||||
ponies.
|
|
||||||
|
|
||||||
SparkleShare currently works on Linux and Mac. A Windows port and mobile
|
|
||||||
device support are planned for the future.
|
|
||||||
|
|
||||||
|
|
||||||
License
|
|
||||||
=======
|
|
||||||
|
|
||||||
SparkleShare is free software and licensed under the GNU GPLv3 or later. You
|
|
||||||
are welcome to change and redistribute it under certain conditions. For more
|
|
||||||
information see the LICENSE file or visit http://www.gnu.org/licenses/gpl-3.0.html
|
|
||||||
|
|
||||||
|
|
||||||
Run on Linux:
|
|
||||||
=============
|
|
||||||
|
|
||||||
SparkleShare currently requires:
|
|
||||||
|
|
||||||
- git >= 1.7.1
|
|
||||||
- gtk-sharp2 >= 2.12.7
|
|
||||||
- mono-core >= 2.2
|
|
||||||
- ndesk-dbus >= 0.6
|
|
||||||
- openssh
|
|
||||||
- gvfs >= 1.3
|
|
||||||
- intltool
|
|
||||||
- libnotify
|
|
||||||
- nautilus-python
|
|
||||||
- pygtk
|
|
||||||
- webkitgtk
|
|
||||||
- webkit-sharp
|
|
||||||
|
|
||||||
Run the service, either click the SparkleShare launcher or:
|
|
||||||
|
|
||||||
$ sparkleshare start
|
|
||||||
|
|
||||||
You can stop the service via the graphical interface or by typing:
|
|
||||||
|
|
||||||
$ sparkleshare stop
|
|
||||||
|
|
||||||
For help:
|
|
||||||
|
|
||||||
$ sparkleshare --help
|
|
||||||
|
|
||||||
Note:
|
|
||||||
|
|
||||||
SparkleShare creates its own RSA keypair in ~/config/sparkleshare/ and uses
|
|
||||||
that for authentication. Please mind this if you're planning to set up your
|
|
||||||
own server by hand.
|
|
||||||
|
|
||||||
|
|
||||||
Build on Linux:
|
|
||||||
===============
|
|
||||||
|
|
||||||
Installing the build dependencies on Debian or Ubuntu:
|
|
||||||
|
|
||||||
$ sudo apt-get install gtk-sharp2 mono-runtime mono-devel monodevelop \
|
|
||||||
libndesk-dbus1.0-cil-dev nant libnotify-cil-dev libgtk2.0-cil-dev \
|
|
||||||
libwebkit-cil-dev intltool libtool python-nautilus libndesk-dbus-glib1.0-cil-dev
|
|
||||||
|
|
||||||
For Ubuntu libappindicator support, run the following before building:
|
|
||||||
|
|
||||||
$ sudo apt-get install libappindicator0.1-cil-dev
|
|
||||||
|
|
||||||
|
|
||||||
On Fedora:
|
|
||||||
|
|
||||||
$ sudo yum install gtk-sharp2-devel mono-core mono-devel monodevelop \
|
|
||||||
ndesk-dbus-devel ndesk-dbus-glib-devel nautilus-python-devel nant \
|
|
||||||
notify-sharp-devel webkit-sharp-devel webkitgtk-devel libtool intltool \
|
|
||||||
gnome-doc-utils
|
|
||||||
|
|
||||||
|
|
||||||
You can build and install SparkleShare like this:
|
|
||||||
|
|
||||||
$ ./configure --prefix=/usr (or ./autogen.sh if you build from the repository)
|
|
||||||
$ make
|
|
||||||
$ sudo make install
|
|
||||||
|
|
||||||
Note:
|
|
||||||
|
|
||||||
Use '--prefix=/usr' if you want the Nautilus extension to work.
|
|
||||||
|
|
||||||
|
|
||||||
Run on Mac:
|
|
||||||
===========
|
|
||||||
|
|
||||||
Just double-click the SparkleShare.app.
|
|
||||||
|
|
||||||
|
|
||||||
Build on Mac:
|
|
||||||
=============
|
|
||||||
|
|
||||||
Install the Mono Framework, MonoDevelop and the MonoMac plugin (you find it in Add-in Manager).
|
|
||||||
|
|
||||||
You may need to adjust some environment variables to let the build environment tools find mono:
|
|
||||||
|
|
||||||
$ export PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin:$PATH
|
|
||||||
$ export PKG_CONFIG=/Library/Frameworks/Mono.framework/Versions/Current/bin/pkg-config
|
|
||||||
$ export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig
|
|
||||||
|
|
||||||
Then you need either MacPorts or Homebrew. Go on and choose one of the next two sections.
|
|
||||||
|
|
||||||
|
|
||||||
Using MacPorts
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Install git, automake, and intltool:
|
|
||||||
|
|
||||||
$ sudo port install git-core automake intltool
|
|
||||||
|
|
||||||
Start the first part of the build:
|
|
||||||
|
|
||||||
$ ./autogen.sh
|
|
||||||
$ make
|
|
||||||
|
|
||||||
The last step will give you some errors in SparkleShare.exe, ignore these and go on to the
|
|
||||||
MonoDevelop section.
|
|
||||||
|
|
||||||
|
|
||||||
Using Homebrew
|
|
||||||
--------------
|
|
||||||
|
|
||||||
Because there are old versions of autoconf and automake installed on OS X, they are not in
|
|
||||||
the official master branch. It's easy to create the formulas:
|
|
||||||
|
|
||||||
$ brew create $url
|
|
||||||
|
|
||||||
Now install the formulas.
|
|
||||||
|
|
||||||
You can have a look at this branch for the created Formulas:
|
|
||||||
https://github.com/toabi/homebrew/commits/sparkleshare
|
|
||||||
|
|
||||||
You also have to comment out the 'keg_only' in gettext and remove it if you already
|
|
||||||
installed it. If you created the formulas install them:
|
|
||||||
|
|
||||||
$ brew install git autoconf automake intltool gettext
|
|
||||||
|
|
||||||
Now start the first part of the build:
|
|
||||||
|
|
||||||
$ export ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
|
|
||||||
$ cd SmartIrc4net
|
|
||||||
$ ./autogen.sh
|
|
||||||
$ cd ..
|
|
||||||
$ ./autogen.sh
|
|
||||||
$ make
|
|
||||||
|
|
||||||
Ignore the error and continue to the MonoDevelop-part.
|
|
||||||
|
|
||||||
|
|
||||||
Building the Cocoa UI MonoDevelop
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
Now that you have compiled the libraries, open 'SparkleShare/Mac/SparkleShare.sln' in
|
|
||||||
MonoDevelop and start the build.
|
|
||||||
|
|
||||||
To create the SparkleShare.app, select Project from the menu bar and click "Create Mac Installer..."
|
|
||||||
|
|
||||||
|
|
||||||
Info
|
|
||||||
====
|
|
||||||
|
|
||||||
Official website:
|
|
||||||
http://www.sparkleshare.org/
|
|
||||||
|
|
||||||
Source code:
|
|
||||||
http://github.com/SparkleShare/
|
|
||||||
|
|
||||||
IRC Channel:
|
|
||||||
#sparkleshare on irc.gnome.org
|
|
||||||
|
|
||||||
Wiki:
|
|
||||||
http://github.com/hbons/SparkleShare/wiki/
|
|
||||||
|
|
||||||
Report issues:
|
|
||||||
http://github.com/hbons/SparkleShare/issues/
|
|
||||||
|
|
||||||
Translation project:
|
|
||||||
http://www.transifex.net/projects/p/sparkleshare/
|
|
||||||
|
|
||||||
|
|
||||||
Now have fun and create cool things together! :)
|
|
||||||
|
|
198
README.rst
Executable file
198
README.rst
Executable file
|
@ -0,0 +1,198 @@
|
||||||
|
SparkleShare
|
||||||
|
============
|
||||||
|
|
||||||
|
`SparkleShare`_ is a collaboration and sharing tool that is designed to keep
|
||||||
|
things simple and to stay out of your way. It allows you to instantly sync
|
||||||
|
with any Git repository you have access to.
|
||||||
|
|
||||||
|
Though SparkleShare is not made to be a graphical frontend
|
||||||
|
for git or a backup tool, it may be useful for other kinds of purposes as well,
|
||||||
|
like backing up small files or monitoring your favourite project. In contrast
|
||||||
|
to the projects name, we will very likely refuse to implement your personal
|
||||||
|
ponies.
|
||||||
|
|
||||||
|
SparkleShare currently works on Linux and Mac. A Windows port and mobile
|
||||||
|
device support are planned for the future.
|
||||||
|
|
||||||
|
|
||||||
|
License
|
||||||
|
~~~~~~~
|
||||||
|
SparkleShare is free software and licensed under the GNU GPLv3 or later. You
|
||||||
|
are welcome to change and redistribute it under certain conditions. For more
|
||||||
|
information see the LICENSE file or visit http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
|
||||||
|
Run on Linux:
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Requirements:
|
||||||
|
|
||||||
|
* git >= 1.7.0
|
||||||
|
* gtk-sharp2
|
||||||
|
* gvfs
|
||||||
|
* intltool
|
||||||
|
* libnotify
|
||||||
|
* mono-core >= 2.8
|
||||||
|
* notify-sharp
|
||||||
|
* nautilus-python
|
||||||
|
* openssh
|
||||||
|
* pygtk
|
||||||
|
* webkitgtk
|
||||||
|
* webkit-sharp
|
||||||
|
|
||||||
|
|
||||||
|
Run the service, either click the SparkleShare launcher or::
|
||||||
|
|
||||||
|
sparkleshare start
|
||||||
|
|
||||||
|
You can stop the service via the graphical interface or by typing::
|
||||||
|
|
||||||
|
sparkleshare stop
|
||||||
|
|
||||||
|
For help::
|
||||||
|
|
||||||
|
sparkleshare --help
|
||||||
|
|
||||||
|
Note:
|
||||||
|
-----
|
||||||
|
SparkleShare creates its own RSA keypair in ~/config/sparkleshare/ and uses
|
||||||
|
that for authentication. Please mind this if you're planning to set up your
|
||||||
|
own server by hand.
|
||||||
|
|
||||||
|
|
||||||
|
Build on Linux:
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
Installing the build dependencies on Debian or Ubuntu::
|
||||||
|
|
||||||
|
sudo apt-get install gtk-sharp2 mono-runtime mono-devel monodevelop \
|
||||||
|
libndesk-dbus1.0-cil-dev nant libnotify-cil-dev libgtk2.0-cil-dev \
|
||||||
|
libwebkit-cil-dev intltool libtool python-nautilus libndesk-dbus-glib1.0-cil-dev
|
||||||
|
|
||||||
|
For Ubuntu libappindicator support, run the following before building::
|
||||||
|
|
||||||
|
sudo apt-get install libappindicator0.1-cil-dev
|
||||||
|
|
||||||
|
|
||||||
|
On Fedora::
|
||||||
|
|
||||||
|
sudo yum install gtk-sharp2-devel mono-core mono-devel monodevelop \
|
||||||
|
ndesk-dbus-devel ndesk-dbus-glib-devel nautilus-python-devel nant \
|
||||||
|
notify-sharp-devel webkit-sharp-devel webkitgtk-devel libtool intltool \
|
||||||
|
gnome-doc-utils
|
||||||
|
|
||||||
|
|
||||||
|
You can build and install SparkleShare like this::
|
||||||
|
|
||||||
|
./configure --prefix=/usr (or ./autogen.sh if you build from the repository)
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
Note
|
||||||
|
----
|
||||||
|
Use ``--prefix=/usr`` if you want the Nautilus extension to work.
|
||||||
|
|
||||||
|
|
||||||
|
Run on Mac:
|
||||||
|
~~~~~~~~~~~
|
||||||
|
Just double-click the SparkleShare.app.
|
||||||
|
|
||||||
|
|
||||||
|
Build on Mac:
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Install the Mono Framework, MonoDevelop and the MonoMac plugin (you find it in Add-in Manager).
|
||||||
|
|
||||||
|
You may need to adjust some environment variables to let the build environment tools find mono::
|
||||||
|
|
||||||
|
export PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin:$PATH
|
||||||
|
export PKG_CONFIG=/Library/Frameworks/Mono.framework/Versions/Current/bin/pkg-config
|
||||||
|
export PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig
|
||||||
|
|
||||||
|
Then you need either MacPorts or Homebrew. Go on and choose one of the next two sections.
|
||||||
|
|
||||||
|
|
||||||
|
Using MacPorts
|
||||||
|
--------------
|
||||||
|
Install git, automake, and intltool::
|
||||||
|
|
||||||
|
sudo port install git-core automake intltool
|
||||||
|
|
||||||
|
Start the first part of the build::
|
||||||
|
|
||||||
|
./autogen.sh --enable-gtkui=no
|
||||||
|
make
|
||||||
|
|
||||||
|
The last step will give you some errors in SparkleShare.exe, ignore these and go on to the
|
||||||
|
MonoDevelop section.
|
||||||
|
|
||||||
|
|
||||||
|
Using Homebrew
|
||||||
|
--------------
|
||||||
|
Because there are old versions of autoconf and automake installed on OS X, they are not in
|
||||||
|
the official master branch. It's easy to create the formulas::
|
||||||
|
|
||||||
|
brew create $url
|
||||||
|
|
||||||
|
Now install the formulas.
|
||||||
|
|
||||||
|
You can have a look at this branch for the created Formulas:
|
||||||
|
https://github.com/toabi/homebrew/commits/sparkleshare
|
||||||
|
|
||||||
|
You also have to comment out the ``keg_only`` in gettext and remove it if you already
|
||||||
|
installed it. If you created the formulas install them::
|
||||||
|
|
||||||
|
brew install git autoconf automake intltool gettext
|
||||||
|
|
||||||
|
Now start the first part of the build::
|
||||||
|
|
||||||
|
export ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
|
||||||
|
cd SmartIrc4net
|
||||||
|
./autogen.sh
|
||||||
|
cd ..
|
||||||
|
./autogen.sh --enable-gtkui=no
|
||||||
|
make
|
||||||
|
|
||||||
|
Ignore the error and continue to the MonoDevelop-part.
|
||||||
|
|
||||||
|
|
||||||
|
Building the Mac UI
|
||||||
|
-------------------
|
||||||
|
Now that you have compiled the libraries, open ``SparkleShare/Mac/SparkleShare.sln`` in
|
||||||
|
MonoDevelop and start the build.
|
||||||
|
|
||||||
|
To create the SparkleShare.app, select Project from the menu bar
|
||||||
|
and click "Create Mac Installer..." Save the SparkleShare.app somewhere.
|
||||||
|
|
||||||
|
Paste the contents of `this file`_ the following file in ``SparkleShare.app/Contents/MonoBundle/config``.
|
||||||
|
|
||||||
|
Copy ``/Library/Frameworks/Mono.framework/Versions/Current/lib/libintl.dylib``
|
||||||
|
to ``SparkleShare.app/Contents/Resources``
|
||||||
|
|
||||||
|
Now you should have a working .app that you can run.
|
||||||
|
|
||||||
|
|
||||||
|
Info
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
`Official website`_
|
||||||
|
|
||||||
|
`Source code`_
|
||||||
|
|
||||||
|
IRC Channel:
|
||||||
|
#sparkleshare on irc.gnome.org
|
||||||
|
|
||||||
|
Wiki_
|
||||||
|
|
||||||
|
`Report issues`_
|
||||||
|
|
||||||
|
`Translation project`_
|
||||||
|
|
||||||
|
|
||||||
|
Now have fun and create cool things together! :)
|
||||||
|
|
||||||
|
|
||||||
|
.. _`Official website`: http://www.sparkleshare.org/
|
||||||
|
.. _`SparkleShare`: http://www.sparkleshare.org/
|
||||||
|
.. _`Source code`: http://github.com/hbons/SparkleShare/
|
||||||
|
.. _Wiki: http://github.com/hbons/SparkleShare/wiki/
|
||||||
|
.. _`Report issues`: http://github.com/hbons/SparkleShare/issues/
|
||||||
|
.. _`Translation project`: http://www.transifex.net/projects/p/sparkleshare
|
||||||
|
.. _`this file`: https://raw.github.com/gist/1aeffa61bac73fc08eca/0c0f09ef9e36864c35f34fd5e8bf4f99886be193/gistfile1.txt
|
0
SparkleLib/AssemblyInfo.cs.in
Normal file → Executable file
0
SparkleLib/AssemblyInfo.cs.in
Normal file → Executable file
0
SparkleLib/Defines.cs.in
Normal file → Executable file
0
SparkleLib/Defines.cs.in
Normal file → Executable file
0
SparkleLib/Git/SparkleFetcherGit.cs
Normal file → Executable file
0
SparkleLib/Git/SparkleFetcherGit.cs
Normal file → Executable file
0
SparkleLib/Hg/SparkleFetcherHg.cs
Normal file → Executable file
0
SparkleLib/Hg/SparkleFetcherHg.cs
Normal file → Executable file
0
SparkleLib/Hg/SparkleRepoHg.cs
Normal file → Executable file
0
SparkleLib/Hg/SparkleRepoHg.cs
Normal file → Executable file
0
SparkleLib/Makefile.am
Normal file → Executable file
0
SparkleLib/Makefile.am
Normal file → Executable file
0
SparkleLib/SparkleBackend.cs
Normal file → Executable file
0
SparkleLib/SparkleBackend.cs
Normal file → Executable file
0
SparkleLib/SparkleChangeSet.cs
Normal file → Executable file
0
SparkleLib/SparkleChangeSet.cs
Normal file → Executable file
0
SparkleLib/SparkleConfig.cs
Normal file → Executable file
0
SparkleLib/SparkleConfig.cs
Normal file → Executable file
0
SparkleLib/SparkleFetcherBase.cs
Normal file → Executable file
0
SparkleLib/SparkleFetcherBase.cs
Normal file → Executable file
0
SparkleLib/SparkleHelpers.cs
Normal file → Executable file
0
SparkleLib/SparkleHelpers.cs
Normal file → Executable file
0
SparkleLib/SparkleLib.csproj
Normal file → Executable file
0
SparkleLib/SparkleLib.csproj
Normal file → Executable file
0
SparkleLib/SparkleLib.sln
Normal file → Executable file
0
SparkleLib/SparkleLib.sln
Normal file → Executable file
0
SparkleLib/SparkleListenerBase.cs
Normal file → Executable file
0
SparkleLib/SparkleListenerBase.cs
Normal file → Executable file
0
SparkleLib/SparkleListenerTcp.cs
Normal file → Executable file
0
SparkleLib/SparkleListenerTcp.cs
Normal file → Executable file
0
SparkleLib/SparkleOptions.cs
Normal file → Executable file
0
SparkleLib/SparkleOptions.cs
Normal file → Executable file
|
@ -34,3 +34,4 @@ namespace SparkleLib {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
0
SparkleLib/SparkleRepoBase.cs
Normal file → Executable file
0
SparkleLib/SparkleRepoBase.cs
Normal file → Executable file
0
SparkleLib/SparkleWatcher.cs
Normal file → Executable file
0
SparkleLib/SparkleWatcher.cs
Normal file → Executable file
|
@ -72,18 +72,11 @@
|
||||||
<Compile Include="..\Git\SparkleRepoGit.cs">
|
<Compile Include="..\Git\SparkleRepoGit.cs">
|
||||||
<Link>SparkleRepoGit.cs</Link>
|
<Link>SparkleRepoGit.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\Hg\SparkleFetcherHg.cs">
|
|
||||||
<Link>SparkleFetcherHg.cs</Link>
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\Hg\SparkleRepoHg.cs">
|
|
||||||
<Link>SparkleRepoHg.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="..\SparkleConfig.cs">
|
<Compile Include="..\SparkleConfig.cs">
|
||||||
<Link>SparkleConfig.cs</Link>
|
<Link>SparkleConfig.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\SparklePaths.cs">
|
<Compile Include="..\SparklePath.cs">
|
||||||
<Link>SparklePaths.cs</Link>
|
<Link>SparklePath.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\SparkleRepoBase.cs">
|
<Compile Include="..\SparkleRepoBase.cs">
|
||||||
<Link>SparkleRepoBase.cs</Link>
|
<Link>SparkleRepoBase.cs</Link>
|
||||||
|
|
0
SparkleShare/Mac/AppDelegate.cs
Normal file → Executable file
0
SparkleShare/Mac/AppDelegate.cs
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Headers/Growl.h
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Headers/Growl.h
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Headers/GrowlApplicationBridge-Carbon.h
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Headers/GrowlDefines.h
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Headers/GrowlDefines.h
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Resources/Info.plist
Normal file → Executable file
0
SparkleShare/Mac/Growl.framework/Versions/A/Resources/Info.plist
Normal file → Executable file
0
SparkleShare/Mac/Growl.plist
Normal file → Executable file
0
SparkleShare/Mac/Growl.plist
Normal file → Executable file
4
SparkleShare/Mac/Info.plist
Normal file → Executable file
4
SparkleShare/Mac/Info.plist
Normal file → Executable file
|
@ -2,8 +2,6 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string></string>
|
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>sparkleshare</string>
|
<string>sparkleshare</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
|
@ -12,6 +10,8 @@
|
||||||
<string>SparkleShare</string>
|
<string>SparkleShare</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.6</string>
|
<string>10.6</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
|
|
0
SparkleShare/Mac/MainMenu.xib
Normal file → Executable file
0
SparkleShare/Mac/MainMenu.xib
Normal file → Executable file
2
SparkleShare/Mac/MainMenu.xib.designer.cs
generated
Normal file → Executable file
2
SparkleShare/Mac/MainMenu.xib.designer.cs
generated
Normal file → Executable file
|
@ -1,7 +1,7 @@
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// <autogenerated>
|
// <autogenerated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Mono Runtime Version: 2.0.50727.1433
|
// Mono Runtime Version: 4.0.30319.1
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
|
|
5
SparkleShare/Mac/Makefile.am
Normal file → Executable file
5
SparkleShare/Mac/Makefile.am
Normal file → Executable file
|
@ -5,11 +5,12 @@ EXTRA_DIST = \
|
||||||
MainMenu.xib.designer.cs \
|
MainMenu.xib.designer.cs \
|
||||||
SparkleAbout.cs \
|
SparkleAbout.cs \
|
||||||
SparkleAlert.cs \
|
SparkleAlert.cs \
|
||||||
SparkleIntro.cs \
|
SparkleSetup.cs \
|
||||||
SparkleEventLog.cs \
|
SparkleEventLog.cs \
|
||||||
SparkleMacController.cs \
|
SparkleMacController.cs \
|
||||||
|
SparkleMacWatcher.cs \
|
||||||
SparkleShare.csproj \
|
SparkleShare.csproj \
|
||||||
SparkleShare.sln \
|
SparkleShare.sln \
|
||||||
SparkleStatusIcon.cs \
|
SparkleStatusIcon.cs \
|
||||||
SparkleUI.cs \
|
SparkleUI.cs \
|
||||||
SparkleWindow.cs
|
SparkleSetupWindow.cs
|
||||||
|
|
0
SparkleShare/Mac/SparkleAbout.cs
Normal file → Executable file
0
SparkleShare/Mac/SparkleAbout.cs
Normal file → Executable file
0
SparkleShare/Mac/SparkleAlert.cs
Normal file → Executable file
0
SparkleShare/Mac/SparkleAlert.cs
Normal file → Executable file
0
SparkleShare/Mac/SparkleBadger.cs
Normal file → Executable file
0
SparkleShare/Mac/SparkleBadger.cs
Normal file → Executable file
0
SparkleShare/Mac/SparkleBubbles.cs
Normal file → Executable file
0
SparkleShare/Mac/SparkleBubbles.cs
Normal file → Executable file
28
SparkleShare/Mac/SparkleMacController.cs → SparkleShare/Mac/SparkleController.cs
Normal file → Executable file
28
SparkleShare/Mac/SparkleMacController.cs → SparkleShare/Mac/SparkleController.cs
Normal file → Executable file
|
@ -26,13 +26,17 @@ using SparkleLib;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public class SparkleMacController : SparkleController {
|
public class SparkleController : SparkleControllerBase {
|
||||||
|
|
||||||
// We have to use our own custom made folder watcher, as
|
// We have to use our own custom made folder watcher, as
|
||||||
// System.IO.FileSystemWatcher fails watching subfolders on Mac
|
// System.IO.FileSystemWatcher fails watching subfolders on Mac
|
||||||
private SparkleMacWatcher watcher = new SparkleMacWatcher (SparklePaths.SparklePath);
|
private SparkleMacWatcher watcher;
|
||||||
|
|
||||||
|
|
||||||
|
public SparkleController () : base ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public SparkleMacController () : base () { }
|
|
||||||
|
|
||||||
public override void Initialize ()
|
public override void Initialize ()
|
||||||
{
|
{
|
||||||
|
@ -53,7 +57,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
repo_name = repo_name.Trim ("/".ToCharArray ());
|
repo_name = repo_name.Trim ("/".ToCharArray ());
|
||||||
FileSystemEventArgs args = new FileSystemEventArgs (WatcherChangeTypes.Changed,
|
FileSystemEventArgs args = new FileSystemEventArgs (WatcherChangeTypes.Changed,
|
||||||
Path.Combine (SparklePaths.SparklePath, path), Path.GetFileName (path));
|
Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, path), Path.GetFileName (path));
|
||||||
|
|
||||||
foreach (SparkleRepoBase repo in Repositories) {
|
foreach (SparkleRepoBase repo in Repositories) {
|
||||||
if (repo.Name.Equals (repo_name))
|
if (repo.Name.Equals (repo_name))
|
||||||
|
@ -109,20 +113,22 @@ namespace SparkleShare {
|
||||||
// Creates the SparkleShare folder in the user's home folder
|
// Creates the SparkleShare folder in the user's home folder
|
||||||
public override bool CreateSparkleShareFolder ()
|
public override bool CreateSparkleShareFolder ()
|
||||||
{
|
{
|
||||||
if (!Directory.Exists (SparklePaths.SparklePath)) {
|
this.watcher = new SparkleMacWatcher (SparkleConfig.DefaultConfig.FoldersPath);
|
||||||
Directory.CreateDirectory (SparklePaths.SparklePath);
|
|
||||||
return true;
|
|
||||||
|
|
||||||
} else {
|
if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) {
|
||||||
return false;
|
Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
|
||||||
}
|
return true;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Opens the SparkleShare folder or an (optional) subfolder
|
// Opens the SparkleShare folder or an (optional) subfolder
|
||||||
public override void OpenSparkleShareFolder (string subfolder)
|
public override void OpenSparkleShareFolder (string subfolder)
|
||||||
{
|
{
|
||||||
string folder = Path.Combine (SparklePaths.SparklePath, subfolder);
|
string folder = Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, subfolder);
|
||||||
folder.Replace (" ", "\\ "); // Escape space-characters
|
folder.Replace (" ", "\\ "); // Escape space-characters
|
||||||
|
|
||||||
NSWorkspace.SharedWorkspace.OpenFile (folder);
|
NSWorkspace.SharedWorkspace.OpenFile (folder);
|
3
SparkleShare/Mac/SparkleEventLog.cs
Normal file → Executable file
3
SparkleShare/Mac/SparkleEventLog.cs
Normal file → Executable file
|
@ -168,7 +168,6 @@ namespace SparkleShare {
|
||||||
if (this.progress_indicator.Superview == ContentView)
|
if (this.progress_indicator.Superview == ContentView)
|
||||||
this.progress_indicator.RemoveFromSuperview ();
|
this.progress_indicator.RemoveFromSuperview ();
|
||||||
|
|
||||||
// TODO: still causes some flashes
|
|
||||||
this.web_view.MainFrame.LoadHtmlString (html, new NSUrl (""));
|
this.web_view.MainFrame.LoadHtmlString (html, new NSUrl (""));
|
||||||
ContentView.AddSubview (this.web_view);
|
ContentView.AddSubview (this.web_view);
|
||||||
});
|
});
|
||||||
|
@ -213,7 +212,7 @@ namespace SparkleShare {
|
||||||
string note = match.Groups [3].Value;
|
string note = match.Groups [3].Value;
|
||||||
|
|
||||||
Thread thread = new Thread (new ThreadStart (delegate {
|
Thread thread = new Thread (new ThreadStart (delegate {
|
||||||
SparkleShare.Controller.AddNoteToFolder (folder_name, revision, note);
|
Program.Controller.AddNoteToFolder (folder_name, revision, note);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
thread.Start ();
|
thread.Start ();
|
||||||
|
|
0
SparkleShare/Mac/SparkleMacWatcher.cs
Normal file → Executable file
0
SparkleShare/Mac/SparkleMacWatcher.cs
Normal file → Executable file
289
SparkleShare/Mac/SparkleSetup.cs
Normal file → Executable file
289
SparkleShare/Mac/SparkleSetup.cs
Normal file → Executable file
|
@ -28,44 +28,49 @@ using MonoMac.WebKit;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public class SparkleSetup : SparkleSetupWindow {
|
public class SparkleSetup : SparkleSetupWindow {
|
||||||
|
|
||||||
public SparkleSetupController Controller = new SparkleSetupController ();
|
public SparkleSetupController Controller = new SparkleSetupController ();
|
||||||
|
|
||||||
private NSButton ContinueButton;
|
private NSButton ContinueButton;
|
||||||
private NSButton SyncButton;
|
private NSButton SyncButton;
|
||||||
private NSButton TryAgainButton;
|
private NSButton TryAgainButton;
|
||||||
private NSButton CancelButton;
|
private NSButton CancelButton;
|
||||||
private NSButton OpenFolderButton;
|
private NSButton SkipTutorialButton;
|
||||||
private NSButton FinishButton;
|
private NSButton OpenFolderButton;
|
||||||
private NSForm UserInfoForm;
|
private NSButton FinishButton;
|
||||||
private NSProgressIndicator ProgressIndicator;
|
private NSButton AddProjectButton;
|
||||||
private NSTextField AddressTextField;
|
private NSImage SlideImage;
|
||||||
private NSTextField FolderNameTextField;
|
private NSImageView SlideImageView;
|
||||||
private NSTextField ServerTypeLabel;
|
private NSForm UserInfoForm;
|
||||||
private NSTextField AddressLabel;
|
private NSProgressIndicator ProgressIndicator;
|
||||||
private NSTextField FolderNameLabel;
|
private NSTextField AddressTextField;
|
||||||
private NSTextField FolderNameHelpLabel;
|
private NSTextField FolderNameTextField;
|
||||||
private NSButtonCell ButtonCellProto;
|
private NSTextField ServerTypeLabel;
|
||||||
private NSMatrix Matrix;
|
private NSTextField AddressLabel;
|
||||||
private int ServerType;
|
private NSTextField FolderNameLabel;
|
||||||
private Timer timer;
|
private NSTextField FolderNameHelpLabel;
|
||||||
|
private NSTextField AddProjectTextField;
|
||||||
|
private NSButtonCell ButtonCellProto;
|
||||||
|
private NSMatrix Matrix;
|
||||||
|
private int ServerType;
|
||||||
|
private Timer timer;
|
||||||
|
|
||||||
|
|
||||||
public SparkleSetup () : base ()
|
public SparkleSetup () : base ()
|
||||||
{
|
{
|
||||||
Controller.ChangePageEvent += delegate (PageType type) {
|
Controller.ChangePageEvent += delegate (PageType type) {
|
||||||
InvokeOnMainThread (delegate {
|
InvokeOnMainThread (delegate {
|
||||||
Reset ();
|
Reset ();
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case PageType.Setup:
|
case PageType.Setup: {
|
||||||
|
|
||||||
Header = "Welcome to SparkleShare!";
|
Header = "Welcome to SparkleShare!";
|
||||||
Description = "Before we can create a SparkleShare folder on this " +
|
Description = "Before we can create a SparkleShare folder on this " +
|
||||||
"computer, we need some information from you.";
|
"computer, we need some information from you.";
|
||||||
|
|
||||||
UserInfoForm = new NSForm (new RectangleF (250, 115, 350, 64));
|
UserInfoForm = new NSForm (new RectangleF (250, Frame.Height - 280, 350, 64));
|
||||||
|
|
||||||
UserInfoForm.AddEntry ("Full Name:");
|
UserInfoForm.AddEntry ("Full Name:");
|
||||||
UserInfoForm.AddEntry ("Email Address:");
|
UserInfoForm.AddEntry ("Email Address:");
|
||||||
|
@ -75,8 +80,8 @@ namespace SparkleShare {
|
||||||
UserInfoForm.Cells [0].LineBreakMode = NSLineBreakMode.TruncatingTail;
|
UserInfoForm.Cells [0].LineBreakMode = NSLineBreakMode.TruncatingTail;
|
||||||
UserInfoForm.Cells [1].LineBreakMode = NSLineBreakMode.TruncatingTail;
|
UserInfoForm.Cells [1].LineBreakMode = NSLineBreakMode.TruncatingTail;
|
||||||
|
|
||||||
UserInfoForm.Cells [0].StringValue = SparkleShare.Controller.UserName;
|
UserInfoForm.Cells [0].StringValue = Controller.GuessedUserName;
|
||||||
UserInfoForm.Cells [1].StringValue = SparkleShare.Controller.UserEmail;
|
UserInfoForm.Cells [1].StringValue = Controller.GuessedUserEmail;
|
||||||
|
|
||||||
// TODO: Ugly hack, do properly with events
|
// TODO: Ugly hack, do properly with events
|
||||||
timer = new Timer () {
|
timer = new Timer () {
|
||||||
|
@ -102,7 +107,7 @@ namespace SparkleShare {
|
||||||
InvokeOnMainThread (delegate {
|
InvokeOnMainThread (delegate {
|
||||||
bool name_is_valid = !UserInfoForm.Cells [0].StringValue.Trim ().Equals ("");
|
bool name_is_valid = !UserInfoForm.Cells [0].StringValue.Trim ().Equals ("");
|
||||||
|
|
||||||
bool email_is_valid = SparkleShare.Controller.IsValidEmail (
|
bool email_is_valid = Program.Controller.IsValidEmail (
|
||||||
UserInfoForm.Cells [1].StringValue.Trim ());
|
UserInfoForm.Cells [1].StringValue.Trim ());
|
||||||
|
|
||||||
ContinueButton.Enabled = (name_is_valid && email_is_valid);
|
ContinueButton.Enabled = (name_is_valid && email_is_valid);
|
||||||
|
@ -115,10 +120,11 @@ namespace SparkleShare {
|
||||||
Buttons.Add (ContinueButton);
|
Buttons.Add (ContinueButton);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case PageType.Add:
|
case PageType.Add: {
|
||||||
|
|
||||||
Header = "Where is your remote folder?";
|
Header = "Where is your project?";
|
||||||
Description = "";
|
Description = "";
|
||||||
|
|
||||||
ServerTypeLabel = new NSTextField () {
|
ServerTypeLabel = new NSTextField () {
|
||||||
|
@ -126,8 +132,8 @@ namespace SparkleShare {
|
||||||
BackgroundColor = NSColor.WindowBackground,
|
BackgroundColor = NSColor.WindowBackground,
|
||||||
Bordered = false,
|
Bordered = false,
|
||||||
Editable = false,
|
Editable = false,
|
||||||
Frame = new RectangleF (150, Frame.Height - 139 , 160, 17),
|
Frame = new RectangleF (150, Frame.Height - 159 , 160, 17),
|
||||||
StringValue = "Server Type:",
|
StringValue = "Host Type:",
|
||||||
Font = SparkleUI.Font
|
Font = SparkleUI.Font
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,7 +142,7 @@ namespace SparkleShare {
|
||||||
BackgroundColor = NSColor.WindowBackground,
|
BackgroundColor = NSColor.WindowBackground,
|
||||||
Bordered = false,
|
Bordered = false,
|
||||||
Editable = false,
|
Editable = false,
|
||||||
Frame = new RectangleF (150, Frame.Height - 237 , 160, 17),
|
Frame = new RectangleF (150, Frame.Height - 257 , 160, 17),
|
||||||
StringValue = "Address:",
|
StringValue = "Address:",
|
||||||
Font = SparkleUI.Font
|
Font = SparkleUI.Font
|
||||||
};
|
};
|
||||||
|
@ -146,14 +152,14 @@ namespace SparkleShare {
|
||||||
BackgroundColor = NSColor.WindowBackground,
|
BackgroundColor = NSColor.WindowBackground,
|
||||||
Bordered = false,
|
Bordered = false,
|
||||||
Editable = false,
|
Editable = false,
|
||||||
Frame = new RectangleF (150, Frame.Height - 264 , 160, 17),
|
Frame = new RectangleF (150, Frame.Height - 284 , 160, 17),
|
||||||
StringValue = "Folder Name:",
|
StringValue = "Folder Name:",
|
||||||
Font = SparkleUI.Font
|
Font = SparkleUI.Font
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
AddressTextField = new NSTextField () {
|
AddressTextField = new NSTextField () {
|
||||||
Frame = new RectangleF (320, Frame.Height - 240 , 256, 22),
|
Frame = new RectangleF (320, Frame.Height - 260 , 256, 22),
|
||||||
Font = SparkleUI.Font,
|
Font = SparkleUI.Font,
|
||||||
StringValue = Controller.PreviousServer
|
StringValue = Controller.PreviousServer
|
||||||
};
|
};
|
||||||
|
@ -161,7 +167,7 @@ namespace SparkleShare {
|
||||||
AddressTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail;
|
AddressTextField.Cell.LineBreakMode = NSLineBreakMode.TruncatingTail;
|
||||||
|
|
||||||
FolderNameTextField = new NSTextField () {
|
FolderNameTextField = new NSTextField () {
|
||||||
Frame = new RectangleF (320, Frame.Height - (240 + 22 + 4) , 256, 22),
|
Frame = new RectangleF (320, Frame.Height - (260 + 22 + 4) , 256, 22),
|
||||||
StringValue = Controller.PreviousFolder
|
StringValue = Controller.PreviousFolder
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -172,7 +178,7 @@ namespace SparkleShare {
|
||||||
Bordered = false,
|
Bordered = false,
|
||||||
TextColor = NSColor.DisabledControlText,
|
TextColor = NSColor.DisabledControlText,
|
||||||
Editable = false,
|
Editable = false,
|
||||||
Frame = new RectangleF (320, Frame.Height - 285 , 200, 17),
|
Frame = new RectangleF (320, Frame.Height - 305 , 200, 17),
|
||||||
StringValue = "e.g. ‘rupert/website-design’"
|
StringValue = "e.g. ‘rupert/website-design’"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -181,7 +187,7 @@ namespace SparkleShare {
|
||||||
ButtonCellProto = new NSButtonCell ();
|
ButtonCellProto = new NSButtonCell ();
|
||||||
ButtonCellProto.SetButtonType (NSButtonType.Radio) ;
|
ButtonCellProto.SetButtonType (NSButtonType.Radio) ;
|
||||||
|
|
||||||
Matrix = new NSMatrix (new RectangleF (315, 180, 256, 78),
|
Matrix = new NSMatrix (new RectangleF (315, Frame.Height - 220, 256, 78),
|
||||||
NSMatrixMode.Radio, ButtonCellProto, 4, 1);
|
NSMatrixMode.Radio, ButtonCellProto, 4, 1);
|
||||||
|
|
||||||
Matrix.CellSize = new SizeF (256, 18);
|
Matrix.CellSize = new SizeF (256, 18);
|
||||||
|
@ -257,7 +263,7 @@ namespace SparkleShare {
|
||||||
ContentView.AddSubview (FolderNameHelpLabel);
|
ContentView.AddSubview (FolderNameHelpLabel);
|
||||||
|
|
||||||
SyncButton = new NSButton () {
|
SyncButton = new NSButton () {
|
||||||
Title = "Sync",
|
Title = "Add",
|
||||||
Enabled = false
|
Enabled = false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -285,19 +291,31 @@ namespace SparkleShare {
|
||||||
Buttons.Add (CancelButton);
|
Buttons.Add (CancelButton);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case PageType.Syncing:
|
case PageType.Syncing: {
|
||||||
|
|
||||||
Header = "Syncing folder ‘" + Controller.SyncingFolder + "’…";
|
Header = "Adding project ‘" + Controller.SyncingFolder + "’…";
|
||||||
Description = "This may take a while.\n" +
|
Description = "This may take a while.\n" +
|
||||||
"Are you sure it’s not coffee o'clock?";
|
"Are you sure it’s not coffee o'clock?";
|
||||||
|
|
||||||
ProgressIndicator = new NSProgressIndicator () {
|
ProgressIndicator = new NSProgressIndicator () {
|
||||||
Frame = new RectangleF (190, Frame.Height - 200, 640 - 150 - 80, 20),
|
Frame = new RectangleF (190, Frame.Height - 200, 640 - 150 - 80, 20),
|
||||||
Style = NSProgressIndicatorStyle.Bar
|
Style = NSProgressIndicatorStyle.Bar,
|
||||||
|
MinValue = 0.0,
|
||||||
|
MaxValue = 100.0,
|
||||||
|
Indeterminate = false,
|
||||||
|
DoubleValue = 1.0
|
||||||
};
|
};
|
||||||
|
|
||||||
ProgressIndicator.StartAnimation (this);
|
ProgressIndicator.StartAnimation (this);
|
||||||
|
|
||||||
|
Controller.UpdateProgressBarEvent += delegate (double percentage) {
|
||||||
|
InvokeOnMainThread (delegate {
|
||||||
|
ProgressIndicator.DoubleValue = percentage;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
ContentView.AddSubview (ProgressIndicator);
|
ContentView.AddSubview (ProgressIndicator);
|
||||||
|
|
||||||
FinishButton = new NSButton () {
|
FinishButton = new NSButton () {
|
||||||
|
@ -305,11 +323,21 @@ namespace SparkleShare {
|
||||||
Enabled = false
|
Enabled = false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CancelButton = new NSButton () {
|
||||||
|
Title = "Cancel"
|
||||||
|
};
|
||||||
|
|
||||||
|
CancelButton.Activated += delegate {
|
||||||
|
Controller.SyncingCancelled ();
|
||||||
|
};
|
||||||
|
|
||||||
Buttons.Add (FinishButton);
|
Buttons.Add (FinishButton);
|
||||||
|
Buttons.Add (CancelButton);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case PageType.Error:
|
case PageType.Error: {
|
||||||
|
|
||||||
Header = "Something went wrong…";
|
Header = "Something went wrong…";
|
||||||
Description = "";
|
Description = "";
|
||||||
|
@ -325,11 +353,12 @@ namespace SparkleShare {
|
||||||
Buttons.Add (TryAgainButton);
|
Buttons.Add (TryAgainButton);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case PageType.Finished:
|
case PageType.Finished: {
|
||||||
|
|
||||||
Header = "Folder synced succesfully!";
|
Header = "Project succesfully added!";
|
||||||
Description = "Now you can access the synced files from " +
|
Description = "Now you can access the files from " +
|
||||||
"‘" + Controller.SyncingFolder + "’ in " +
|
"‘" + Controller.SyncingFolder + "’ in " +
|
||||||
"your SparkleShare folder.";
|
"your SparkleShare folder.";
|
||||||
|
|
||||||
|
@ -339,6 +368,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
FinishButton.Activated += delegate {
|
FinishButton.Activated += delegate {
|
||||||
InvokeOnMainThread (delegate {
|
InvokeOnMainThread (delegate {
|
||||||
|
Controller.FinishedPageCompleted ();
|
||||||
PerformClose (this);
|
PerformClose (this);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -348,7 +378,7 @@ namespace SparkleShare {
|
||||||
};
|
};
|
||||||
|
|
||||||
OpenFolderButton.Activated += delegate {
|
OpenFolderButton.Activated += delegate {
|
||||||
SparkleShare.Controller.OpenSparkleShareFolder (Controller.SyncingFolder);
|
Program.Controller.OpenSparkleShareFolder (Controller.SyncingFolder);
|
||||||
};
|
};
|
||||||
|
|
||||||
Buttons.Add (FinishButton);
|
Buttons.Add (FinishButton);
|
||||||
|
@ -357,12 +387,177 @@ namespace SparkleShare {
|
||||||
NSApplication.SharedApplication.RequestUserAttention
|
NSApplication.SharedApplication.RequestUserAttention
|
||||||
(NSRequestUserAttentionType.CriticalRequest);
|
(NSRequestUserAttentionType.CriticalRequest);
|
||||||
|
|
||||||
|
NSSound.FromName ("Glass").Play ();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case PageType.Tutorial: {
|
||||||
|
|
||||||
|
switch (Controller.TutorialPageNumber) {
|
||||||
|
case 1: {
|
||||||
|
Header = "What's happening next?";
|
||||||
|
Description = "SparkleShare creates a special folder in your personal folder " +
|
||||||
|
"that will keep track of your projects.";
|
||||||
|
|
||||||
|
SkipTutorialButton = new NSButton () {
|
||||||
|
Title = "Skip Tutorial"
|
||||||
|
};
|
||||||
|
|
||||||
|
SkipTutorialButton.Activated += delegate {
|
||||||
|
Controller.TutorialSkipped ();
|
||||||
|
};
|
||||||
|
|
||||||
|
ContinueButton = new NSButton () {
|
||||||
|
Title = "Continue"
|
||||||
|
};
|
||||||
|
|
||||||
|
ContinueButton.Activated += delegate {
|
||||||
|
Controller.TutorialPageCompleted ();
|
||||||
|
};
|
||||||
|
|
||||||
|
string slide_image_path = Path.Combine (NSBundle.MainBundle.ResourcePath,
|
||||||
|
"Pixmaps", "tutorial-slide-1.png");
|
||||||
|
|
||||||
|
SlideImage = new NSImage (slide_image_path) {
|
||||||
|
Size = new SizeF (350, 200)
|
||||||
|
};
|
||||||
|
|
||||||
|
SlideImageView = new NSImageView () {
|
||||||
|
Image = SlideImage,
|
||||||
|
Frame = new RectangleF (215, Frame.Height - 350, 350, 200)
|
||||||
|
};
|
||||||
|
|
||||||
|
ContentView.AddSubview (SlideImageView);
|
||||||
|
Buttons.Add (ContinueButton);
|
||||||
|
Buttons.Add (SkipTutorialButton);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: {
|
||||||
|
Header = "Sharing files with others";
|
||||||
|
Description = "All files added to your project folders are synced with the host " +
|
||||||
|
"automatically, as well as with your collaborators.";
|
||||||
|
|
||||||
|
ContinueButton = new NSButton () {
|
||||||
|
Title = "Continue"
|
||||||
|
};
|
||||||
|
|
||||||
|
ContinueButton.Activated += delegate {
|
||||||
|
Controller.TutorialPageCompleted ();
|
||||||
|
};
|
||||||
|
|
||||||
|
string slide_image_path = Path.Combine (NSBundle.MainBundle.ResourcePath,
|
||||||
|
"Pixmaps", "tutorial-slide-2.png");
|
||||||
|
|
||||||
|
SlideImage = new NSImage (slide_image_path) {
|
||||||
|
Size = new SizeF (350, 200)
|
||||||
|
};
|
||||||
|
|
||||||
|
SlideImageView = new NSImageView () {
|
||||||
|
Image = SlideImage,
|
||||||
|
Frame = new RectangleF (215, Frame.Height - 350, 350, 200)
|
||||||
|
};
|
||||||
|
|
||||||
|
ContentView.AddSubview (SlideImageView);
|
||||||
|
Buttons.Add (ContinueButton);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 3: {
|
||||||
|
Header = "The status icon is here to help";
|
||||||
|
Description = "It shows the syncing process status, " +
|
||||||
|
"and contains links to your projects and the event log.";
|
||||||
|
|
||||||
|
ContinueButton = new NSButton () {
|
||||||
|
Title = "Continue"
|
||||||
|
};
|
||||||
|
|
||||||
|
ContinueButton.Activated += delegate {
|
||||||
|
Controller.TutorialPageCompleted ();
|
||||||
|
};
|
||||||
|
|
||||||
|
string slide_image_path = Path.Combine (NSBundle.MainBundle.ResourcePath,
|
||||||
|
"Pixmaps", "tutorial-slide-3.png");
|
||||||
|
|
||||||
|
SlideImage = new NSImage (slide_image_path) {
|
||||||
|
Size = new SizeF (350, 200)
|
||||||
|
};
|
||||||
|
|
||||||
|
SlideImageView = new NSImageView () {
|
||||||
|
Image = SlideImage,
|
||||||
|
Frame = new RectangleF (215, Frame.Height - 350, 350, 200)
|
||||||
|
};
|
||||||
|
|
||||||
|
ContentView.AddSubview (SlideImageView);
|
||||||
|
Buttons.Add (ContinueButton);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 4: {
|
||||||
|
Header = "Adding projects to SparkleShare";
|
||||||
|
Description = "Just click this button when you see it on the web, and " +
|
||||||
|
"the project will be automatically added:";
|
||||||
|
|
||||||
|
AddProjectTextField = new NSTextField () {
|
||||||
|
Frame = new RectangleF (190, Frame.Height - 290, 640 - 240, 44),
|
||||||
|
BackgroundColor = NSColor.WindowBackground,
|
||||||
|
Bordered = false,
|
||||||
|
Editable = false,
|
||||||
|
Font = SparkleUI.Font,
|
||||||
|
StringValue = "…or select ‘Add Project…’ from the status icon menu " +
|
||||||
|
"to add one by hand."
|
||||||
|
};
|
||||||
|
|
||||||
|
AddProjectButton = new NSButton () {
|
||||||
|
Title = "Add Project…"
|
||||||
|
};
|
||||||
|
|
||||||
|
AddProjectButton.Activated += delegate {
|
||||||
|
Controller.TutorialPageCompleted ();
|
||||||
|
};
|
||||||
|
|
||||||
|
FinishButton = new NSButton () {
|
||||||
|
Title = "Finish"
|
||||||
|
};
|
||||||
|
|
||||||
|
FinishButton.Activated += delegate {
|
||||||
|
InvokeOnMainThread (delegate {
|
||||||
|
PerformClose (this);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
string slide_image_path = Path.Combine (NSBundle.MainBundle.ResourcePath,
|
||||||
|
"Pixmaps", "tutorial-slide-4.png");
|
||||||
|
|
||||||
|
SlideImage = new NSImage (slide_image_path) {
|
||||||
|
Size = new SizeF (350, 64)
|
||||||
|
};
|
||||||
|
|
||||||
|
SlideImageView = new NSImageView () {
|
||||||
|
Image = SlideImage,
|
||||||
|
Frame = new RectangleF (215, Frame.Height - 215, 350, 64)
|
||||||
|
};
|
||||||
|
|
||||||
|
ContentView.AddSubview (SlideImageView);
|
||||||
|
ContentView.AddSubview (AddProjectTextField);
|
||||||
|
Buttons.Add (FinishButton);
|
||||||
|
Buttons.Add (AddProjectButton);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ShowAll ();
|
ShowAll ();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
8
SparkleShare/Mac/SparkleSetupWindow.cs
Normal file → Executable file
8
SparkleShare/Mac/SparkleSetupWindow.cs
Normal file → Executable file
|
@ -42,11 +42,11 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public SparkleSetupWindow () : base ()
|
public SparkleSetupWindow () : base ()
|
||||||
{
|
{
|
||||||
SetFrame (new RectangleF (0, 0, 640, 380), true);
|
SetFrame (new RectangleF (0, 0, 640, 420), true);
|
||||||
|
|
||||||
StyleMask = NSWindowStyle.Titled;
|
StyleMask = NSWindowStyle.Titled;
|
||||||
MaxSize = new SizeF (640, 380);
|
MaxSize = new SizeF (640, 420);
|
||||||
MinSize = new SizeF (640, 380);
|
MinSize = new SizeF (640, 420);
|
||||||
HasShadow = true;
|
HasShadow = true;
|
||||||
BackingType = NSBackingStore.Buffered;
|
BackingType = NSBackingStore.Buffered;
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ namespace SparkleShare {
|
||||||
};
|
};
|
||||||
|
|
||||||
DescriptionTextField = new NSTextField () {
|
DescriptionTextField = new NSTextField () {
|
||||||
Frame = new RectangleF (190, Frame.Height - 155 , 640 - 240, 64),
|
Frame = new RectangleF (190, Frame.Height - 130, 640 - 240, 44),
|
||||||
BackgroundColor = NSColor.WindowBackground,
|
BackgroundColor = NSColor.WindowBackground,
|
||||||
Bordered = false,
|
Bordered = false,
|
||||||
Editable = false,
|
Editable = false,
|
||||||
|
|
33
SparkleShare/Mac/SparkleShare.csproj
Normal file → Executable file
33
SparkleShare/Mac/SparkleShare.csproj
Normal file → Executable file
|
@ -62,7 +62,7 @@
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\bin\Meebey.SmartIrc4net.dll</HintPath>
|
<HintPath>..\..\bin\Meebey.SmartIrc4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SparkleLib, Version=0.2.4.0, Culture=neutral, PublicKeyToken=null">
|
<Reference Include="SparkleLib, Version=0.2.5.0, Culture=neutral, PublicKeyToken=null">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\bin\SparkleLib.dll</HintPath>
|
<HintPath>..\..\bin\SparkleLib.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
@ -74,14 +74,13 @@
|
||||||
<Compile Include="MainMenu.xib.designer.cs">
|
<Compile Include="MainMenu.xib.designer.cs">
|
||||||
<DependentUpon>MainMenu.xib</DependentUpon>
|
<DependentUpon>MainMenu.xib</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="..\SparkleController.cs">
|
<Compile Include="..\SparkleControllerBase.cs">
|
||||||
<Link>SparkleController.cs</Link>
|
<Link>SparkleControllerBase.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="SparkleMacController.cs" />
|
|
||||||
<Compile Include="SparkleStatusIcon.cs" />
|
<Compile Include="SparkleStatusIcon.cs" />
|
||||||
<Compile Include="SparkleUI.cs" />
|
<Compile Include="SparkleUI.cs" />
|
||||||
<Compile Include="..\SparkleShare.cs">
|
<Compile Include="..\Program.cs">
|
||||||
<Link>SparkleShare.cs</Link>
|
<Link>Program.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="SparkleAbout.cs" />
|
<Compile Include="SparkleAbout.cs" />
|
||||||
<Compile Include="SparkleAlert.cs" />
|
<Compile Include="SparkleAlert.cs" />
|
||||||
|
@ -106,12 +105,19 @@
|
||||||
<Compile Include="..\SparkleAboutController.cs">
|
<Compile Include="..\SparkleAboutController.cs">
|
||||||
<Link>SparkleAboutController.cs</Link>
|
<Link>SparkleAboutController.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\SparkleExtensions.cs">
|
||||||
|
<Link>SparkleExtensions.cs</Link>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SparkleController.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Include="MainMenu.xib" />
|
<Page Include="MainMenu.xib" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Info.plist" />
|
<None Include="Info.plist" />
|
||||||
|
<None Include="..\..\data\icons\avatar-default.png">
|
||||||
|
<Link>Pixmaps\avatar-default.png</Link>
|
||||||
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
|
||||||
|
@ -128,9 +134,6 @@
|
||||||
<Content Include="..\..\data\side-splash.png">
|
<Content Include="..\..\data\side-splash.png">
|
||||||
<Link>Pixmaps\side-splash.png</Link>
|
<Link>Pixmaps\side-splash.png</Link>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="..\..\data\avatar-default.png">
|
|
||||||
<Link>Pixmaps\avatar-default.png</Link>
|
|
||||||
</Content>
|
|
||||||
<Content Include="..\..\data\sparkleshare-mac.icns">
|
<Content Include="..\..\data\sparkleshare-mac.icns">
|
||||||
<Link>sparkleshare-mac.icns</Link>
|
<Link>sparkleshare-mac.icns</Link>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -267,6 +270,18 @@
|
||||||
<Content Include="..\..\data\html\jquery.js">
|
<Content Include="..\..\data\html\jquery.js">
|
||||||
<Link>HTML\jquery.js</Link>
|
<Link>HTML\jquery.js</Link>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="..\..\data\tutorial-slide-1.png">
|
||||||
|
<Link>Pixmaps\tutorial-slide-1.png</Link>
|
||||||
|
</Content>
|
||||||
|
<Content Include="..\..\data\tutorial-slide-2.png">
|
||||||
|
<Link>Pixmaps\tutorial-slide-2.png</Link>
|
||||||
|
</Content>
|
||||||
|
<Content Include="..\..\data\tutorial-slide-3.png">
|
||||||
|
<Link>Pixmaps\tutorial-slide-3.png</Link>
|
||||||
|
</Content>
|
||||||
|
<Content Include="..\..\data\tutorial-slide-4.png">
|
||||||
|
<Link>Pixmaps\tutorial-slide-4.png</Link>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Pixmaps\" />
|
<Folder Include="Pixmaps\" />
|
||||||
|
|
0
SparkleShare/Mac/SparkleShare.sln
Normal file → Executable file
0
SparkleShare/Mac/SparkleShare.sln
Normal file → Executable file
39
SparkleShare/Mac/SparkleStatusIcon.cs
Normal file → Executable file
39
SparkleShare/Mac/SparkleStatusIcon.cs
Normal file → Executable file
|
@ -66,7 +66,11 @@ namespace SparkleShare {
|
||||||
StatusItem = NSStatusBar.SystemStatusBar.CreateStatusItem (28);
|
StatusItem = NSStatusBar.SystemStatusBar.CreateStatusItem (28);
|
||||||
StatusItem.HighlightMode = true;
|
StatusItem.HighlightMode = true;
|
||||||
|
|
||||||
StateText = _("Up to date") + " (" + Controller.FolderSize + ")";
|
if (Controller.Folders.Length == 0)
|
||||||
|
StateText = _("Welcome to SparkleShare!");
|
||||||
|
else
|
||||||
|
StateText = _("Up to date") + " — " + Controller.FolderSize;
|
||||||
|
|
||||||
CreateMenu ();
|
CreateMenu ();
|
||||||
|
|
||||||
Menu.Delegate = new SparkleStatusIconMenuDelegate ();
|
Menu.Delegate = new SparkleStatusIconMenuDelegate ();
|
||||||
|
@ -83,7 +87,7 @@ namespace SparkleShare {
|
||||||
if (Controller.Folders.Length == 0)
|
if (Controller.Folders.Length == 0)
|
||||||
StateText = _("Welcome to SparkleShare!");
|
StateText = _("Welcome to SparkleShare!");
|
||||||
else
|
else
|
||||||
StateText = _("Up to date") + " (" + Controller.FolderSize + ")";
|
StateText = _("Up to date") + " — " + Controller.FolderSize;
|
||||||
|
|
||||||
StateMenuItem.Title = StateText;
|
StateMenuItem.Title = StateText;
|
||||||
CreateMenu ();
|
CreateMenu ();
|
||||||
|
@ -117,9 +121,6 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,7 +146,7 @@ namespace SparkleShare {
|
||||||
};
|
};
|
||||||
|
|
||||||
FolderMenuItem.Activated += delegate {
|
FolderMenuItem.Activated += delegate {
|
||||||
SparkleShare.Controller.OpenSparkleShareFolder ();
|
Program.Controller.OpenSparkleShareFolder ();
|
||||||
};
|
};
|
||||||
|
|
||||||
FolderMenuItem.Image = NSImage.ImageNamed ("sparkleshare-mac");
|
FolderMenuItem.Image = NSImage.ImageNamed ("sparkleshare-mac");
|
||||||
|
@ -153,22 +154,21 @@ namespace SparkleShare {
|
||||||
|
|
||||||
Menu.AddItem (FolderMenuItem);
|
Menu.AddItem (FolderMenuItem);
|
||||||
|
|
||||||
FolderMenuItems = new NSMenuItem [SparkleShare.Controller.Folders.Count];
|
FolderMenuItems = new NSMenuItem [Program.Controller.Folders.Count];
|
||||||
|
|
||||||
if (Controller.Folders.Length > 0) {
|
if (Controller.Folders.Length > 0) {
|
||||||
Tasks = new EventHandler [SparkleShare.Controller.Folders.Count];
|
Tasks = new EventHandler [Program.Controller.Folders.Count];
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach (string folder_name in SparkleShare.Controller.Folders) {
|
foreach (string folder_name in Program.Controller.Folders) {
|
||||||
NSMenuItem item = new NSMenuItem ();
|
NSMenuItem item = new NSMenuItem ();
|
||||||
|
|
||||||
item.Title = folder_name;
|
item.Title = folder_name;
|
||||||
|
|
||||||
if (SparkleShare.Controller.UnsyncedFolders.Contains (folder_name))
|
if (Program.Controller.UnsyncedFolders.Contains (folder_name))
|
||||||
item.Image = NSImage.ImageNamed ("NSCaution");
|
item.Image = NSImage.ImageNamed ("NSCaution");
|
||||||
else
|
else
|
||||||
item.Image = NSImage.ImageNamed ("NSFolder");
|
item.Image = NSImage.ImageNamed ("NSFolder");
|
||||||
|
|
||||||
item.Image.Size = new SizeF (16, 16);
|
item.Image.Size = new SizeF (16, 16);
|
||||||
Tasks [i] = OpenFolderDelegate (folder_name);
|
Tasks [i] = OpenFolderDelegate (folder_name);
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ namespace SparkleShare {
|
||||||
FolderMenuItems = new NSMenuItem [1];
|
FolderMenuItems = new NSMenuItem [1];
|
||||||
|
|
||||||
FolderMenuItems [0] = new NSMenuItem () {
|
FolderMenuItems [0] = new NSMenuItem () {
|
||||||
Title = "No Remote Folders Yet"
|
Title = "No projects yet"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,10 +192,10 @@ namespace SparkleShare {
|
||||||
Menu.AddItem (NSMenuItem.SeparatorItem);
|
Menu.AddItem (NSMenuItem.SeparatorItem);
|
||||||
|
|
||||||
SyncMenuItem = new NSMenuItem () {
|
SyncMenuItem = new NSMenuItem () {
|
||||||
Title = "Add Remote Folder…"
|
Title = "Add Project…"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!SparkleShare.Controller.FirstRun) {
|
if (!Program.Controller.FirstRun) {
|
||||||
SyncMenuItem.Activated += delegate {
|
SyncMenuItem.Activated += delegate {
|
||||||
InvokeOnMainThread (delegate {
|
InvokeOnMainThread (delegate {
|
||||||
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
|
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
|
||||||
|
@ -239,16 +239,16 @@ namespace SparkleShare {
|
||||||
|
|
||||||
NotificationsMenuItem = new NSMenuItem ();
|
NotificationsMenuItem = new NSMenuItem ();
|
||||||
|
|
||||||
if (SparkleShare.Controller.NotificationsEnabled)
|
if (Program.Controller.NotificationsEnabled)
|
||||||
NotificationsMenuItem.Title = "Turn Notifications Off";
|
NotificationsMenuItem.Title = "Turn Notifications Off";
|
||||||
else
|
else
|
||||||
NotificationsMenuItem.Title = "Turn Notifications On";
|
NotificationsMenuItem.Title = "Turn Notifications On";
|
||||||
|
|
||||||
NotificationsMenuItem.Activated += delegate {
|
NotificationsMenuItem.Activated += delegate {
|
||||||
SparkleShare.Controller.ToggleNotifications ();
|
Program.Controller.ToggleNotifications ();
|
||||||
|
|
||||||
InvokeOnMainThread (delegate {
|
InvokeOnMainThread (delegate {
|
||||||
if (SparkleShare.Controller.NotificationsEnabled)
|
if (Program.Controller.NotificationsEnabled)
|
||||||
NotificationsMenuItem.Title = "Turn Notifications Off";
|
NotificationsMenuItem.Title = "Turn Notifications Off";
|
||||||
else
|
else
|
||||||
NotificationsMenuItem.Title = "Turn Notifications On";
|
NotificationsMenuItem.Title = "Turn Notifications On";
|
||||||
|
@ -268,6 +268,9 @@ namespace SparkleShare {
|
||||||
|
|
||||||
if (SparkleUI.About == null)
|
if (SparkleUI.About == null)
|
||||||
SparkleUI.About = new SparkleAbout ();
|
SparkleUI.About = new SparkleAbout ();
|
||||||
|
else
|
||||||
|
SparkleUI.About.OrderFrontRegardless ();
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -285,7 +288,7 @@ namespace SparkleShare {
|
||||||
private EventHandler OpenFolderDelegate (string name)
|
private EventHandler OpenFolderDelegate (string name)
|
||||||
{
|
{
|
||||||
return delegate {
|
return delegate {
|
||||||
SparkleShare.Controller.OpenSparkleShareFolder (name);
|
Program.Controller.OpenSparkleShareFolder (name);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
8
SparkleShare/Mac/SparkleUI.cs
Normal file → Executable file
8
SparkleShare/Mac/SparkleUI.cs
Normal file → Executable file
|
@ -65,7 +65,7 @@ namespace SparkleShare {
|
||||||
NSApplication.SharedApplication.ApplicationIconImage
|
NSApplication.SharedApplication.ApplicationIconImage
|
||||||
= NSImage.ImageNamed ("sparkleshare.icns");
|
= NSImage.ImageNamed ("sparkleshare.icns");
|
||||||
|
|
||||||
if (!SparkleShare.Controller.BackendIsPresent) {
|
if (!Program.Controller.BackendIsPresent) {
|
||||||
this.alert = new SparkleAlert ();
|
this.alert = new SparkleAlert ();
|
||||||
this.alert.RunModal ();
|
this.alert.RunModal ();
|
||||||
return;
|
return;
|
||||||
|
@ -79,7 +79,7 @@ namespace SparkleShare {
|
||||||
StatusIcon = new SparkleStatusIcon ();
|
StatusIcon = new SparkleStatusIcon ();
|
||||||
Bubbles = new SparkleBubbles ();
|
Bubbles = new SparkleBubbles ();
|
||||||
|
|
||||||
if (SparkleShare.Controller.FirstRun) {
|
if (Program.Controller.FirstRun) {
|
||||||
Setup = new SparkleSetup ();
|
Setup = new SparkleSetup ();
|
||||||
Setup.Controller.ShowSetupPage ();
|
Setup.Controller.ShowSetupPage ();
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ namespace SparkleShare {
|
||||||
NSImage folder_icon = new NSImage (folder_icon_path);
|
NSImage folder_icon = new NSImage (folder_icon_path);
|
||||||
|
|
||||||
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon,
|
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon,
|
||||||
SparkleShare.Controller.SparklePath, 0);
|
Program.Controller.SparklePath, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public override void WillTerminate (NSNotification notification)
|
public override void WillTerminate (NSNotification notification)
|
||||||
{
|
{
|
||||||
SparkleShare.Controller.Quit ();
|
Program.Controller.Quit ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
0
SparkleShare/Makefile.am
Normal file → Executable file
0
SparkleShare/Makefile.am
Normal file → Executable file
0
SparkleShare/Nautilus/Makefile.am
Normal file → Executable file
0
SparkleShare/Nautilus/Makefile.am
Normal file → Executable file
6
SparkleShare/Nautilus/sparkleshare-nautilus-extension.py.in
Normal file → Executable file
6
SparkleShare/Nautilus/sparkleshare-nautilus-extension.py.in
Normal file → Executable file
|
@ -121,13 +121,13 @@ class SparkleShareExtension (nautilus.MenuProvider):
|
||||||
|
|
||||||
os.chdir (file_reference.get_parent ().get_path ())
|
os.chdir (file_reference.get_parent ().get_path ())
|
||||||
|
|
||||||
time_command = os.popen ("git log -10 --format='%at' " + file_reference.get_path ()
|
time_command = os.popen ("git log -10 --format='%at' " + file_reference.get_basename ()
|
||||||
.replace (" ", "\ ").replace ("(", "\(").replace (")", "\)"))
|
.replace (" ", "\ ").replace ("(", "\(").replace (")", "\)"))
|
||||||
|
|
||||||
author_command = os.popen ("git log -10 --format='%an' " + file_reference.get_path ()
|
author_command = os.popen ("git log -10 --format='%an' " + file_reference.get_basename ()
|
||||||
.replace (" ", "\ ").replace ("(", "\(").replace (")", "\)"))
|
.replace (" ", "\ ").replace ("(", "\(").replace (")", "\)"))
|
||||||
|
|
||||||
hash_command = os.popen ("git log -10 --format='%H' " + file_reference.get_path ()
|
hash_command = os.popen ("git log -10 --format='%H' " + file_reference.get_basename ()
|
||||||
.replace (" ", "\ ").replace ("(", "\(").replace (")", "\)"))
|
.replace (" ", "\ ").replace ("(", "\(").replace (")", "\)"))
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
|
|
|
@ -39,10 +39,10 @@ namespace SparkleShare {
|
||||||
// Short alias for the translations
|
// Short alias for the translations
|
||||||
public static string _ (string s)
|
public static string _ (string s)
|
||||||
{
|
{
|
||||||
return Catalog.GetString (s);
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[STAThread]
|
||||||
public static void Main (string [] args)
|
public static void Main (string [] args)
|
||||||
{
|
{
|
||||||
// Parse the command line options
|
// Parse the command line options
|
||||||
|
|
0
SparkleShare/SparkleAbout.cs
Normal file → Executable file
0
SparkleShare/SparkleAbout.cs
Normal file → Executable file
0
SparkleShare/SparkleAboutController.cs
Normal file → Executable file
0
SparkleShare/SparkleAboutController.cs
Normal file → Executable file
0
SparkleShare/SparkleBubbles.cs
Normal file → Executable file
0
SparkleShare/SparkleBubbles.cs
Normal file → Executable file
0
SparkleShare/SparkleBubblesController.cs
Normal file → Executable file
0
SparkleShare/SparkleBubblesController.cs
Normal file → Executable file
0
SparkleShare/SparkleController.cs
Normal file → Executable file
0
SparkleShare/SparkleController.cs
Normal file → Executable file
0
SparkleShare/SparkleEntry.cs
Normal file → Executable file
0
SparkleShare/SparkleEntry.cs
Normal file → Executable file
0
SparkleShare/SparkleEventLog.cs
Normal file → Executable file
0
SparkleShare/SparkleEventLog.cs
Normal file → Executable file
0
SparkleShare/SparkleEventLogController.cs
Normal file → Executable file
0
SparkleShare/SparkleEventLogController.cs
Normal file → Executable file
|
@ -1,214 +0,0 @@
|
||||||
// SparkleShare, a collaboration and sharing tool.
|
|
||||||
// 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.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
using Mono.Unix;
|
|
||||||
using SparkleLib;
|
|
||||||
|
|
||||||
namespace SparkleShare {
|
|
||||||
|
|
||||||
public class SparkleLinController : SparkleController {
|
|
||||||
|
|
||||||
public SparkleLinController () : base ()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Creates a .desktop entry in autostart folder to
|
|
||||||
// start SparkleShare automatically at login
|
|
||||||
public override void EnableSystemAutostart ()
|
|
||||||
{
|
|
||||||
string autostart_path = Path.Combine (Environment.GetFolderPath (
|
|
||||||
Environment.SpecialFolder.ApplicationData), "autostart");
|
|
||||||
|
|
||||||
string desktopfile_path = Path.Combine (autostart_path, "sparkleshare.desktop");
|
|
||||||
|
|
||||||
if (!Directory.Exists (autostart_path))
|
|
||||||
Directory.CreateDirectory (autostart_path);
|
|
||||||
|
|
||||||
if (!File.Exists (desktopfile_path)) {
|
|
||||||
TextWriter writer = new StreamWriter (desktopfile_path);
|
|
||||||
writer.WriteLine ("[Desktop Entry]\n" +
|
|
||||||
"Type=Application\n" +
|
|
||||||
"Name=SparkleShare\n" +
|
|
||||||
"Exec=sparkleshare start\n" +
|
|
||||||
"Icon=folder-sparkleshare\n" +
|
|
||||||
"Terminal=false\n" +
|
|
||||||
"X-GNOME-Autostart-enabled=true\n" +
|
|
||||||
"Categories=Network");
|
|
||||||
writer.Close ();
|
|
||||||
|
|
||||||
// Give the launcher the right permissions so it can be launched by the user
|
|
||||||
UnixFileInfo file_info = new UnixFileInfo (desktopfile_path);
|
|
||||||
file_info.Create (FileAccessPermissions.UserReadWriteExecute);
|
|
||||||
|
|
||||||
SparkleHelpers.DebugInfo ("Controller", "Enabled autostart on login");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Installs a launcher so the user can launch SparkleShare
|
|
||||||
// from the Internet category if needed
|
|
||||||
public override void InstallLauncher ()
|
|
||||||
{
|
|
||||||
string apps_path =
|
|
||||||
new string [] {SparkleConfig.DefaultConfig.HomePath,
|
|
||||||
".local", "share", "applications"}.Combine ();
|
|
||||||
|
|
||||||
string desktopfile_path = Path.Combine (apps_path, "sparkleshare.desktop");
|
|
||||||
|
|
||||||
if (!File.Exists (desktopfile_path)) {
|
|
||||||
if (!Directory.Exists (apps_path))
|
|
||||||
Directory.CreateDirectory (apps_path);
|
|
||||||
|
|
||||||
TextWriter writer = new StreamWriter (desktopfile_path);
|
|
||||||
writer.WriteLine ("[Desktop Entry]\n" +
|
|
||||||
"Type=Application\n" +
|
|
||||||
"Name=SparkleShare\n" +
|
|
||||||
"Comment=Share documents\n" +
|
|
||||||
"Exec=sparkleshare start\n" +
|
|
||||||
"Icon=folder-sparkleshare\n" +
|
|
||||||
"Terminal=false\n" +
|
|
||||||
"Categories=Network;");
|
|
||||||
writer.Close ();
|
|
||||||
|
|
||||||
// Give the launcher the right permissions so it can be launched by the user
|
|
||||||
UnixFileInfo file_info = new UnixFileInfo (desktopfile_path);
|
|
||||||
file_info.FileAccessPermissions = FileAccessPermissions.UserReadWriteExecute;
|
|
||||||
|
|
||||||
SparkleHelpers.DebugInfo ("Controller", "Created '" + desktopfile_path + "'");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Adds the SparkleShare folder to the user's
|
|
||||||
// list of bookmarked places
|
|
||||||
public override void AddToBookmarks ()
|
|
||||||
{
|
|
||||||
string bookmarks_file_path = Path.Combine (SparkleConfig.DefaultConfig.HomePath, ".gtk-bookmarks");
|
|
||||||
string sparkleshare_bookmark = "file://" + SparkleConfig.DefaultConfig.FoldersPath + " SparkleShare";
|
|
||||||
|
|
||||||
if (File.Exists (bookmarks_file_path)) {
|
|
||||||
StreamReader reader = new StreamReader (bookmarks_file_path);
|
|
||||||
string bookmarks = reader.ReadToEnd ();
|
|
||||||
reader.Close ();
|
|
||||||
|
|
||||||
if (!bookmarks.Contains (sparkleshare_bookmark)) {
|
|
||||||
TextWriter writer = File.AppendText (bookmarks_file_path);
|
|
||||||
writer.WriteLine ("file://" + SparkleConfig.DefaultConfig.FoldersPath + " SparkleShare");
|
|
||||||
writer.Close ();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
StreamWriter writer = new StreamWriter (bookmarks_file_path);
|
|
||||||
writer.WriteLine ("file://" + SparkleConfig.DefaultConfig.FoldersPath + " SparkleShare");
|
|
||||||
writer.Close ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Creates the SparkleShare folder in the user's home folder
|
|
||||||
public override bool CreateSparkleShareFolder ()
|
|
||||||
{
|
|
||||||
if (!Directory.Exists (SparkleConfig.DefaultConfig.FoldersPath)) {
|
|
||||||
|
|
||||||
Directory.CreateDirectory (SparkleConfig.DefaultConfig.FoldersPath);
|
|
||||||
SparkleHelpers.DebugInfo ("Controller", "Created '" + SparkleConfig.DefaultConfig.FoldersPath + "'");
|
|
||||||
|
|
||||||
string gvfs_command_path =
|
|
||||||
new string [] {Path.VolumeSeparatorChar.ToString (),
|
|
||||||
"usr", "bin", "gvfs-set-attribute"}.Combine ();
|
|
||||||
|
|
||||||
// Add a special icon to the SparkleShare folder
|
|
||||||
if (File.Exists (gvfs_command_path)) {
|
|
||||||
Process process = new Process ();
|
|
||||||
|
|
||||||
process.StartInfo.RedirectStandardOutput = true;
|
|
||||||
process.StartInfo.UseShellExecute = false;
|
|
||||||
process.StartInfo.FileName = "gvfs-set-attribute";
|
|
||||||
|
|
||||||
// Clear the custom (legacy) icon path
|
|
||||||
process.StartInfo.Arguments = "-t unset " + SparkleConfig.DefaultConfig.FoldersPath + " metadata::custom-icon";
|
|
||||||
process.Start ();
|
|
||||||
process.WaitForExit ();
|
|
||||||
|
|
||||||
// Give the SparkleShare folder an icon name, so that it scales
|
|
||||||
process.StartInfo.Arguments = SparkleConfig.DefaultConfig.FoldersPath + " metadata::custom-icon-name 'folder-sparkleshare'";
|
|
||||||
process.Start ();
|
|
||||||
process.WaitForExit ();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override string EventLogHTML {
|
|
||||||
get {
|
|
||||||
string path = new string [] {Defines.PREFIX,
|
|
||||||
"share", "sparkleshare", "html", "event-log.html"}.Combine ();
|
|
||||||
|
|
||||||
string html = String.Join (Environment.NewLine, File.ReadAllLines (path));
|
|
||||||
|
|
||||||
html = html.Replace ("<!-- $jquery-url -->", "file://" +
|
|
||||||
new string [] {Defines.PREFIX, "share", "sparkleshare", "html", "jquery.js"}.Combine ());
|
|
||||||
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override string DayEntryHTML {
|
|
||||||
get {
|
|
||||||
string path = new string [] {Defines.PREFIX,
|
|
||||||
"share", "sparkleshare", "html", "day-entry.html"}.Combine ();
|
|
||||||
|
|
||||||
return String.Join (Environment.NewLine, File.ReadAllLines (path));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override string EventEntryHTML {
|
|
||||||
get {
|
|
||||||
string path = new string [] {Defines.PREFIX,
|
|
||||||
"share", "sparkleshare", "html", "event-entry.html"}.Combine ();
|
|
||||||
|
|
||||||
return String.Join (Environment.NewLine, File.ReadAllLines (path));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override void OpenSparkleShareFolder (string subfolder)
|
|
||||||
{
|
|
||||||
string folder = Path.Combine (SparkleConfig.DefaultConfig.FoldersPath, subfolder);
|
|
||||||
|
|
||||||
Process process = new Process ();
|
|
||||||
process.StartInfo.FileName = "xdg-open";
|
|
||||||
process.StartInfo.Arguments = "\"" + folder + "\"";
|
|
||||||
process.Start ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
0
SparkleShare/SparkleSetup.cs
Normal file → Executable file
0
SparkleShare/SparkleSetup.cs
Normal file → Executable file
0
SparkleShare/SparkleSetupController.cs
Normal file → Executable file
0
SparkleShare/SparkleSetupController.cs
Normal file → Executable file
0
SparkleShare/SparkleSetupWindow.cs
Normal file → Executable file
0
SparkleShare/SparkleSetupWindow.cs
Normal file → Executable file
|
@ -1,154 +0,0 @@
|
||||||
// SparkleShare, a collaboration and sharing tool.
|
|
||||||
// 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.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
using SparkleLib;
|
|
||||||
using SparkleLib.Options;
|
|
||||||
|
|
||||||
namespace SparkleShare {
|
|
||||||
|
|
||||||
// This is SparkleShare!
|
|
||||||
public class SparkleShare {
|
|
||||||
|
|
||||||
public static SparkleController Controller;
|
|
||||||
public static SparkleUI UI;
|
|
||||||
|
|
||||||
|
|
||||||
// Short alias for the translations
|
|
||||||
public static string _ (string s)
|
|
||||||
{
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
[STAThread]
|
|
||||||
public static void Main (string [] args)
|
|
||||||
{
|
|
||||||
// Don't allow running as root on Linux or Mac
|
|
||||||
if ((SparkleBackend.Platform == PlatformID.Unix ||
|
|
||||||
SparkleBackend.Platform == PlatformID.MacOSX) &&
|
|
||||||
new Mono.Unix.UnixUserInfo (Mono.Unix.UnixEnvironment.UserName).UserId == 0) {
|
|
||||||
|
|
||||||
Console.WriteLine (_("Sorry, you can't run SparkleShare with these permissions."));
|
|
||||||
Console.WriteLine (_("Things would go utterly wrong."));
|
|
||||||
Environment.Exit (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Parse the command line options
|
|
||||||
bool show_help = false;
|
|
||||||
OptionSet option_set = new OptionSet () {
|
|
||||||
{ "v|version", _("Print version information"), v => { PrintVersion (); } },
|
|
||||||
{ "h|help", _("Show this help text"), v => show_help = v != null }
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
|
||||||
option_set.Parse (args);
|
|
||||||
|
|
||||||
} catch (OptionException e) {
|
|
||||||
Console.Write ("SparkleShare: ");
|
|
||||||
Console.WriteLine (e.Message);
|
|
||||||
Console.WriteLine ("Try `sparkleshare --help' for more information.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (show_help)
|
|
||||||
ShowHelp (option_set);
|
|
||||||
|
|
||||||
// Load the right controller for the OS
|
|
||||||
string controller_name = "Lin";
|
|
||||||
switch (SparkleBackend.Platform) {
|
|
||||||
case PlatformID.Unix:
|
|
||||||
SetProcessName ("sparkleshare");
|
|
||||||
break;
|
|
||||||
case PlatformID.MacOSX:
|
|
||||||
controller_name = "Mac";
|
|
||||||
break;
|
|
||||||
case PlatformID.Win32NT:
|
|
||||||
controller_name = "Win";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize the controller this way so that
|
|
||||||
// there aren't any exceptions in the OS specific UI's
|
|
||||||
Controller = (SparkleController) Activator.CreateInstance (
|
|
||||||
Type.GetType ("SparkleShare.Sparkle" + controller_name + "Controller"));
|
|
||||||
|
|
||||||
Controller.Initialize ();
|
|
||||||
|
|
||||||
if (Controller != null) {
|
|
||||||
UI = new SparkleUI ();
|
|
||||||
UI.Run ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Prints the help output
|
|
||||||
public static void ShowHelp (OptionSet option_set)
|
|
||||||
{
|
|
||||||
Console.WriteLine (" ");
|
|
||||||
Console.WriteLine (_("SparkleShare, a collaboration and sharing tool."));
|
|
||||||
Console.WriteLine (_("Copyright (C) 2010 Hylke Bons"));
|
|
||||||
Console.WriteLine (" ");
|
|
||||||
Console.WriteLine (_("This program comes with ABSOLUTELY NO WARRANTY."));
|
|
||||||
Console.WriteLine (" ");
|
|
||||||
Console.WriteLine (_("This is free software, and you are welcome to redistribute it "));
|
|
||||||
Console.WriteLine (_("under certain conditions. Please read the GNU GPLv3 for details."));
|
|
||||||
Console.WriteLine (" ");
|
|
||||||
Console.WriteLine (_("SparkleShare automatically syncs Git repositories in "));
|
|
||||||
Console.WriteLine (_("the ~/SparkleShare folder with their remote origins."));
|
|
||||||
Console.WriteLine (" ");
|
|
||||||
Console.WriteLine (_("Usage: sparkleshare [start|stop|restart] [OPTION]..."));
|
|
||||||
Console.WriteLine (_("Sync SparkleShare folder with remote repositories."));
|
|
||||||
Console.WriteLine (" ");
|
|
||||||
Console.WriteLine (_("Arguments:"));
|
|
||||||
|
|
||||||
option_set.WriteOptionDescriptions (Console.Out);
|
|
||||||
Environment.Exit (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Prints the version information
|
|
||||||
public static void PrintVersion ()
|
|
||||||
{
|
|
||||||
Console.WriteLine (_("SparkleShare " + Defines.VERSION));
|
|
||||||
Environment.Exit (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Strange magic needed by SetProcessName ()
|
|
||||||
[DllImport ("libc")]
|
|
||||||
private static extern int prctl (int option, byte [] arg2, IntPtr arg3, IntPtr arg4, IntPtr arg5);
|
|
||||||
|
|
||||||
|
|
||||||
// Sets the Unix process name to 'sparkleshare' instead of 'mono'
|
|
||||||
private static void SetProcessName (string name)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
if (prctl (15, Encoding.ASCII.GetBytes (name + "\0"), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) != 0)
|
|
||||||
throw new ApplicationException ("Error setting process name: " +
|
|
||||||
Mono.Unix.Native.Stdlib.GetLastError ());
|
|
||||||
|
|
||||||
} catch (EntryPointNotFoundException) {
|
|
||||||
Console.WriteLine ("SetProcessName: Entry point not found");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
0
SparkleShare/SparkleShare.csproj
Normal file → Executable file
0
SparkleShare/SparkleShare.csproj
Normal file → Executable file
0
SparkleShare/SparkleSpinner.cs
Normal file → Executable file
0
SparkleShare/SparkleSpinner.cs
Normal file → Executable file
0
SparkleShare/SparkleStatusIconController.cs
Normal file → Executable file
0
SparkleShare/SparkleStatusIconController.cs
Normal file → Executable file
|
@ -36,8 +36,11 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public static SparkleStatusIcon StatusIcon;
|
public static SparkleStatusIcon StatusIcon;
|
||||||
public static SparkleEventLog EventLog;
|
public static SparkleEventLog EventLog;
|
||||||
|
public static SparkleBubbles Bubbles;
|
||||||
public static SparkleSetup Setup;
|
public static SparkleSetup Setup;
|
||||||
public static SparkleAbout About;
|
public static SparkleAbout About;
|
||||||
|
public static string AssetsPath =
|
||||||
|
new string [] {Defines.PREFIX, "share", "sparkleshare"}.Combine ();
|
||||||
|
|
||||||
|
|
||||||
// Short alias for the translations
|
// Short alias for the translations
|
||||||
|
@ -60,22 +63,9 @@ namespace SparkleShare {
|
||||||
"Unhandled Exception!\n" + UnhandledException.GetType ().ToString ());
|
"Unhandled Exception!\n" + UnhandledException.GetType ().ToString ());
|
||||||
ExceptionDialog.Title = "ERROR";
|
ExceptionDialog.Title = "ERROR";
|
||||||
|
|
||||||
while (UnhandledException != null) {
|
|
||||||
Console.WriteLine ("\n\n"
|
|
||||||
+ "Unhandled exception\n"
|
|
||||||
+ "-------------------\n"
|
|
||||||
+ UnhandledException.Message + "\n\n"
|
|
||||||
+ UnhandledException.StackTrace);
|
|
||||||
UnhandledException = UnhandledException.InnerException;
|
|
||||||
}
|
|
||||||
|
|
||||||
ExceptionDialog.Run ();
|
|
||||||
ExceptionDialog.Destroy ();
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
// Create the statusicon
|
|
||||||
StatusIcon = new SparkleStatusIcon ();
|
StatusIcon = new SparkleStatusIcon ();
|
||||||
|
Bubbles = new SparkleBubbles ();
|
||||||
|
|
||||||
if (Program.Controller.FirstRun) {
|
if (Program.Controller.FirstRun) {
|
||||||
Setup = new SparkleSetup ();
|
Setup = new SparkleSetup ();
|
||||||
|
|
0
SparkleShare/SparkleUIHelpers.cs
Normal file → Executable file
0
SparkleShare/SparkleUIHelpers.cs
Normal file → Executable file
35
SparkleShare/Windows/Icons.Designer.cs
generated
35
SparkleShare/Windows/Icons.Designer.cs
generated
|
@ -277,6 +277,13 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap list_point_16 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("list_point_16", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static System.Drawing.Bitmap process_syncing_sparkleshare_24 {
|
internal static System.Drawing.Bitmap process_syncing_sparkleshare_24 {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("process_syncing_sparkleshare_24", resourceCulture);
|
object obj = ResourceManager.GetObject("process_syncing_sparkleshare_24", resourceCulture);
|
||||||
|
@ -353,5 +360,33 @@ namespace SparkleShare {
|
||||||
return ((System.Drawing.Bitmap)(obj));
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap tutorial_slide_1 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("tutorial_slide_1", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap tutorial_slide_2 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("tutorial_slide_2", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap tutorial_slide_3 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("tutorial_slide_3", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap tutorial_slide_4 {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("tutorial_slide_4", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,9 @@
|
||||||
</data>
|
</data>
|
||||||
<data name="avatar_default_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="avatar_default_48" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\..\data\icons\avatar-default-48.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\..\data\icons\avatar-default-48.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="avatar_default" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\..\data\icons\avatar-default.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="dialog_error_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="dialog_error_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\..\data\icons\dialog-error-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\..\data\icons\dialog-error-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
@ -204,6 +207,9 @@
|
||||||
</data>
|
</data>
|
||||||
<data name="idle4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="idle4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\..\data\icons\idle4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\..\data\icons\idle4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="list_point_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\..\data\icons\list-point-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="process_syncing_sparkleshare_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="process_syncing_sparkleshare_24" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\..\data\icons\process-syncing-sparkleshare-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\..\data\icons\process-syncing-sparkleshare-24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
@ -237,11 +243,20 @@
|
||||||
</data>
|
</data>
|
||||||
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="about" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\..\data\about.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\..\data\about.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
|
||||||
<data name="avatar_default" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
|
||||||
<value>..\..\data\avatar-default.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="side_splash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="side_splash" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\..\data\side-splash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\..\data\side-splash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="tutorial_slide_1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\..\data\tutorial-slide-1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="tutorial_slide_2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\..\data\tutorial-slide-2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="tutorial_slide_3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\..\data\tutorial-slide-3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
<data name="tutorial_slide_4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\..\data\tutorial-slide-4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
36
SparkleShare/Windows/SparkleBubbles.cs
Normal file
36
SparkleShare/Windows/SparkleBubbles.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
// SparkleShare, a collaboration and sharing tool.
|
||||||
|
// 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.Windows.Forms;
|
||||||
|
|
||||||
|
namespace SparkleShare {
|
||||||
|
|
||||||
|
public class SparkleBubbles {
|
||||||
|
|
||||||
|
public SparkleBubblesController Controller = new SparkleBubblesController ();
|
||||||
|
|
||||||
|
|
||||||
|
public SparkleBubbles ()
|
||||||
|
{
|
||||||
|
Controller.ShowBubbleEvent += delegate (string title, string subtext, string image_path) {
|
||||||
|
SparkleUI.StatusIcon.ShowBalloon(title, subtext, image_path);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -71,6 +71,9 @@
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>GlobalAssemblyInfo.tt</DependentUpon>
|
<DependentUpon>GlobalAssemblyInfo.tt</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\SparkleBubblesController.cs">
|
||||||
|
<Link>SparkleBubblesController.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\SparkleControllerBase.cs">
|
<Compile Include="..\SparkleControllerBase.cs">
|
||||||
<Link>SparkleControllerBase.cs</Link>
|
<Link>SparkleControllerBase.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -111,6 +114,7 @@
|
||||||
<Compile Include="..\SparkleSetupController.cs" />
|
<Compile Include="..\SparkleSetupController.cs" />
|
||||||
<Compile Include="..\SparkleUI.cs" />
|
<Compile Include="..\SparkleUI.cs" />
|
||||||
<Compile Include="..\SparkleAboutController.cs" />
|
<Compile Include="..\SparkleAboutController.cs" />
|
||||||
|
<Compile Include="SparkleBubbles.cs" />
|
||||||
<Compile Include="SparkleController.cs" />
|
<Compile Include="SparkleController.cs" />
|
||||||
<Compile Include="SparkleEventLog.cs">
|
<Compile Include="SparkleEventLog.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
|
@ -212,6 +216,7 @@
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="SparkleSetup.resx">
|
<EmbeddedResource Include="SparkleSetup.resx">
|
||||||
<DependentUpon>SparkleSetup.cs</DependentUpon>
|
<DependentUpon>SparkleSetup.cs</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -262,6 +262,15 @@ namespace SparkleShare {
|
||||||
status_icon.ContextMenuStrip = Menu;
|
status_icon.ContextMenuStrip = Menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ShowBalloon (string title, string subtext, string image_path)
|
||||||
|
{
|
||||||
|
status_icon.BalloonTipText = title;
|
||||||
|
status_icon.BalloonTipText = subtext;
|
||||||
|
// TODO: Use the image pointed to by image_path
|
||||||
|
status_icon.BalloonTipIcon = ToolTipIcon.None;
|
||||||
|
status_icon.ShowBalloonTip (2 * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// A method reference that makes sure that opening the
|
// A method reference that makes sure that opening the
|
||||||
// event log for each repository works correctly
|
// event log for each repository works correctly
|
||||||
|
|
0
SparkleShare/sparkleshare.desktop
Normal file → Executable file
0
SparkleShare/sparkleshare.desktop
Normal file → Executable file
0
SparkleShare/sparkleshare.in
Normal file → Executable file
0
SparkleShare/sparkleshare.in
Normal file → Executable file
0
build/Makefile.am
Normal file → Executable file
0
build/Makefile.am
Normal file → Executable file
0
build/build.environment.mk
Normal file → Executable file
0
build/build.environment.mk
Normal file → Executable file
0
build/build.mk
Normal file → Executable file
0
build/build.mk
Normal file → Executable file
0
build/build.rules.mk
Normal file → Executable file
0
build/build.rules.mk
Normal file → Executable file
0
build/m4/Makefile.am
Normal file → Executable file
0
build/m4/Makefile.am
Normal file → Executable file
0
build/m4/shamrock/expansions.m4
Normal file → Executable file
0
build/m4/shamrock/expansions.m4
Normal file → Executable file
0
build/m4/shamrock/gnome-doc.m4
Normal file → Executable file
0
build/m4/shamrock/gnome-doc.m4
Normal file → Executable file
0
build/m4/shamrock/i18n.m4
Normal file → Executable file
0
build/m4/shamrock/i18n.m4
Normal file → Executable file
0
build/m4/shamrock/mono.m4
Normal file → Executable file
0
build/m4/shamrock/mono.m4
Normal file → Executable file
0
build/m4/shamrock/monodoc.m4
Normal file → Executable file
0
build/m4/shamrock/monodoc.m4
Normal file → Executable file
0
build/m4/shamrock/nunit.m4
Normal file → Executable file
0
build/m4/shamrock/nunit.m4
Normal file → Executable file
0
build/m4/shamrock/programs.m4
Normal file → Executable file
0
build/m4/shamrock/programs.m4
Normal file → Executable file
0
build/m4/shamrock/util.m4
Normal file → Executable file
0
build/m4/shamrock/util.m4
Normal file → Executable file
0
build/m4/shave/shave-libtool.in
Normal file → Executable file
0
build/m4/shave/shave-libtool.in
Normal file → Executable file
0
build/m4/shave/shave.in
Normal file → Executable file
0
build/m4/shave/shave.in
Normal file → Executable file
0
build/m4/shave/shave.m4
Normal file → Executable file
0
build/m4/shave/shave.m4
Normal file → Executable file
0
build/m4/sparkleshare/gtk-sharp.m4
Normal file → Executable file
0
build/m4/sparkleshare/gtk-sharp.m4
Normal file → Executable file
0
build/m4/sparkleshare/nautilus-python.m4
Normal file → Executable file
0
build/m4/sparkleshare/nautilus-python.m4
Normal file → Executable file
0
build/m4/sparkleshare/notify-sharp.m4
Normal file → Executable file
0
build/m4/sparkleshare/notify-sharp.m4
Normal file → Executable file
0
build/m4/sparkleshare/smartirc4net.m4
Normal file → Executable file
0
build/m4/sparkleshare/smartirc4net.m4
Normal file → Executable file
0
configure.ac
Normal file → Executable file
0
configure.ac
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue