Merge remote branch 'origin/master' into translations

This commit is contained in:
Łukasz Jernaś 2010-08-30 21:40:38 +02:00
commit 6999167b92
17 changed files with 303 additions and 20 deletions

1
.gitignore vendored
View file

@ -35,3 +35,4 @@ Defines.cs
SparkleShare/sparkleshare
po/sparkleshare.pot
SparkleShare/Nautilus/sparkleshare-nautilus-extension.py
gnome-doc-utils.make

View file

@ -15,6 +15,7 @@ Contributors:
Łukasz Jernaś <deejay1@srem.org>
Michael Monreal <michael.monreal@gmail.com>
Oleg Khlystov <pktfag@gmail.com>
Paul Cutler <pcutler@gnome.org>
Philipp Gildein <rmbl@openspeak-project.org>
Ruben Vermeersch <rubenv@gnome.org>
Sandy Armstrong <sanfordarmstrong@gmail.com>

View file

@ -1,5 +1,6 @@
SUBDIRS = \
build \
help \
NotifySharp \
FriendFace \
SparkleLib \
@ -8,8 +9,11 @@ SUBDIRS = \
data \
po
EXTRA_DIST = gnome-doc-utils.make
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update
intltool-update \
gnome-doc-utils.make

2
README
View file

@ -38,6 +38,7 @@ SparkleShare currently requires:
- gvfs >= 1.3
- intltool
- nautilus-python
- pygtk
Run the service:
@ -68,6 +69,7 @@ To build SparkleShare you need:
- monodevelop >= 2.0
- ndesk-dbus-devel >= 0.6
- ndesk-dbus-glib-devel >= 0.6
- nautilus-python-devel
You can build and install SparkleShare like this:

View file

@ -315,10 +315,8 @@ namespace SparkleLib {
Process.Start ();
Process.WaitForExit ();
if (Process.StandardOutput.ReadToEnd ().TrimEnd ("\n".ToCharArray ()).Equals ("")) {
Console.WriteLine ("NO CHANGES!!");
if (Process.StandardOutput.ReadToEnd ().TrimEnd ("\n".ToCharArray ()).Equals (""))
return;
}
SparkleHelpers.DebugInfo ("Commit", "[" + Name + "] " + message);
@ -539,9 +537,10 @@ namespace SparkleLib {
{
if (file_path.EndsWith (".lock") ||
file_path.Contains (".git") ||
file_path.Contains ("/.") ||
file_path.EndsWith (".swp") ||
file_path.EndsWith ("~") ||
file_path.Contains (".git") ||
file_path.Contains ("/.") ||
file_path.EndsWith (".swp") ||
Directory.Exists (LocalPath + file_path)) {
return true; // Yes, ignore it

View file

@ -21,6 +21,10 @@ import time
import gio
import nautilus
import pygtk
pygtk.require('2.0')
import gtk
SPARKLESHARE_PATH = os.path.join (os.path.expanduser ('~'), "SparkleShare")
import gettext
@ -62,7 +66,33 @@ class SparkleShareExtension (nautilus.MenuProvider):
return True
def compare_versions (self, menu, file_reference):
def copy_web_link (self, menu, file_reference):
path = file_reference.get_path ()
# Get the remote url used for the repo
url_command = os.popen ("git config --get remote.origin.url")
url = url_command.readline ().strip ()
# Strip the unneeded parts
url = url.lstrip ("ssh://git")
url = url.lstrip ("@")
url = url.rstrip (".git")
# Format the right web url depending on the service
relative_path = path.lstrip (SPARKLESHARE_PATH)
repo_name = relative_path [:relative_path.find ("/")]
relative_path = relative_path.lstrip (repo_name)
if "gitorious.org" in url:
url = "http://" + url + "/blobs/master" + relative_path
if "github.com" in url:
url = "http://" + url + "/raw/master" + relative_path
clipboard = gtk.clipboard_get ()
clipboard.set_text (url)
clipboard.store ()
return
@ -78,6 +108,12 @@ class SparkleShareExtension (nautilus.MenuProvider):
if not (file_reference.get_path ().startswith (SPARKLESHARE_PATH)):
return
web_link_menu_item = nautilus.MenuItem ("Nautilus::CopyWebLink", _("Copy Web Link"),
_("Copy the web address of this file to the clipboard"))
web_link_menu_item.connect ("activate", self.copy_web_link, file_reference)
epochs = ["", "", "", "", "", "", "", "", "", ""]
commit_hashes = ["", "", "", "", "", "", "", "", "", ""]
@ -97,8 +133,9 @@ class SparkleShareExtension (nautilus.MenuProvider):
epochs [i] = line.strip ("\n")
i += 1
# Only work if there is history
if i < 2:
return
return web_link_menu_item,
i = 0
for line in hash_command.readlines ():
@ -129,9 +166,5 @@ class SparkleShareExtension (nautilus.MenuProvider):
earlier_version_menu_item.set_submenu (submenu)
# compare_versions_menu_item = nautilus.MenuItem ("Nautilus::CompareVersions", "Compare Versions",
# "Compare two versions of this document at any point in time")
# compare_versions_menu_item = menu_item.connect ("activate", self.compare_versions, file_reference)
return earlier_version_menu_item,
return earlier_version_menu_item, web_link_menu_item

View file

@ -364,7 +364,7 @@ namespace SparkleShare {
if (edited_files.Children.Length > 0) {
Label edited_label = new Label ("\n<span fgcolor='" + secondary_text_color +"'><small>" +
"Edited" +
_("Edited") +
"</small></span>") {
UseMarkup=true,
Xalign = 0
@ -378,7 +378,7 @@ namespace SparkleShare {
if (added_files.Children.Length > 0) {
Label added_label = new Label ("\n<span fgcolor='" + secondary_text_color +"'><small>" +
"Added" +
_("Added") +
"</small></span>") {
UseMarkup=true,
Xalign = 0
@ -392,7 +392,7 @@ namespace SparkleShare {
if (deleted_files.Children.Length > 0) {
Label deleted_label = new Label ("\n<span fgcolor='" + secondary_text_color +"'><small>" +
"Deleted" +
_("Deleted") +
"</small></span>") {
UseMarkup=true,
Xalign = 0
@ -406,7 +406,7 @@ namespace SparkleShare {
if (moved_files.Children.Length > 0) {
Label moved_label = new Label ("\n<span fgcolor='" + secondary_text_color +"'><small>" +
"Moved" +
_("Moved") +
"</small></span>") {
UseMarkup=true,
Xalign = 0

View file

@ -64,6 +64,15 @@ check_autotool_version $LIBTOOLIZE 1.4.3
check_autotool_version intltoolize 0.35.0
check_autotool_version pkg-config 0.14.0
if [ $(pkg-config --modversion gnome-doc-utils 2> /dev/null) ]; then
run gnome-doc-prepare --automake --force
else
echo "gnome-doc-utils not found; user help will not be built"
echo "AC_DEFUN([GNOME_DOC_INIT], [AC_MSG_NOTICE([])])" > build/m4/gnome-doc-utils.m4
ACLOCAL_FLAGS="-I build/m4 $ACLOCAL_FLAGS"
touch gnome-doc-utils.make
fi
run intltoolize --force --copy
run $LIBTOOLIZE --force --copy --automake
run aclocal -I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave $ACLOCAL_FLAGS

View file

@ -1,6 +1,22 @@
AC_DEFUN([SHAMROCK_CHECK_GNOME_DOC_UTILS],
[
GNOME_DOC_INIT([$1], HAVE_GNOME_DOC_UTILS=yes, HAVE_GNOME_DOC_UTILS=no)
AC_ARG_ENABLE([user-help],
AC_HELP_STRING([--enable-user-help], [Enable building the user-help [[default=auto]]]),,
enable_user_help=auto)
AM_CONDITIONAL(ENABLE_GNOME_DOCS, test "x$HAVE_GNOME_DOC_UTILS" = "xyes")
if test "x$enable_user_help" = "xauto"; then
PKG_CHECK_MODULES(GNOME_DOC_UTILS,
gnome-doc-utils,
enable_user_help=yes, enable_user_help=no)
elif test "x$enable_user_help" = "xyes"; then
PKG_CHECK_MODULES(GNOME_DOC_UTILS, gnome-doc-utils)
fi
if test "x$enable_user_help" = "xyes"; then
GNOME_DOC_INIT([$1], enable_user_help=yes, enable_user_help=no)
else
AM_CONDITIONAL(ENABLE_SK, false)
fi
AM_CONDITIONAL(HAVE_GNOME_DOC_UTILS, test "x$enable_user_help" = "xyes")
])

View file

@ -31,6 +31,9 @@ SHAMROCK_EXPAND_LIBDIR
SHAMROCK_EXPAND_BINDIR
SHAMROCK_EXPAND_DATADIR
dnl Help files
SHAMROCK_CHECK_GNOME_DOC_UTILS(0.17.3)
AC_PROG_INSTALL
AC_PATH_PROG(GMCS, gmcs, no)
@ -96,6 +99,7 @@ build/m4/shave/shave
build/m4/shave/shave-libtool
data/Makefile
data/icons/Makefile
help/Makefile
FriendFace/Makefile
NotifySharp/Makefile
SparkleDiff/Makefile
@ -110,3 +114,13 @@ po/Makefile.in
Makefile
])
echo "
SparkleShare ${VERSION}
Configuration:
Prefix : ${prefix}
Nautilus plugin : ${have_nautilus_python}
User Help : ${enable_user_help} (requires gnome-doc-utils >= 0.17.3)
"

View file

@ -0,0 +1,32 @@
<page xmlns="http://projectmallard.org/1.0/"
xmlns:e="http://projectmallard.org/experimental/"
type="topic" style="task"
id="accounts">
<info>
<link type="guide" xref="index#account"/>
<link type="seealso" xref=""/>
<desc>Add the location of your remote folders.</desc>
<revision pkgversion="0.1" version="0.1" date="2010-08-9" status="stub"/>
<credit type="author">
<name>Paul Cutler</name>
<email>pcutler@gnome.org</email>
</credit>
<!--
<copyright>
<year>2010</year>
<name>GNOME Documentation Project</name>
</copyright>
-->
<include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
</info>
<title>Account Setup</title>
<p>Insert how to setup your accounts here)
</p>
<p>Insert more help here, if needed.
</p>
</page>

32
help/C/advanced.page Normal file
View file

@ -0,0 +1,32 @@
<page xmlns="http://projectmallard.org/1.0/"
xmlns:e="http://projectmallard.org/experimental/"
type="guide" style="2column"
id="advanced">
<info>
<link type="guide" xref="index#advanced"/>
<desc>Get help for advanced actions.</desc>
<revision pkgversion="0.1" version="0.1" date="2010-08-29" status="draft"/>
<credit type="author">
<name>Paul Cutler</name>
<email>pcutler@gnome.org</email>
</credit>
<!--
<copyright>
<year>2010</year>
<name>GNOME Documentation Project</name>
</copyright>
-->
<include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
</info>
<title>Advanced Options and Help</title>
<section id="tbd" style="2column">
<info>
<title type="link">TBD</title>
</info>
<title>TBD</title>
</section>
</page>

40
help/C/index.page Normal file
View file

@ -0,0 +1,40 @@
<page xmlns="http://projectmallard.org/1.0/"
xmlns:e="http://projectmallard.org/experimental/"
type="guide"
id="index">
<info>
<revision pkgversion="0.1" version="0.1" date="2010-08-29"
status="incomplete"/>
<credit type="author">
<name>Paul Cutler</name>
<email>pcutler@gnome.org</email>
</credit>
<!--
<copyright>
<year>2010</year>
<name>GNOME Documentation Project</name>
</copyright>
-->
<include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude" />
</info>
<title>SparkleShare</title>
<section id="account" style="2column">
<title>Account Setup</title>
</section>
<section id="share" style="2column">
<title>Sync and Share Files</title>
</section>
<section id="advanced" style="2column">
<title>Advanced options and help</title>
</section>
<section id="problems">
<title>Common Problems</title>
</section>
</page>

42
help/C/introduction.page Normal file
View file

@ -0,0 +1,42 @@
<page xmlns="http://projectmallard.org/1.0/"
type="topic"
id="introduction">
<info>
<link type="guide" xref="index"/>
<revision pkgversion="0.1" version="0.1" date="2010-08-29" status="draft"/>
<desc>
Introduction to <app>SparkleShare</app>.
</desc>
<credit type="author">
<name>Paul Cutler</name>
<email>pcutler@gnome.org</email>
</credit>
<!--
<copyright>
<year>2010</year>
<name>GNOME Documentation Project</name>
</copyright>
-->
<include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude" />
</info>
<title>Introduction</title>
<p>
<app>SparkleShare</app> is an application that allows you to easily
sync and share your files and folders. SparkeShare uses the
distributed version control system <app>Git</app> to keep a record
of all the changes in your files, making it easy to easily go back
to an earlier version of the file if you make a mistake.
</p>
<figure>
<title><gui>SparkleShare</gui> screenshot</title>
<desc><app>SparkleShare</app></desc>
<media type="image" src="figures/sparkleshare.png" mime="image/png" style="right">
<p><app>Sparkleshare</app></p>
</media>
</figure>
</page>

9
help/C/legal.xml Normal file
View file

@ -0,0 +1,9 @@
<license xmlns="http://projectmallard.org/1.0/"
href="http://creativecommons.org/licenses/by-sa/3.0/">
<p>This work is licensed under a
<link href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
Attribution-Share Alike 3.0 Unported License</link>.</p>
<p>As a special exception, the copyright holders give you permission to copy,
modify, and distribute the example code contained in this document under the
terms of your choosing, without restriction.</p>
</license>

32
help/C/share.page Normal file
View file

@ -0,0 +1,32 @@
<page xmlns="http://projectmallard.org/1.0/"
xmlns:e="http://projectmallard.org/experimental/"
type="topic" style="task"
id="share">
<info>
<link type="guide" xref="index#share"/>
<link type="seealso" xref=""/>
<desc>Sync and share your folders and files.</desc>
<revision pkgversion="1.6" version="0.1" date="2010-07-11" status="draft"/>
<credit type="author">
<name>Paul Cutler</name>
<email>pcutler@gnome.org</email>
</credit>
<!--
<copyright>
<year>2010</year>
<name>GNOME Documentation Project</name>
</copyright>
-->
<include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
</info>
<title>Sync and share your files and folders</title>
<p>Insert help here.
</p>
<p>
</p>
</page>

17
help/Makefile.am Normal file
View file

@ -0,0 +1,17 @@
if HAVE_GNOME_DOC_UTILS
include $(top_srcdir)/gnome-doc-utils.make
DOC_ID = sparkleshare
DOC_INCLUDES = legal.xml
DOC_PAGES = account-creation.page \
advanced.page \
index.page \
introduction.page \
share.page
DOC_LINGUAS =
dist-hook: doc-dist-hook
endif