Actually grab the repo name fro mthe entry in Add dialog

This commit is contained in:
Hylke Bons 2010-05-19 21:47:43 +01:00
parent 8313690738
commit 0f99334807
7 changed files with 44 additions and 110 deletions

13
AUTHORS
View file

@ -1,6 +1,11 @@
Maintainer:
Hylke Bons <hylkebons@gmail.com>
Artwork by:
Lapo Calamandrei <calamandrei@gmail.com>
Jakub Steiner <jimmac@novell.com>
Hylke Bons <hylkebons@gmail.com>
Contributions by:
Lapo Calamandrei <calamandrei@gmail.com>
Garrett LeSage <garrett@novell.com>
Andreas Nilsson <andreasn@gnome.org>
Jakub Steiner <jimmac@novell.com>

54
LICENSE
View file

@ -619,57 +619,3 @@ Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

19
README
View file

@ -1,18 +1,17 @@
SparkleShare Version 0.0.12
SparkleShare Version 0.0.14
===========================
SparkleShare is a file sharing and collaboration tool inspired by Dropbox. It
allows you to instantly sync with any Git repository you have access to.
SparkleShare is a file sharing and collaboration tool inspired by Dropbox.
SparkleShare isn't just a piece of software, it's part of your workflow. It's
designed to make sharing documents and collaboration easier, and to make peers
aware of what you are doing. The user interface and features are made to
support this goal. However, you may find SparkleShare useful for other kinds of
purposes as well, like backing up files or monitoring your favourite project.
SparkleShare is not made to be a graphical frontend for git or a backup tool
In contrast to the projects name, we will very likely
refuse to implement your personal ponies. :)
aware of what you are doing. It allows you to instantly sync with any Git
repository you have access to. The user interface and features are made to
support this goal. 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 only works on Linux/GNOME.
Windows and OSX ports are planned for the future.

View file

@ -34,7 +34,6 @@ namespace SparkleShare {
private Button AddButton;
private ComboBoxEntry RemoteUrlCombo;
private Entry NameEntry;
public SparkleDialog () : base ("") {
@ -47,15 +46,8 @@ namespace SparkleShare {
VBox VBox = new VBox (false, 0);
Label NameLabel = new Label (_("Folder Name: "));
NameEntry = new Entry ();
Label NameExample = new Label (_("<span size='small'><i>Example: ") +
_("Project.</i></span>"));
NameExample.UseMarkup = true;
NameExample.SetAlignment (0, 0);
NameLabel.Xalign = 1;
Label RemoteUrlLabel = new Label (_("Remote address: "));
Label RemoteUrlLabel = new Label (_("Address: "));
string [] DefaultUrls = new string [4] { "ssh://git@github.com",
"ssh://git@git.gnome.org",
@ -64,8 +56,8 @@ namespace SparkleShare {
RemoteUrlCombo = new ComboBoxEntry (DefaultUrls);
Label RemoteUrlExample = new Label (_("<span size='small'><i>Example: ") +
_("ssh://git@github.com.</i></span>"));
Label RemoteUrlExample = new Label (_("<span size='small'><i>These usually look something like this:\n ") +
_("ssh://git@github.com/hbons/SparkleShare.</i></span>"));
RemoteUrlExample.UseMarkup = true;
RemoteUrlExample.SetAlignment (0, 0);
RemoteUrlLabel.Xalign = 1;
@ -83,7 +75,7 @@ namespace SparkleShare {
};
RemoteUrlCombo.Entry.Changed += CheckFields;
NameEntry.Changed += CheckFields;
RemoteUrlCombo.WidthRequest = 320;
AddButton.Sensitive = false;
AddButton.Clicked += CloneRepo;
@ -91,16 +83,13 @@ namespace SparkleShare {
ButtonBox.Add (CancelButton);
ButtonBox.Add (AddButton);
Table Table = new Table(4, 2, false);
Table Table = new Table(3, 2, false);
Table.RowSpacing = 6;
Table.BorderWidth = 6;
Table.Attach (NameLabel, 0, 1, 0, 1);
Table.Attach (NameEntry, 1, 2, 0, 1);
Table.Attach (NameExample, 1, 2, 1, 2);
Table.Attach (RemoteUrlLabel, 0, 1, 3, 4);
Table.Attach (RemoteUrlCombo, 1, 2, 3, 4);
Table.Attach (RemoteUrlExample, 1, 2, 4, 5);
Table.Attach (RemoteUrlLabel, 0, 1, 0, 1);
Table.Attach (RemoteUrlCombo, 1, 2, 0, 1);
Table.Attach (RemoteUrlExample, 1, 2, 1, 2);
VBox.PackStart (Table, false, false, 0);
VBox.PackStart (ButtonBox, false, false, 0);
@ -123,7 +112,8 @@ namespace SparkleShare {
Add (Box);
string RepoRemoteUrl = RemoteUrlCombo.Entry.Text;
string RepoName = NameEntry.Text;
string RepoName =
RepoRemoteUrl.Substring (RepoRemoteUrl.LastIndexOf ("/") + 1);
Process Process = new Process();
Process.EnableRaisingEvents = true;
@ -162,8 +152,7 @@ namespace SparkleShare {
// Enables the Add button when the fields are
// filled in correctly
public void CheckFields (object o, EventArgs args) {
if (SparkleHelpers.IsGitUrl (RemoteUrlCombo.Entry.Text)
&& NameEntry.Text.Length > 0)
if (SparkleHelpers.IsGitUrl (RemoteUrlCombo.Entry.Text))
AddButton.Sensitive = true;
else
AddButton.Sensitive = false;

View file

@ -70,24 +70,20 @@ namespace SparkleShare {
Menu.Add (NotifyCheckMenuItem);
Menu.Add (new SeparatorMenuItem ());
string NotifyChangesFileName =
SparkleHelpers.CombineMore (SparklePaths.SparkleConfigPath,
"sparkleshare.notify");
if (System.IO.File.Exists (NotifyChangesFileName))
NotifyCheckMenuItem.Active = true;
string NotifyChangesFileName =
SparkleHelpers.CombineMore (SparklePaths.SparkleConfigPath,
"sparkleshare.notify");
if (System.IO.File.Exists (NotifyChangesFileName))
NotifyCheckMenuItem.Active = true;
NotifyCheckMenuItem.Toggled += delegate {
if (System.IO.File.Exists (NotifyChangesFileName)) {
File.Delete (NotifyChangesFileName);
} else {
System.IO.File.Create (NotifyChangesFileName);
}
};
NotifyCheckMenuItem.Toggled += delegate {
if (System.IO.File.Exists (NotifyChangesFileName)) {
File.Delete (NotifyChangesFileName);
} else {
System.IO.File.Create (NotifyChangesFileName);
}
};
MenuItem OpenFolderItem = new MenuItem (_("Open Sharing Folder"));
OpenFolderItem.Activated += delegate {

View file

@ -266,7 +266,7 @@ namespace SparkleShare {
PeopleView.MarkupColumn = 1;
PeopleView.Columns = 3;
PeopleView.Spacing = 6;
PeopleView.ItemWidth = 200;
PeopleView.ItemWidth = 210;
PeopleView.Orientation = Orientation.Horizontal;
PeopleView.SelectionMode = SelectionMode.Single;

View file

@ -51,7 +51,6 @@ if [[ "$1" == "restart" ]]; then
fi
fi
if [[ "$1" == "--help" ]]; then
mono /usr/local/share/sparkleshare/SparkleShare.exe --help
fi