Merge lp:~dobey/ubuntu/lucid/ubuntuone-client/trunk into lp:ubuntu/lucid/ubuntuone-client

Proposed by dobey
Status: Merged
Merged at revision: not available
Proposed branch: lp:~dobey/ubuntu/lucid/ubuntuone-client/trunk
Merge into: lp:ubuntu/lucid/ubuntuone-client
Diff against target: 28479 lines (+12474/-8183)
92 files modified
Makefile.am (+15/-6)
Makefile.in (+26/-14)
aclocal.m4 (+21/-5)
bin/u1sdtool (+133/-57)
bin/ubuntuone-client-applet (+0/-1063)
bin/ubuntuone-client-preferences (+0/-360)
bin/ubuntuone-login (+226/-0)
bin/ubuntuone-preferences (+549/-0)
bin/ubuntuone-syncdaemon (+6/-5)
config.guess (+21/-49)
config.sub (+11/-4)
configure (+198/-115)
configure.ac (+28/-2)
contrib/dbus-docs (+196/-0)
contrib/dbus_util.py (+72/-0)
contrib/test (+16/-36)
contrib/testing/testcase.py (+181/-48)
data/Makefile.am (+19/-4)
data/Makefile.in (+57/-20)
data/com.ubuntuone.Authentication.service.in (+1/-1)
data/logging.conf (+13/-0)
data/logging.conf.in (+13/-0)
data/syncdaemon.conf (+8/-8)
data/ubuntuone-client-applet.desktop.in (+0/-9)
data/ubuntuone-icons.rendercache (+1/-2)
data/ubuntuone-icons.svg (+1017/-5096)
data/ubuntuone-preferences.desktop.in (+14/-0)
data/ubuntuone.menu.in (+1/-0)
debian/changelog (+6/-0)
debian/control (+7/-4)
debian/python-ubuntuone-client.install (+1/-0)
debian/ubuntuone-client-gnome.install (+4/-5)
debian/ubuntuone-client.install (+1/-3)
docs/man/u1sdtool.1 (+109/-15)
docs/man/ubuntuone-client-applet.1 (+0/-16)
docs/man/ubuntuone-client-preferences.1 (+0/-16)
docs/man/ubuntuone-preferences.1 (+16/-0)
docs/syncdaemon_dbus_api.txt (+280/-0)
ltmain.sh (+4/-4)
m4/libtool.m4 (+7/-6)
m4/ltversion.m4 (+5/-5)
nautilus/Makefile.am (+28/-0)
nautilus/Makefile.in (+148/-19)
nautilus/contacts-view.c (+507/-0)
nautilus/contacts-view.h (+66/-0)
nautilus/test-contacts-picker.c (+98/-0)
nautilus/u1-contacts-picker.c (+170/-0)
nautilus/u1-contacts-picker.h (+58/-0)
nautilus/ubuntuone-marshallers.c (+123/-0)
nautilus/ubuntuone-marshallers.list (+4/-0)
nautilus/ubuntuone-nautilus.c (+147/-28)
po/POTFILES.in (+4/-3)
po/POTFILES.skip (+1/-0)
tests/oauthdesktop/test_auth.py (+7/-1)
tests/syncdaemon/test_action_predicates.py (+10/-5)
tests/syncdaemon/test_action_queue.py (+487/-7)
tests/syncdaemon/test_config.py (+154/-39)
tests/syncdaemon/test_dbus.py (+689/-60)
tests/syncdaemon/test_eq_inotify.py (+528/-19)
tests/syncdaemon/test_eventqueue.py (+13/-1)
tests/syncdaemon/test_fileshelf.py (+30/-1)
tests/syncdaemon/test_fsm.py (+86/-58)
tests/syncdaemon/test_hashqueue.py (+49/-9)
tests/syncdaemon/test_localrescan.py (+415/-79)
tests/syncdaemon/test_logger.py (+77/-0)
tests/syncdaemon/test_sync.py (+46/-4)
tests/syncdaemon/test_tools.py (+201/-8)
tests/syncdaemon/test_u1sdtool.py (+102/-3)
tests/syncdaemon/test_vm.py (+1763/-249)
tests/test_login.py (+187/-0)
tests/test_preferences.py (+247/-0)
ubuntuone/oauthdesktop/auth.py (+6/-4)
ubuntuone/oauthdesktop/main.py (+2/-2)
ubuntuone/syncdaemon/__init__.py (+1/-0)
ubuntuone/syncdaemon/action_queue.py (+298/-127)
ubuntuone/syncdaemon/config.py (+180/-24)
ubuntuone/syncdaemon/dbus_interface.py (+442/-31)
ubuntuone/syncdaemon/event_queue.py (+161/-25)
ubuntuone/syncdaemon/events_nanny.py (+7/-7)
ubuntuone/syncdaemon/file_shelf.py (+19/-3)
ubuntuone/syncdaemon/filesystem_manager.py (+51/-35)
ubuntuone/syncdaemon/fsm/fsm.py (+3/-3)
ubuntuone/syncdaemon/local_rescan.py (+88/-30)
ubuntuone/syncdaemon/logger.py (+70/-15)
ubuntuone/syncdaemon/main.py (+53/-58)
ubuntuone/syncdaemon/marker.py (+3/-0)
ubuntuone/syncdaemon/sync.py (+42/-16)
ubuntuone/syncdaemon/tools.py (+244/-8)
ubuntuone/syncdaemon/u1fsfsm.py (+77/-12)
ubuntuone/syncdaemon/volume_manager.py (+973/-191)
ubuntuone/u1sync/client.py (+23/-18)
ubuntuone/u1sync/main.py (+3/-3)
To merge this branch: bzr merge lp:~dobey/ubuntu/lucid/ubuntuone-client/trunk
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+19557@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.am'
--- Makefile.am 2009-09-28 18:15:00 +0000
+++ Makefile.am 2010-02-18 00:10:25 +0000
@@ -18,17 +18,17 @@
1818
19# Install our scripts and extra data here19# Install our scripts and extra data here
20bin_SCRIPTS = \20bin_SCRIPTS = \
21 bin/ubuntuone-client-applet \21 bin/ubuntuone-preferences \
22 bin/ubuntuone-client-preferences \
23 bin/u1sdtool \22 bin/u1sdtool \
24 bin/u1sync23 bin/u1sync
2524
26libexec_SCRIPTS = bin/ubuntuone-syncdaemon25libexec_SCRIPTS = \
26 bin/ubuntuone-login \
27 bin/ubuntuone-syncdaemon
2728
28manfilesdir = $(mandir)/man129manfilesdir = $(mandir)/man1
29manfiles_DATA = \30manfiles_DATA = \
30 docs/man/ubuntuone-client-preferences.1 \31 docs/man/ubuntuone-preferences.1 \
31 docs/man/ubuntuone-client-applet.1 \
32 docs/man/u1sdtool.1 \32 docs/man/u1sdtool.1 \
33 docs/man/u1sync.133 docs/man/u1sync.1
3434
@@ -52,16 +52,25 @@
52 fi; \52 fi; \
53 fi53 fi
5454
55logging.conf: data/logging.conf.in Makefile
56 $(MAKE) -C data logging.conf
57
55lint: protocol pylintrc Makefile58lint: protocol pylintrc Makefile
56 PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" \59 PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" \
57 $(PYTHON) $(srcdir)/contrib/pylint-wrapper60 $(PYTHON) $(srcdir)/contrib/pylint-wrapper
5861
59check: lint Makefile62test: protocol logging.conf $(clientdefs_DATA) Makefile
60 if test "x$(builddir)" == "x$(srcdir)"; then \63 if test "x$(builddir)" == "x$(srcdir)"; then \
61 PYTHONPATH="$(PYTHONPATH)" $(PYTHON) $(srcdir)/contrib/test; \64 PYTHONPATH="$(PYTHONPATH)" $(PYTHON) $(srcdir)/contrib/test; \
62 fi65 fi
63 rm -rf _trial_temp66 rm -rf _trial_temp
6467
68check: lint test Makefile
69
70docs: protocol Makefile
71 PYTHONPATH="$(PYTHONPATH)" $(PYTHON) $(srcdir)/contrib/dbus-docs
72
73
65protocol: ubuntuone Makefile74protocol: ubuntuone Makefile
66 PROTOCOL="ubuntuone/storageprotocol"; \75 PROTOCOL="ubuntuone/storageprotocol"; \
67 if [ ! -d $(USP_PATH) ]; then \76 if [ ! -d $(USP_PATH) ]; then \
6877
=== modified file 'Makefile.in'
--- Makefile.in 2009-09-28 18:15:00 +0000
+++ Makefile.in 2010-02-18 00:10:25 +0000
@@ -1,4 +1,4 @@
1# Makefile.in generated by automake 1.11 from Makefile.am.1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@2# @configure_input@
33
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -183,6 +183,8 @@
183LIPO = @LIPO@183LIPO = @LIPO@
184LNDIR = @LNDIR@184LNDIR = @LNDIR@
185LN_S = @LN_S@185LN_S = @LN_S@
186LOG_FILE_SIZE = @LOG_FILE_SIZE@
187LOG_LEVEL = @LOG_LEVEL@
186LTLIBOBJS = @LTLIBOBJS@188LTLIBOBJS = @LTLIBOBJS@
187MAKEINFO = @MAKEINFO@189MAKEINFO = @MAKEINFO@
188MKDIR_P = @MKDIR_P@190MKDIR_P = @MKDIR_P@
@@ -293,16 +295,17 @@
293295
294# Install our scripts and extra data here296# Install our scripts and extra data here
295bin_SCRIPTS = \297bin_SCRIPTS = \
296 bin/ubuntuone-client-applet \298 bin/ubuntuone-preferences \
297 bin/ubuntuone-client-preferences \
298 bin/u1sdtool \299 bin/u1sdtool \
299 bin/u1sync300 bin/u1sync
300301
301libexec_SCRIPTS = bin/ubuntuone-syncdaemon302libexec_SCRIPTS = \
303 bin/ubuntuone-login \
304 bin/ubuntuone-syncdaemon
305
302manfilesdir = $(mandir)/man1306manfilesdir = $(mandir)/man1
303manfiles_DATA = \307manfiles_DATA = \
304 docs/man/ubuntuone-client-preferences.1 \308 docs/man/ubuntuone-preferences.1 \
305 docs/man/ubuntuone-client-applet.1 \
306 docs/man/u1sdtool.1 \309 docs/man/u1sdtool.1 \
307 docs/man/u1sync.1310 docs/man/u1sync.1
308311
@@ -522,7 +525,7 @@
522# (which will cause the Makefiles to be regenerated when you run `make');525# (which will cause the Makefiles to be regenerated when you run `make');
523# (2) otherwise, pass the desired values on the `make' command line.526# (2) otherwise, pass the desired values on the `make' command line.
524$(RECURSIVE_TARGETS):527$(RECURSIVE_TARGETS):
525 @failcom='exit 1'; \528 @fail= failcom='exit 1'; \
526 for f in x $$MAKEFLAGS; do \529 for f in x $$MAKEFLAGS; do \
527 case $$f in \530 case $$f in \
528 *=* | --[!k]*);; \531 *=* | --[!k]*);; \
@@ -547,7 +550,7 @@
547 fi; test -z "$$fail"550 fi; test -z "$$fail"
548551
549$(RECURSIVE_CLEAN_TARGETS):552$(RECURSIVE_CLEAN_TARGETS):
550 @failcom='exit 1'; \553 @fail= failcom='exit 1'; \
551 for f in x $$MAKEFLAGS; do \554 for f in x $$MAKEFLAGS; do \
552 case $$f in \555 case $$f in \
553 *=* | --[!k]*);; \556 *=* | --[!k]*);; \
@@ -711,7 +714,8 @@
711 fi; \714 fi; \
712 done715 done
713 -test -n "$(am__skip_mode_fix)" \716 -test -n "$(am__skip_mode_fix)" \
714 || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \717 || find "$(distdir)" -type d ! -perm -755 \
718 -exec chmod u+rwx,go+rx {} \; -o \
715 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \719 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
716 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \720 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
717 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \721 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@@ -755,17 +759,17 @@
755distcheck: dist759distcheck: dist
756 case '$(DIST_ARCHIVES)' in \760 case '$(DIST_ARCHIVES)' in \
757 *.tar.gz*) \761 *.tar.gz*) \
758 GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\762 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
759 *.tar.bz2*) \763 *.tar.bz2*) \
760 bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\764 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
761 *.tar.lzma*) \765 *.tar.lzma*) \
762 unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\766 lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
763 *.tar.xz*) \767 *.tar.xz*) \
764 xz -dc $(distdir).tar.xz | $(am__untar) ;;\768 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
765 *.tar.Z*) \769 *.tar.Z*) \
766 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\770 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
767 *.shar.gz*) \771 *.shar.gz*) \
768 GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\772 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
769 *.zip*) \773 *.zip*) \
770 unzip $(distdir).zip ;;\774 unzip $(distdir).zip ;;\
771 esac775 esac
@@ -970,16 +974,24 @@
970 fi; \974 fi; \
971 fi975 fi
972976
977logging.conf: data/logging.conf.in Makefile
978 $(MAKE) -C data logging.conf
979
973lint: protocol pylintrc Makefile980lint: protocol pylintrc Makefile
974 PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" \981 PYTHONPATH="$(PYTHONPATH)" SRCDIR="$(srcdir)" USE_PYFLAKES="true" \
975 $(PYTHON) $(srcdir)/contrib/pylint-wrapper982 $(PYTHON) $(srcdir)/contrib/pylint-wrapper
976983
977check: lint Makefile984test: protocol logging.conf $(clientdefs_DATA) Makefile
978 if test "x$(builddir)" == "x$(srcdir)"; then \985 if test "x$(builddir)" == "x$(srcdir)"; then \
979 PYTHONPATH="$(PYTHONPATH)" $(PYTHON) $(srcdir)/contrib/test; \986 PYTHONPATH="$(PYTHONPATH)" $(PYTHON) $(srcdir)/contrib/test; \
980 fi987 fi
981 rm -rf _trial_temp988 rm -rf _trial_temp
982989
990check: lint test Makefile
991
992docs: protocol Makefile
993 PYTHONPATH="$(PYTHONPATH)" $(PYTHON) $(srcdir)/contrib/dbus-docs
994
983protocol: ubuntuone Makefile995protocol: ubuntuone Makefile
984 PROTOCOL="ubuntuone/storageprotocol"; \996 PROTOCOL="ubuntuone/storageprotocol"; \
985 if [ ! -d $(USP_PATH) ]; then \997 if [ ! -d $(USP_PATH) ]; then \
986998
=== modified file 'aclocal.m4'
--- aclocal.m4 2009-08-26 12:15:00 +0000
+++ aclocal.m4 2010-02-18 00:10:25 +0000
@@ -1,4 +1,4 @@
1# generated automatically by aclocal 1.11 -*- Autoconf -*-1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
22
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
@@ -13,8 +13,8 @@
1313
14m4_ifndef([AC_AUTOCONF_VERSION],14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17[m4_warning([this file was generated for autoconf 2.64.17[m4_warning([this file was generated for autoconf 2.65.
18You have another version of autoconf. It may work, but is not guaranteed to.18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])20To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -224,7 +224,7 @@
224[am__api_version='1.11'224[am__api_version='1.11'
225dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to225dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
226dnl require some minimum version. Point them to the right macro.226dnl require some minimum version. Point them to the right macro.
227m4_if([$1], [1.11], [],227m4_if([$1], [1.11.1], [],
228 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl228 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
229])229])
230230
@@ -240,7 +240,7 @@
240# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.240# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
241# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.241# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
242AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],242AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
243[AM_AUTOMAKE_VERSION([1.11])dnl243[AM_AUTOMAKE_VERSION([1.11.1])dnl
244m4_ifndef([AC_AUTOCONF_VERSION],244m4_ifndef([AC_AUTOCONF_VERSION],
245 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl245 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
246_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])246_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -1068,6 +1068,14 @@
1068 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`1068 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
1069 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`1069 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
1070 ;;1070 ;;
1071 *)
1072 case $am_py_prefix in
1073 /usr|/System*) ;;
1074 *)
1075 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
1076 ;;
1077 esac
1078 ;;
1071 esac1079 esac
1072 ])1080 ])
1073 AC_SUBST([pythondir], [$am_cv_python_pythondir])1081 AC_SUBST([pythondir], [$am_cv_python_pythondir])
@@ -1098,6 +1106,14 @@
1098 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`1106 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
1099 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`1107 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
1100 ;;1108 ;;
1109 *)
1110 case $am_py_exec_prefix in
1111 /usr|/System*) ;;
1112 *)
1113 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
1114 ;;
1115 esac
1116 ;;
1101 esac1117 esac
1102 ])1118 ])
1103 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])1119 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
11041120
=== modified file 'bin/u1sdtool'
--- bin/u1sdtool 2009-12-07 17:35:00 +0000
+++ bin/u1sdtool 2010-02-18 00:10:25 +0000
@@ -28,7 +28,7 @@
2828
29from dbus.mainloop.glib import DBusGMainLoop29from dbus.mainloop.glib import DBusGMainLoop
30from optparse import OptionParser30from optparse import OptionParser
31from twisted.internet import reactor31from twisted.internet import reactor, defer
3232
33from ubuntuone.syncdaemon.tools import SyncDaemonTool33from ubuntuone.syncdaemon.tools import SyncDaemonTool
34from ubuntuone.syncdaemon.dbus_interface import DBUS_IFACE_NAME34from ubuntuone.syncdaemon.dbus_interface import DBUS_IFACE_NAME
@@ -38,45 +38,16 @@
38 show_downloads, 38 show_downloads,
39 show_shares,39 show_shares,
40 show_shared,40 show_shared,
41 show_folders,
42 show_error,
43 show_state,
44 show_waiting_content,
45 is_running,
41)46)
4247
4348
44def main(argv, stdout):49def main(options, args, stdout):
45 usage = "Usage: %prog [option]"50 """entry point"""
46 parser = OptionParser(usage=usage)
47 parser.add_option("-w", "--wait", dest="wait", action="store_true",
48 help="Wait until ubuntuone-syncdaemon reaches nirvana")
49 parser.add_option("", "--accept-share", dest="accept_share",
50 metavar="SHARE_ID",
51 help="accept the share with the specified id")
52 parser.add_option("", "--reject-share", dest="reject_share",
53 metavar="SHARE_ID",
54 help="reject the share with the specified id")
55 parser.add_option("", "--list-shares", dest="list_shares",
56 action="store_true",
57 help=" get the list of shares")
58 parser.add_option("", "--refresh-shares", dest="refresh_shares",
59 action="store_true",
60 help=" request a refresh of the list of shares to"
61 " the server")
62 parser.add_option("", "--offer-share", dest="offer_share",
63 metavar="PATH USER SHARE_NAME ACCESS_LEVEL",
64 help=" share PATH to USER. ")
65 parser.add_option("", "--list-shared", dest="list_shared",
66 action="store_true",
67 help=" list the shared path's/shares offered. ")
68 parser.add_option("", "--refresh", dest="refresh_path",
69 metavar="PATH", help=" request a refresh of PATH")
70 parser.add_option("", "--info", dest="path_info",
71 metavar="PATH", help=" request the metadata of PATH")
72 parser.add_option("", "--current-transfers", dest="current_transfers",
73 action="store_true",
74 help=" show the current uploads and downloads")
75 parser.add_option("-q", "--quit", dest="quit", action='store_true',
76 help="shutdown the syncdaemon")
77
78 (options, args) = parser.parse_args(argv)
79
80 loop = DBusGMainLoop(set_as_default=True)51 loop = DBusGMainLoop(set_as_default=True)
81 bus = dbus.SessionBus(mainloop=loop)52 bus = dbus.SessionBus(mainloop=loop)
82 sync_daemon_tool = SyncDaemonTool(bus)53 sync_daemon_tool = SyncDaemonTool(bus)
@@ -86,6 +57,28 @@
86 if out_encoding is None:57 if out_encoding is None:
87 out_encoding = 'utf-8'58 out_encoding = 'utf-8'
88 out = codecs.getwriter(out_encoding)(stdout, errors='replace')59 out = codecs.getwriter(out_encoding)(stdout, errors='replace')
60 # start syncdaemon if it's required
61 if not is_running() and not options.quit and not options.start:
62 d = sync_daemon_tool.start()
63 d.addBoth(lambda _: run(options, sync_daemon_tool, out))
64 else:
65 d = run(options, sync_daemon_tool, out)
66
67 def default_errback(error):
68 """ default error handler. """
69 out.write("\nOops, an error ocurred:\n")
70 error.printTraceback()
71
72 def stop_reactor(result):
73 """ stop the reactor. """
74 if reactor.running:
75 reactor.stop()
76 d.addErrback(default_errback)
77 d.addCallback(stop_reactor)
78 return d
79
80
81def run(options, sync_daemon_tool, out):
89 if options.wait:82 if options.wait:
90 def callback(result):83 def callback(result):
91 """ wait_for_nirvana callback (stop the reactor and exit)"""84 """ wait_for_nirvana callback (stop the reactor and exit)"""
@@ -104,12 +97,29 @@
104 elif options.refresh_shares:97 elif options.refresh_shares:
105 d = sync_daemon_tool.refresh_shares()98 d = sync_daemon_tool.refresh_shares()
106 elif options.offer_share:99 elif options.offer_share:
107 if len(args) != 4:100 path, username, name, access_level = options.offer_share
108 parser.error('--offer-share requires 4 arguments')101 d = sync_daemon_tool.offer_share(path, username, name, access_level)
109 d = sync_daemon_tool.offer_share(options.offer_share, *args[1:])
110 elif options.list_shared:102 elif options.list_shared:
111 d = sync_daemon_tool.list_shared()103 d = sync_daemon_tool.list_shared()
112 d.addCallback(lambda r: show_shared(r, out))104 d.addCallback(lambda r: show_shared(r, out))
105 elif options.create_folder:
106 if not os.path.exists(options.create_folder):
107 parser.error("PATH: '%s' don't exists" % \
108 options.create_folder)
109 d = sync_daemon_tool.create_folder(options.create_folder)
110 d.addErrback(lambda r: show_error(r, out))
111 elif options.delete_folder:
112 d = sync_daemon_tool.delete_folder(options.delete_folder)
113 d.addErrback(lambda r: show_error(r, out))
114 elif options.list_folders:
115 d = sync_daemon_tool.get_folders()
116 d.addCallback(lambda r: show_folders(r, out))
117 elif options.subscribe_folder:
118 d = sync_daemon_tool.subscribe_folder(options.subscribe_folder)
119 d.addErrback(lambda r: show_error(r, out))
120 elif options.unsubscribe_folder:
121 d = sync_daemon_tool.unsubscribe_folder(options.unsubscribe_folder)
122 d.addErrback(lambda r: show_error(r, out))
113 elif options.refresh_path:123 elif options.refresh_path:
114 if not os.path.exists(options.refresh_path):124 if not os.path.exists(options.refresh_path):
115 parser.error("PATH: '%s' don't exists" % \125 parser.error("PATH: '%s' don't exists" % \
@@ -129,32 +139,98 @@
129 elif options.quit:139 elif options.quit:
130 d = sync_daemon_tool.quit()140 d = sync_daemon_tool.quit()
131 def shutdown_check(result):141 def shutdown_check(result):
132 if result is None and \142 if result is None and not is_running():
133 DBUS_IFACE_NAME in bus.list_names():
134 out.write("ubuntuone-syncdaemon stopped.\n")143 out.write("ubuntuone-syncdaemon stopped.\n")
135 else:144 else:
136 out.write("ubuntuone-syncdaemon still running.\n")145 out.write("ubuntuone-syncdaemon still running.\n")
137 d.addBoth(shutdown_check)146 d.addBoth(shutdown_check)
147 elif options.connect:
148 d = sync_daemon_tool.connect()
149 elif options.disconnect:
150 d = sync_daemon_tool.disconnect()
151 elif options.status:
152 d = sync_daemon_tool.get_status()
153 d.addCallback(lambda r: show_state(r, out))
154 elif options.waiting_content:
155 d = sync_daemon_tool.waiting_content()
156 d.addCallback(lambda r: show_waiting_content(r, out))
157 elif options.schedule_next:
158 share_id, node_id = options.schedule_next
159 d = sync_daemon_tool.schedule_next(share_id, node_id)
160 elif options.start:
161 d = sync_daemon_tool.start()
138 else:162 else:
139 parser.print_help()163 parser.print_help()
140 sys.exit(1)164 d = defer.succeed(None)
141165 return d
142 def default_errback(error):
143 """ default error handler. """
144 out.write("\nOops, an error ocurred:\n")
145 error.printTraceback()
146
147 def stop_reactor(result):
148 """ stop the reactor. """
149 if reactor.running:
150 reactor.stop()
151 d.addErrback(default_errback)
152 d.addCallback(stop_reactor)
153 reactor.run()
154166
155167
156if __name__ == '__main__':168if __name__ == '__main__':
157 # disable the dbus warnings169 # disable the dbus warnings
158 warnings.filterwarnings('ignore', module='dbus')170 warnings.filterwarnings('ignore', module='dbus')
159 main(sys.argv, sys.stdout)171 usage = "Usage: %prog [option]"
172 parser = OptionParser(usage=usage)
173 parser.add_option("-w", "--wait", dest="wait", action="store_true",
174 help="Wait until ubuntuone-syncdaemon reaches nirvana")
175 parser.add_option("", "--accept-share", dest="accept_share",
176 metavar="SHARE_ID",
177 help="Accept the share with the specified id")
178 parser.add_option("", "--reject-share", dest="reject_share",
179 metavar="SHARE_ID",
180 help="Reject the share with the specified id")
181 parser.add_option("", "--list-shares", dest="list_shares",
182 action="store_true",
183 help="Get the list of shares")
184 parser.add_option("", "--refresh-shares", dest="refresh_shares",
185 action="store_true",
186 help="Request a refresh of the list of shares to"
187 " the server")
188 parser.add_option("", "--offer-share", dest="offer_share", type="string",
189 nargs=4, metavar="PATH USER SHARE_NAME ACCESS_LEVEL",
190 help="Share PATH to USER. ")
191 parser.add_option("", "--list-shared", dest="list_shared",
192 action="store_true",
193 help="List the shared path's/shares offered. ")
194 parser.add_option("", "--create-folder", dest="create_folder",
195 metavar="PATH",
196 help="Create user defined folder in the specified path")
197 parser.add_option("", "--delete-folder", dest="delete_folder",
198 metavar="FOLDER_ID",
199 help="Delete user defined folder in the specified path")
200 parser.add_option("", "--list-folders", dest="list_folders",
201 action="store_true",
202 help="List all the user defined folders")
203 parser.add_option("", "--subscribe-folder", dest="subscribe_folder",
204 metavar="FOLDER_ID",
205 help="Subscribe to the folder specified by id")
206 parser.add_option("", "--unsubscribe-folder", dest="unsubscribe_folder",
207 metavar="FOLDER_ID",
208 help="Unsubscribe from the folder specified by id")
209 parser.add_option("", "--refresh", dest="refresh_path",
210 metavar="PATH", help="Request a refresh of PATH")
211 parser.add_option("", "--info", dest="path_info",
212 metavar="PATH", help="Request the metadata of PATH")
213 parser.add_option("", "--current-transfers", dest="current_transfers",
214 action="store_true",
215 help=" show the current uploads and downloads")
216 parser.add_option("-q", "--quit", dest="quit", action='store_true',
217 help="Shutdown the syncdaemon")
218 parser.add_option("-c", "--connect", dest="connect", action='store_true',
219 help="Connect the syncdaemon")
220 parser.add_option("-d", "--disconnect", dest="disconnect",
221 action='store_true', help="Disconnect the syncdaemon")
222 parser.add_option("-s", "--status", dest="status", action='store_true',
223 help="Get the current status of syncdaemon")
224 parser.add_option("", "--waiting-content", dest="waiting_content",
225 action='store_true', help="Get the waiting content list")
226 parser.add_option("", "--schedule-next", dest="schedule_next",
227 metavar="SHARE_ID NODE_ID", nargs=2, type='string',
228 help="Move the node to be the next in the queue of "
229 "waiting commands")
230 parser.add_option("", "--start", dest="start", action='store_true',
231 help="Start syncdaemon if it's not running")
232
233 (options, args) = parser.parse_args(sys.argv)
234 reactor.callWhenRunning(main, options, args, sys.stdout)
235 reactor.run()
160236
161237
=== removed file 'bin/ubuntuone-client-applet'
--- bin/ubuntuone-client-applet 2009-12-07 17:35:00 +0000
+++ bin/ubuntuone-client-applet 1970-01-01 00:00:00 +0000
@@ -1,1063 +0,0 @@
1#!/usr/bin/python
2
3# ubuntuone-client-applet - Tray icon applet for managing Ubuntu One
4#
5# Author: Rodney Dawes <rodney.dawes@canonical.com>
6#
7# Copyright 2009 Canonical Ltd.
8#
9# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published
11# by the Free Software Foundation.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranties of
15# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16# PURPOSE. See the GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License along
19# with this program. If not, see <http://www.gnu.org/licenses/>.
20
21from __future__ import with_statement
22
23import pygtk
24pygtk.require('2.0')
25import gobject
26import gtk
27import pango
28import os
29import subprocess
30import sys
31import gettext
32from ubuntuone import clientdefs
33
34import dbus.service
35
36# pylint: disable-msg=F0401
37import pynotify
38
39from ConfigParser import ConfigParser
40from dbus.exceptions import DBusException
41from dbus.mainloop.glib import DBusGMainLoop
42from ubuntuone.oauthdesktop.main import Login
43from xdg.BaseDirectory import xdg_config_home
44from threading import Lock, Thread
45from urllib import quote
46
47from ubuntuone.oauthdesktop.logger import setupLogging
48logger = setupLogging("UbuntuOne.Client.Applet")
49
50DBusGMainLoop(set_as_default=True)
51
52_ = gettext.gettext
53ngettext = gettext.ngettext
54
55APPLET_BUS_NAME = "com.ubuntuone.ClientApplet"
56APPLET_CONFIG_NAME = APPLET_BUS_NAME + ".Config"
57
58DBUS_IFACE_NAME = "com.ubuntuone.SyncDaemon"
59DBUS_IFACE_SYNC_NAME = "com.ubuntuone.SyncDaemon.SyncDaemon"
60DBUS_IFACE_STATUS_NAME = "com.ubuntuone.SyncDaemon.Status"
61DBUS_IFACE_CONFIG_NAME = "com.ubuntuone.SyncDaemon.Config"
62
63DBUS_IFACE_AUTH_NAME = "com.ubuntuone.Authentication"
64
65OAUTH_REALM = "https://ubuntuone.com"
66OAUTH_CONSUMER = "ubuntuone"
67BOOKMARK_NAME = "Ubuntu One"
68
69NOTIFY_ICON_SIZE = 48
70
71# Why thank you GTK+ for enforcing style-set and breaking API
72RCSTYLE = """
73style 'dialogs' {
74 GtkDialog::action-area-border = 12
75 GtkDialog::button-spacing = 6
76 GtkDialog::content-area-border = 0
77}
78widget_class '*Dialog*' style 'dialogs'
79"""
80
81CONF_FILE = os.path.join(xdg_config_home, "ubuntuone", "ubuntuone-client.conf")
82
83
84def dbus_async(*args):
85 """Simple handler to make dbus do stuff async."""
86 pass
87
88class AppletMain(object):
89 """Main applet process class."""
90
91 def __init__(self, *args, **kw):
92 """Initializes the child threads and dbus monitor."""
93 from twisted.internet import gtk2reactor
94 gtk2reactor.install()
95 login = Login(dbus.service.BusName(DBUS_IFACE_AUTH_NAME,
96 bus=dbus.SessionBus()))
97
98 logger.info(_("Starting Ubuntu One client version %s") %
99 clientdefs.VERSION)
100
101 # Whether or not we are authorized
102 self.is_authorized = False
103
104 # Load the config, with some defaults if it doesn't exist yet
105 if not os.path.isdir(os.path.dirname(CONF_FILE)):
106 os.makedirs(os.path.dirname(CONF_FILE))
107
108 self.config = ConfigParser()
109 self.config.read(CONF_FILE)
110
111 if not self.config.has_section("ubuntuone"):
112 self.config.add_section("ubuntuone")
113
114 if not self.config.has_option("ubuntuone", "show_applet"):
115 self.config.set("ubuntuone", "show_applet", "1")
116
117 if not self.config.has_option("ubuntuone", "connect"):
118 self.config.set("ubuntuone", "connect", "0")
119
120 if not self.config.has_option("ubuntuone", "connected"):
121 self.config.set("ubuntuone", "connected", "False")
122
123 if not self.config.has_option("ubuntuone", "bookmarked"):
124 self.config.set("ubuntuone", "bookmarked", "False")
125
126 self.show_applet = self.config.getint("ubuntuone", "show_applet")
127 self.connect = self.config.getint("ubuntuone", "connect")
128 self.connected = self.config.getboolean("ubuntuone", "connected")
129
130 if not os.path.exists(CONF_FILE):
131 with open(CONF_FILE, "w+b") as f:
132 self.config.write(f)
133
134 # Handle some DBus signals
135 self.__bus = dbus.SessionBus()
136 self.__bus.add_signal_receiver(
137 handler_function=self.__new_credentials,
138 signal_name="NewCredentials",
139 dbus_interface=DBUS_IFACE_AUTH_NAME)
140 self.__bus.add_signal_receiver(
141 handler_function=self.__auth_denied,
142 signal_name="AuthorizationDenied",
143 dbus_interface=DBUS_IFACE_AUTH_NAME)
144 self.__bus.add_signal_receiver(
145 handler_function=self.__no_credentials,
146 signal_name="NoCredentials",
147 dbus_interface=DBUS_IFACE_AUTH_NAME)
148 self.__bus.add_signal_receiver(
149 handler_function=self.__got_oauth_error,
150 signal_name="OAuthError",
151 dbus_interface=DBUS_IFACE_AUTH_NAME)
152
153 self.__icon = AppletIcon(main=self, config=self.config)
154
155 def __new_credentials(self, realm=None, consumer_key=None, sender=None):
156 """Signal callback for when we get new credentials."""
157 self.is_authorized = True
158
159 self.__start_storage_daemon()
160 self.add_to_autostart()
161
162 self.set_up_desktopcouch_pairing(consumer_key)
163
164 if self.connect == 2:
165 return
166
167 if self.connect == 1 and not self.connected:
168 return
169
170 try:
171 client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
172 follow_name_owner_changes=True)
173 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
174 iface.connect(reply_handler=dbus_async,
175 error_handler=self.sd_dbus_error)
176 except DBusException, e:
177 self.sd_dbus_error(e)
178
179 def __auth_denied(self):
180 """Signal callback for when auth was denied by user."""
181 self.is_authorized = False
182 self.remove_from_autostart()
183
184 def quit_error(e):
185 """Only log when quit fails."""
186 logger.error(_("Quit Error: %s") % e.get_dbus_message())
187
188 try:
189 client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
190 follow_name_owner_changes=True)
191 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
192 iface.quit(reply_handler=dbus_async,
193 error_handler=quit_error)
194 except DBusException, e:
195 quit_error(e)
196
197 from twisted.internet import reactor
198 reactor.stop()
199
200 def __no_credentials(self):
201 """Signal callback for when no credentials exist in the keyring."""
202 self.is_authorized = False
203
204 def __got_oauth_error(self, message=None):
205 """Signal callback for when an OAuth error occured."""
206 def dialog_response(dialog, response):
207 """Handle the dialog closing."""
208 dialog.destroy()
209
210 if message:
211 logger.error(message)
212 dialog = gtk.Dialog(title=_("Ubuntu One: Error"),
213 flags=gtk.DIALOG_NO_SEPARATOR,
214 buttons=(gtk.STOCK_CLOSE,
215 gtk.RESPONSE_CLOSE))
216 dialog.set_default_response(gtk.RESPONSE_CLOSE)
217 dialog.set_icon_name("ubuntuone-client")
218
219 area = dialog.get_content_area()
220
221 hbox = gtk.HBox(spacing=12)
222 hbox.set_border_width(12)
223 area.pack_start(hbox)
224 hbox.show()
225
226 image = gtk.Image()
227 image.set_from_icon_name("dialog-error", gtk.ICON_SIZE_DIALOG)
228 image.set_alignment(0.5, 0.0)
229 image.show()
230 hbox.pack_start(image, False, False)
231
232 vbox = gtk.VBox(spacing=12)
233 vbox.show()
234 hbox.pack_start(vbox)
235
236 label = gtk.Label("<b>%s</b>" % _("Authorization Error"))
237 label.set_use_markup(True)
238 label.set_alignment(0.0, 0.5)
239 label.show()
240 vbox.pack_start(label, False, False)
241
242 label = gtk.Label(message)
243 label.set_line_wrap(True)
244 label.set_max_width_chars(64)
245 label.set_ellipsize(pango.ELLIPSIZE_MIDDLE)
246 label.set_alignment(0.0, 0.0)
247 label.show()
248 vbox.pack_start(label, True, True)
249
250 dialog.connect('close', dialog_response, gtk.RESPONSE_CLOSE)
251 dialog.connect('response', dialog_response)
252
253 dialog.show()
254 else:
255 logger.error(_("Got an OAuth error with no message."))
256
257 def check_for_token(self, do_login=False):
258 """Method to check for an existing token."""
259 def local_dbus_error(e):
260 """Can't talk to ourself?"""
261 logger.error(_("Internal Error: %s") % e.get_dbus_message())
262
263 try:
264 client = self.__bus.get_object(DBUS_IFACE_AUTH_NAME, "/",
265 follow_name_owner_changes=True)
266 iface = dbus.Interface(client, DBUS_IFACE_AUTH_NAME)
267 iface.maybe_login(OAUTH_REALM, OAUTH_CONSUMER,
268 do_login,
269 reply_handler=dbus_async,
270 error_handler=local_dbus_error)
271 except DBusException, e:
272 local_dbus_error(e)
273 return False
274
275 return False
276
277 def __start_storage_daemon_maybe(self):
278 """Start the storage daemon."""
279 try:
280 client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
281 follow_name_owner_changes=True)
282 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
283 iface.get_rootdir(reply_handler=dbus_async,
284 error_handler=self.sd_dbus_error)
285 except DBusException, e:
286 self.sd_dbus_error(e)
287 return False
288
289 return False
290
291 def __start_storage_daemon(self):
292 """Need to call dbus from a idle callback"""
293 gobject.idle_add(self.__start_storage_daemon_maybe)
294
295 def add_to_autostart(self):
296 """Add ourself to the autostart config."""
297 autostart_entry = """[Desktop Entry]
298Name=Ubuntu One
299Exec=ubuntuone-client-applet
300Icon=ubuntuone-client
301Terminal=false
302Type=Application
303X-Ubuntu-Gettext-Domain=ubuntuone-client
304X-KDE-autostart-after=panel
305X-GNOME-Autostart-enabled=true
306"""
307 if not os.path.exists(os.path.join(xdg_config_home, "autostart")):
308 os.makedirs(os.path.join(xdg_config_home, "autostart"))
309
310 file_path = os.path.join(xdg_config_home, "autostart",
311 "ubuntuone-client-applet.desktop")
312 if not os.path.exists(file_path):
313 with open(file_path, "w+") as f:
314 f.write(autostart_entry)
315
316 def remove_from_autostart(self):
317 """Remove ourself from the autostart config."""
318 path = os.path.join(xdg_config_home, "autostart",
319 "ubuntuone-client-applet.desktop")
320 try:
321 os.unlink(path)
322 except OSError:
323 pass
324
325 def set_up_desktopcouch_pairing(self, consumer_key):
326 """Add a pairing record between desktopcouch and Ubuntu One"""
327 try:
328 from desktopcouch.pair.couchdb_pairing.couchdb_io import \
329 put_static_paired_service, PAIRED_SERVER_RECORD_TYPE
330 from desktopcouch.records.server import CouchDatabase
331 except ImportError:
332 # desktopcouch is not installed
333 logger.debug(_("Not adding desktopcouch pairing since"
334 " desktopcouch is not installed"))
335 return
336 # Check whether there is already a record of the Ubuntu One service
337 db = CouchDatabase("management", create=True)
338 if not db.view_exists("ubuntu_one_pair_record","ubuntu_one_pair_record"):
339 map_js = """function(doc) {
340 if (doc.service_name == "ubuntuone") {
341 if (doc.application_annotations &&
342 doc.application_annotations["Ubuntu One"] &&
343 doc.application_annotations["Ubuntu One"]["private_application_annotations"] &&
344 doc.application_annotations["Ubuntu One"]["private_application_annotations"]["deleted"]) {
345 emit(doc._id, 1);
346 } else {
347 emit(doc._id, 0)
348 }
349 }
350 }"""
351 db.add_view("ubuntu_one_pair_record", map_js, None,
352 "ubuntu_one_pair_record")
353 results = db.execute_view("ubuntu_one_pair_record",
354 "ubuntu_one_pair_record")
355 found = False
356 deleted = False
357 # Results should contain either one row or no rows
358 # If there is one row, its value will be 0, meaning that there is
359 # already an Ubuntu One pairing record, or 1, meaning that there
360 # was an Ubuntu One pairing record but it has since been unpaired
361 # Only create a new record if there is not one already. Specifically,
362 # do not add the record if there is a deleted one, as this means
363 # that the user explicitly unpaired it!
364 for row in results:
365 found = True
366 if row.value == 1:
367 deleted = True
368 logger.debug(_("Not adding desktopcouch pairing since"
369 " the user has explicitly unpaired with Ubuntu One"))
370 else:
371 logger.debug(_("Not adding desktopcouch pairing since"
372 " we are already paired"))
373 if not found:
374 put_static_paired_service(None, "ubuntuone")
375 logger.debug(_("Pairing desktopcouch with Ubuntu One"))
376
377 def main(self):
378 """Starts the gtk main loop."""
379 from twisted.internet import reactor
380 if self.connect != 2 or (self.connect == 1 and self.connected):
381 gobject.idle_add(self.check_for_token, True)
382
383 reactor.run()
384
385 @property
386 def authorized(self):
387 """Are we authorized?"""
388 return self.is_authorized
389
390 def sd_dbus_error(self, error):
391 """Got an error from DBus."""
392 self.__icon.sd_dbus_error(error)
393
394
395
396def do_config_open_real():
397 """Opens the preferences dialog."""
398 paths = os.environ["PATH"].split(":")
399 dirpath = os.path.join(os.getcwd(), "bin")
400 if os.path.isdir(dirpath):
401 paths.insert(0, dirpath)
402 os.environ["PATH"] = ":".join(paths)
403 try:
404 ret = subprocess.call(["ubuntuone-client-preferences"],
405 env=os.environ)
406 except OSError:
407 ret = -1
408 if ret != 0:
409 logger.error(_("Failed to open Ubuntu One preferences"))
410
411def do_config_open():
412 """Do the preferences opening in a thread."""
413 Thread(target=do_config_open_real, name="preferences").start()
414
415def do_xdg_open_real(path_or_url):
416 """Utility method to run xdg-open with path_or_url."""
417 ret = subprocess.call(["xdg-open", path_or_url], env=os.environ)
418 if ret != 0:
419 logger.error(_("Failed to run 'xdg-open %s'") % path_or_url)
420
421def do_xdg_open(path_or_url):
422 """Do the xdg-open in a thread."""
423 Thread(target=do_xdg_open_real, name="xdg", args=(path_or_url,)).start()
424
425
426class AppletIcon(gtk.StatusIcon):
427 """
428 Custom StatusIcon derived from gtk.StatusIcon which supports
429 animated icons and a few other nice things.
430 """
431
432 def __init__(self, main=None, config=None, *args, **kw):
433 """Initializes our custom StatusIcon based widget."""
434 super(AppletIcon, self).__init__(*args, **kw)
435 # Hide until we get status, to avoid flickering
436 self.set_visible(False)
437
438 # The AppletMain object
439 self.__main = main
440
441 # A ConfigParser object that we can poke at
442 self.__config = config
443 self.__show_when = self.__config.getint("ubuntuone", "show_applet")
444
445 self.__managed_dir = None
446
447 self.__size = 24
448 self.__theme = gtk.icon_theme_get_default()
449 iconpath = os.path.abspath(os.path.join(
450 os.path.split(os.path.dirname(__file__))[0],
451 "data"))
452 self.__theme.append_search_path(iconpath)
453
454 self.__theme.append_search_path(os.path.sep + os.path.join(
455 "usr", "share", "ubuntuone-client", "icons"))
456 self.__theme.append_search_path(os.path.sep + os.path.join(
457 "usr", "local", "share", "ubuntuone-client", "icons"))
458
459 self.set_from_icon_name('ubuntuone-client-offline')
460 self.set_tooltip(_("Disconnected"))
461 self.connect("popup-menu", self.__popup_menu)
462 self.connect("activate", self.__do_action)
463
464 self.__size_changed(self, self.__size)
465
466 self.__litems = {}
467 self.__ritems = {}
468 self.__status_menu, self.__config_menu = self.__build_menus()
469
470 self.__connected = False
471 self.__need_update = False
472 self.__fatal_error = False
473
474 pynotify.init("Ubuntu One")
475
476 # Managing applet visibility
477 self.__visible = True
478 self.__visible_id = 0
479
480 # Up/Dn status
481 self.__lock = Lock()
482 self.__updating = 0
483 self.__total = 0
484 self.__last_id = 0
485
486 self.__bus = dbus.SessionBus()
487
488 # Our own DBus service, for the config to deal with
489 self.__service = AppletConfig(icon=self)
490
491 # DBus signal handling
492 self.__bus.add_signal_receiver(
493 handler_function=self.__status_changed,
494 signal_name="StatusChanged",
495 dbus_interface=DBUS_IFACE_STATUS_NAME)
496
497 self.__bus.add_signal_receiver(
498 handler_function=self.__queue_changed,
499 signal_name="ContentQueueChanged",
500 dbus_interface=DBUS_IFACE_STATUS_NAME)
501 self.__bus.add_signal_receiver(
502 handler_function=self.__transfer_started,
503 signal_name="UploadStarted",
504 dbus_interface=DBUS_IFACE_STATUS_NAME)
505 self.__bus.add_signal_receiver(
506 handler_function=self.__transfer_started,
507 signal_name="DownloadStarted",
508 dbus_interface=DBUS_IFACE_STATUS_NAME)
509
510 gobject.idle_add(self.__get_root)
511
512 def set_from_icon_name(self, icon):
513 """Handle fallbacks for setting our icon."""
514 pixbuf = self.__theme.load_icon(icon, self.__size,
515 gtk.ICON_LOOKUP_GENERIC_FALLBACK)
516 self.set_from_pixbuf(pixbuf)
517
518 def set_visibility_config(self, visibility):
519 """Update the visibility configuration."""
520 self.__show_when = int(visibility)
521 self.__config.set("ubuntuone", "show_applet", str(self.__show_when))
522 self.update_visibility()
523
524 def set_connection_config(self, connect):
525 """Update the connection config."""
526 self.__config.set("ubuntuone", "connect", str(connect))
527
528 def __update_transfer_status(self, done=False):
529 """Update the status display."""
530 with self.__lock:
531 text = _("Updating file %(transfers)d of %(total)d...") % \
532 dict(transfers=self.__updating, total=self.__total)
533 label = self.__litems["status"].get_child()
534 if done:
535 self.set_tooltip(_("Files updated."))
536 self.set_from_icon_name("ubuntuone-client-idle")
537 label.set_text(_("Your files are up to date."))
538 else:
539 label.set_markup("<i>%s</i>" % text)
540
541 def __queue_changed(self, queue):
542 """Handle ContentQueueChanged."""
543 total = 0
544 d = queue.get('Download', None)
545 if d is not None:
546 total += int(d.get('count', 0))
547 d = queue.get('Upload', None)
548 if d is not None:
549 total += int(d.get('count', 0))
550 first = False
551 last = False
552 self.__visible = True
553 self.set_tooltip(_("Updating files..."))
554 self.update_visibility()
555 with self.__lock:
556 if self.__total == 0:
557 first = True
558 last = False
559 if self.__total != 0 and total == 0:
560 first = False
561 last = True
562 self.__total = total + self.__updating
563 if first:
564 self.set_from_icon_name("ubuntuone-client-updating")
565 n = pynotify.Notification(
566 _("Updating files..."),
567 _("Ubuntu One is now updating your files."))
568 pixbuf = self.__theme.load_icon(
569 "ubuntuone-client-updating", NOTIFY_ICON_SIZE,
570 gtk.ICON_LOOKUP_GENERIC_FALLBACK)
571 n.set_icon_from_pixbuf(pixbuf)
572 n.show()
573 if last:
574 if self.__last_id != 0:
575 gobject.source_remove(self.__last_id)
576 self.__last_id = 0
577 self.__last_id = gobject.timeout_add_seconds(
578 15, self.__updating_completed)
579
580 def __updating_completed(self):
581 """Timeout to avoid multiple started/finished notifications."""
582 really_last = False
583 n = None
584 with self.__lock:
585 done = self.__total - self.__updating
586 if done == 0:
587 really_last = True
588 if not really_last:
589 return False
590
591 with self.__lock:
592 n = pynotify.Notification(
593 _("Updating Finished"),
594 ngettext("Ubuntu One finished updating %(total)d file.",
595 "Ubuntu One finished updating %(total)d files.",
596 self.__total) % { 'total' : self.__total })
597 self.__total = 0
598 self.__updating = 0
599 pixbuf = self.__theme.load_icon(
600 "ubuntuone-client-updating", NOTIFY_ICON_SIZE,
601 gtk.ICON_LOOKUP_GENERIC_FALLBACK)
602 n.set_icon_from_pixbuf(pixbuf)
603 n.show()
604 self.__update_transfer_status(True)
605 return False
606
607 def __transfer_started(self, path):
608 """Handle the started signals."""
609 with self.__lock:
610 self.__updating += 1
611 self.__update_transfer_status()
612
613 def update_visibility(self):
614 """Update the icon's visibility."""
615 if self.__visible_id != 0:
616 gobject.source_remove(self.__visible_id)
617 self.__visible_id = 0
618
619 if (self.__visible and self.__show_when != 2) or self.__fatal_error:
620 self.set_visible(True)
621 return
622
623 if self.__show_when == 2 and not self.__fatal_error:
624 self.set_visible(False)
625 return
626
627 # If the icon is shown, set up a timeout to hide it
628 if self.get_visible():
629 self.__visible_id = gobject.timeout_add_seconds(
630 30, self.__hide_icon)
631
632 def __status_changed(self, status):
633 """The sync daemon status changed."""
634 if self.__managed_dir is None:
635 gobject.idle_add(self.__get_root)
636
637 if self.__show_when != 0:
638 self.__visible = False
639
640 state = status['name']
641
642 self.set_tooltip("Ubuntu One")
643
644 if self.__fatal_error and state != "UNKNOWN_ERROR":
645 # Just blow your nose, and it's fixed, isn't it.
646 self.__fatal_error = False
647 self.__litems["connect"].set_sensitive(True)
648 self.__litems["disconnect"].set_sensitive(True)
649
650 if state == "OFFLINE" or state.startswith("INIT") or \
651 state.startswith("READY"):
652 self.set_from_icon_name("ubuntuone-client-offline")
653 self.set_tooltip(_("Disconnected"))
654 self.__connected = False
655 self.__visible = True
656
657 elif state == "CAPABILITIES_MISMATCH":
658 self.__connected = False
659 self.__visible = True
660 # Pop up a notification
661 n = pynotify.Notification(
662 _("Capabilities Mismatch"),
663 _("There was a capabilities mismatch while attempting "
664 "to connect to the Ubuntu One server. You may "
665 "have installed a newer version of the client, for "
666 "which the server does not yet provide support. "
667 "A new version of the server should be accessible "
668 "soon. Please be patient while we update."))
669 pixbuf = self.__theme.load_icon(
670 "ubuntuone-client-error", NOTIFY_ICON_SIZE,
671 gtk.ICON_LOOKUP_GENERIC_FALLBACK)
672 n.set_icon_from_pixbuf(pixbuf)
673 n.set_urgency(pynotify.URGENCY_CRITICAL)
674 n.show()
675 # Set the tooltip and icon on the applet
676 self.set_tooltip(_("Capabilities mismatch with server."))
677 self.set_from_icon_name("ubuntuone-client-error")
678
679 elif state == "IDLE" or state.startswith("READING") or \
680 state.startswith("SCANNING"):
681 self.__connected = True
682 if self.__show_when != 0:
683 self.__visible = False
684
685 elif state == "AUTH_FAILED":
686 self.__stop_syncdaemon()
687 self.set_from_icon_name("ubuntuone-client-error")
688 self.set_tooltip(_("Authentication failed"))
689 self.__connected = False
690 self.__visible = True
691
692 def reauthorize_error(e):
693 """Simple dbus error handler."""
694 logger.error(_("Error clearing token: %s") % str(e))
695
696 try:
697 def token_cleared():
698 """Do the next step."""
699 if self.__main:
700 self.__main.check_for_token(True)
701
702 client = self.__bus.get_object(DBUS_IFACE_AUTH_NAME,
703 "/", follow_name_owner_changes=True)
704 iface = dbus.Interface(client, DBUS_IFACE_AUTH_NAME)
705 iface.clear_token(OAUTH_REALM, OAUTH_CONSUMER,
706 reply_handler=token_cleared,
707 error_handler=reauthorize_error)
708 except DBusException, e:
709 reauthorize_error(e)
710
711 elif state == "UNKNOWN_ERROR":
712 # Disable some menu items
713 self.__litems["connect"].set_sensitive(False)
714 self.__litems["disconnect"].set_sensitive(False)
715 # Change the behavior to file a bug
716 if self.__fatal_error:
717 return
718
719 self.__fatal_error = True
720 self.__visible = True
721
722 # Pop up a notification
723 n = pynotify.Notification(
724 "Ubuntu One",
725 _("There was a fatal error in Ubuntu One. " +
726 "This may be a bug in the software. "
727 "Please click on the Ubuntu One icon " +
728 "in your panel to report a bug."))
729 pixbuf = self.__theme.load_icon(
730 "ubuntuone-client-error", NOTIFY_ICON_SIZE,
731 gtk.ICON_LOOKUP_GENERIC_FALLBACK)
732 n.set_icon_from_pixbuf(pixbuf)
733 n.set_urgency(pynotify.URGENCY_CRITICAL)
734 n.show()
735 # Set the tooltip and icon on the applet
736 self.set_tooltip(_("Fatal Error"))
737 self.set_from_icon_name("ubuntuone-client-error")
738
739 else:
740 self.__connected = True
741 self.set_from_icon_name("ubuntuone-client-idle")
742 if state.startswith("CONNECTING") or \
743 state.startswith("START_CONNECTING") or \
744 state.startswith("AUTHENTICATING") or \
745 state.startswith("CONNECTED") or \
746 state.startswith("START_CONNECTED"):
747 self.set_from_icon_name("ubuntuone-client-idle")
748 self.set_tooltip(_("Connecting"))
749 self.__visible = True
750
751 self.update_visibility()
752
753 if self.__connected:
754 self.__litems["connect"].hide()
755 self.__litems["disconnect"].show()
756 else:
757 self.__litems["connect"].show()
758 self.__litems["disconnect"].hide()
759 self.__config.set("ubuntuone", "connected", self.__connected)
760
761 def __hide_icon(self):
762 """Timeout to hide tray icon after a period of inactivity."""
763 if self.__show_when == 0:
764 return False
765
766 self.__visible = False
767 self.__visible_id = 0
768 self.set_visible(False)
769 return False
770
771 def __get_root(self):
772 """Method to get the rootdir from the sync daemon."""
773 # Get the managed root directory
774 try:
775 client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
776 follow_name_owner_changes=True)
777 except DBusException:
778 return False
779
780 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
781 def got_root(root):
782 """We got the root dir."""
783 self.__managed_dir = root
784 if os.path.isdir(self.__managed_dir) and \
785 os.access(self.__managed_dir,
786 os.F_OK | os.R_OK):
787 self.__ritems["open"].set_sensitive(True)
788 self.__add_to_places()
789 else:
790 self.__ritems["open"].set_sensitive(False)
791
792 def got_err(error):
793 """Handle error from the dbus callback."""
794 self.sd_dbus_error(error)
795 self.__managed_dir = None
796 self.__ritems["open"].set_sensitive(False)
797
798 iface.get_rootdir(reply_handler=got_root, error_handler=got_err)
799
800 # Now get the current status
801 try:
802 client = self.__bus.get_object(DBUS_IFACE_NAME, "/status",
803 follow_name_owner_changes=True)
804 iface = dbus.Interface(client, DBUS_IFACE_STATUS_NAME)
805 iface.current_status(reply_handler=self.__status_changed,
806 error_handler=self.sd_dbus_error)
807 except DBusException, e:
808 self.sd_dbus_error(e)
809 return False
810
811 return False
812
813 def __build_menus(self):
814 """Create the pop-up menu items."""
815 # Create the left-click menu
816 lmenu = gtk.Menu()
817
818 self.__litems["status"] = gtk.MenuItem(
819 label=_("Your files are up to date."))
820 lmenu.append(self.__litems["status"])
821 self.__litems["status"].set_sensitive(False)
822 self.__litems["status"].show()
823
824 sep = gtk.SeparatorMenuItem()
825 lmenu.append(sep)
826 sep.show()
827
828 self.__litems["connect"] = gtk.ImageMenuItem(
829 stock_id=gtk.STOCK_CONNECT)
830 lmenu.append(self.__litems["connect"])
831 self.__litems["connect"].connect("activate", self.__toggle_state)
832 self.__litems["connect"].show()
833
834 self.__litems["disconnect"] = gtk.ImageMenuItem(
835 stock_id=gtk.STOCK_DISCONNECT)
836 lmenu.append(self.__litems["disconnect"])
837 self.__litems["disconnect"].connect("activate", self.__toggle_state)
838
839 lmenu.show()
840
841 # Create the right-click menu
842 rmenu = gtk.Menu()
843
844 self.__ritems["bug"] = gtk.MenuItem(label=_("_Report a Problem"))
845 rmenu.append(self.__ritems["bug"])
846 self.__ritems["bug"].connect("activate", self.__report_problem)
847 self.__ritems["bug"].show()
848
849 self.__ritems["open"] = gtk.MenuItem(label=_("_Open Folder"))
850 rmenu.append(self.__ritems["open"])
851 self.__ritems["open"].connect("activate", self.__open_folder)
852 self.__ritems["open"].set_sensitive(False)
853 self.__ritems["open"].show()
854
855 self.__ritems["web"] = gtk.MenuItem(label=_("_Go to Web"))
856 rmenu.append(self.__ritems["web"])
857 self.__ritems["web"].connect("activate", self.__open_website)
858 self.__ritems["web"].show()
859
860 self.__ritems["config"] = gtk.ImageMenuItem(
861 stock_id=gtk.STOCK_PREFERENCES)
862 rmenu.append(self.__ritems["config"])
863 self.__ritems["config"].connect("activate", self.__open_config)
864 self.__ritems["config"].show()
865
866 sep = gtk.SeparatorMenuItem()
867 rmenu.append(sep)
868 sep.show()
869
870 self.__ritems["quit"] = gtk.ImageMenuItem(stock_id=gtk.STOCK_QUIT)
871 rmenu.append(self.__ritems["quit"])
872 self.__ritems["quit"].connect("activate", self.__quit_applet)
873 self.__ritems["quit"].show()
874
875 rmenu.show()
876
877 return lmenu, rmenu
878
879 def __size_changed(self, icon, size, data=None):
880 """Callback for when the size changes."""
881 if size < 24:
882 self.__size = 16
883 elif size >= 24 and size < 32:
884 self.__size = 24
885 elif size >= 32 and size < 48:
886 self.__size = 32
887 elif size >= 48 and size < 64:
888 self.__size = 48
889 else:
890 self.__size = size
891
892 def __popup_menu(self, icon, button, timestamp, data=None):
893 """Pops up the context menu for the tray icon."""
894 if button == 0:
895 self.__status_menu.popup(None, None,
896 gtk.status_icon_position_menu,
897 button, timestamp, icon)
898 else:
899 self.__config_menu.popup(None, None,
900 gtk.status_icon_position_menu,
901 button, timestamp, icon)
902
903 def __stop_syncdaemon(self):
904 """Tell the syncdaemon to quit."""
905 def quit_error(e):
906 """Just log and ignore."""
907 logger.error(_("Quit Error: %s") % e.get_dbus_message())
908
909 try:
910 client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
911 follow_name_owner_changes=True)
912 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
913 iface.quit(reply_handler=dbus_async,
914 error_handler=quit_error)
915 except DBusException, e:
916 quit_error(e)
917
918 def __quit_applet(self, menuitem, data=None):
919 """Quit the daemon and closes the applet."""
920 self.__stop_syncdaemon()
921
922 from twisted.internet import reactor
923 reactor.stop()
924
925 def __toggle_state(self, menuitem, data=None):
926 """Connects or disconnects the storage sync process."""
927 try:
928 client = self.__bus.get_object(DBUS_IFACE_NAME, "/",
929 follow_name_owner_changes=True)
930 iface = dbus.Interface(client, DBUS_IFACE_SYNC_NAME)
931 if self.__connected:
932 iface.disconnect(reply_handler=dbus_async,
933 error_handler=self.sd_dbus_error)
934 else:
935 if self.__main and self.__main.authorized is False:
936 self.__main.check_for_token(do_login=True)
937 iface.connect(reply_handler=dbus_async,
938 error_handler=self.sd_dbus_error)
939 except DBusException, e:
940 self.sd_dbus_error(e)
941
942 self.__config.set("ubuntuone", "connected", not self.__connected)
943 with open(CONF_FILE, "w+b") as f:
944 self.__config.write(f)
945
946 def __open_folder(self, data=None):
947 """Opens the storage folder in the file manager."""
948 if not self.__managed_dir or not os.path.isdir(self.__managed_dir):
949 return
950
951 folder = "file://%s" % quote(self.__managed_dir)
952 do_xdg_open(folder)
953
954 def __do_action(self, data=None):
955 """Handles the most appropriate action when the icon is clicked."""
956 if self.__fatal_error:
957 self.__report_problem()
958 self.__quit_applet(None)
959 return
960
961 if self.__need_update:
962 do_xdg_open("apt:ubuntuone-storage-protocol?refresh=yes")
963 return
964
965 # Popup the status menu
966 self.emit("popup-menu", 0, gtk.get_current_event_time())
967
968 def __report_problem_real(self):
969 """Runs apport to report a problem against our code."""
970 args = ["ubuntu-bug", "ubuntuone-client"]
971 ret = subprocess.call(args, env=os.environ)
972 if ret != 0:
973 logger.error(_("Failed to run 'ubuntu-bug'"))
974
975 def __report_problem(self, data=None):
976 """Pops another thread to run apport in."""
977 Thread(target=self.__report_problem_real, name="apport").start()
978
979 def __open_website(self, data=None, url=None):
980 """Opens the one.ubuntu.com web site."""
981 if url:
982 do_xdg_open(url)
983 else:
984 do_xdg_open("https://one.ubuntu.com/")
985
986
987 def __open_config(self, data=None):
988 """Opens the preferences dialog."""
989 do_config_open()
990
991 def __add_to_places(self):
992 """Add the managed directory to the .gtk-bookmarks file."""
993 # Only add once
994 if self.__config.getboolean("ubuntuone", "bookmarked"):
995 return
996
997 path = os.path.join(os.path.expanduser("~"), ".gtk-bookmarks")
998 with open(path, "a+") as f:
999 bookmarks_entry = "file://%s %s\n" % (
1000 quote(self.__managed_dir), BOOKMARK_NAME)
1001 in_file = False
1002 for line in f:
1003 if line == bookmarks_entry:
1004 in_file = True
1005 if not in_file:
1006 f.write(bookmarks_entry)
1007
1008 self.__config.set("ubuntuone", "bookmarked", "True")
1009 with open(CONF_FILE, "w+b") as f:
1010 self.__config.write(f)
1011
1012 def sd_dbus_error(self, error):
1013 """
1014 Handle DBus errors for crucial syncdaemon calls,
1015 and change the applet behavior slightly.
1016 """
1017 logger.error(_("DBus Error: %s") % error.get_dbus_message())
1018 if self.__fatal_error:
1019 return
1020
1021 self.__fatal_error = True
1022 self.__status_changed({'name' : 'UNKNOWN_ERROR'})
1023
1024
1025class AppletConfig(dbus.service.Object):
1026 """DBus Service object"""
1027
1028 def __init__(self, icon, *args, **kwargs):
1029 """Initialize our magic."""
1030 self.icon = icon
1031 self.path = "/config"
1032 self.bus = dbus.SessionBus()
1033 bus_name = dbus.service.BusName(APPLET_BUS_NAME,
1034 bus=self.bus)
1035 dbus.service.Object.__init__(self, bus_name=bus_name,
1036 object_path=self.path)
1037
1038 @dbus.service.method(APPLET_CONFIG_NAME,
1039 in_signature='i', out_signature='')
1040 def set_visibility_config(self, visibility):
1041 self.icon.set_visibility_config(visibility)
1042
1043 @dbus.service.method(APPLET_CONFIG_NAME,
1044 in_signature='i', out_signature='')
1045 def set_connection_config(self, connect):
1046 self.icon.set_connection_config(connect)
1047
1048
1049if __name__ == "__main__":
1050 gettext.bindtextdomain(clientdefs.GETTEXT_PACKAGE, clientdefs.LOCALEDIR)
1051 gettext.textdomain(clientdefs.GETTEXT_PACKAGE)
1052
1053 # Register DBus service for making sure we run only one instance
1054 bus = dbus.SessionBus()
1055 if bus.request_name(APPLET_BUS_NAME, dbus.bus.NAME_FLAG_DO_NOT_QUEUE) == dbus.bus.REQUEST_NAME_REPLY_EXISTS:
1056 print _("Ubuntu One client applet already running, quitting")
1057 do_config_open()
1058 sys.exit(0)
1059
1060 gtk.rc_parse_string(RCSTYLE)
1061
1062 icon = AppletMain()
1063 icon.main()
10640
=== removed file 'bin/ubuntuone-client-preferences'
--- bin/ubuntuone-client-preferences 2009-12-07 17:35:00 +0000
+++ bin/ubuntuone-client-preferences 1970-01-01 00:00:00 +0000
@@ -1,360 +0,0 @@
1#!/usr/bin/python
2
3# ubuntuone-client-applet - Tray icon applet for managing Ubuntu One
4#
5# Author: Rodney Dawes <rodney.dawes@canonical.com>
6#
7# Copyright 2009 Canonical Ltd.
8#
9# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published
11# by the Free Software Foundation.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranties of
15# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16# PURPOSE. See the GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License along
19# with this program. If not, see <http://www.gnu.org/licenses/>.
20
21from __future__ import with_statement
22
23import pygtk
24pygtk.require('2.0')
25import gobject
26import gtk
27import os
28import gettext
29from ubuntuone import clientdefs
30
31import dbus.service
32from ConfigParser import ConfigParser
33from dbus.exceptions import DBusException
34from dbus.mainloop.glib import DBusGMainLoop
35from xdg.BaseDirectory import xdg_config_home
36
37DBusGMainLoop(set_as_default=True)
38
39_ = gettext.gettext
40
41APPLET_IFACE_NAME = "com.ubuntuone.ClientApplet"
42APPLET_IFACE_CONFIG_NAME = APPLET_IFACE_NAME + ".Config"
43
44DBUS_IFACE_NAME = "com.ubuntuone.SyncDaemon"
45DBUS_IFACE_CONFIG_NAME = DBUS_IFACE_NAME + ".Config"
46
47# Why thank you GTK+ for enforcing style-set and breaking API
48RCSTYLE = """
49style 'dialogs' {
50 GtkDialog::action-area-border = 12
51 GtkDialog::button-spacing = 6
52 GtkDialog::content-area-border = 0
53}
54widget_class '*Dialog*' style 'dialogs'
55"""
56
57CONF_FILE = os.path.join(xdg_config_home, "ubuntuone", "ubuntuone-client.conf")
58
59def dbus_async(*args):
60 """Simple handler to make dbus do stuff async."""
61 pass
62
63
64class AppletConfigDialog(gtk.Dialog):
65 """Preferences dialog."""
66
67 def __init__(self, config=None, *args, **kw):
68 """Initializes our config dialog."""
69 super(AppletConfigDialog, self).__init__(*args, **kw)
70 self.set_title(_("Ubuntu One Preferences"))
71 self.set_has_separator(False)
72 self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
73 self.set_default_response(gtk.RESPONSE_CLOSE)
74 self.set_icon_name("ubuntuone-client")
75
76 self.connect("close", self.__handle_response, gtk.RESPONSE_CLOSE)
77 self.connect("response", self.__handle_response)
78
79 self.config = config
80
81 self.bw_enabled = False
82 self.up_limit = 2097152
83 self.dn_limit = 2097152
84
85 self.__bus = dbus.SessionBus()
86
87 try:
88 client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
89 follow_name_owner_changes=True)
90 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
91 iface.get_throttling_limits(
92 reply_handler=self.__got_limits,
93 error_handler=self.__dbus_error)
94 iface.bandwidth_throttling_enabled(
95 reply_handler=self.__got_enabled,
96 error_handler=self.__dbus_error)
97 except DBusException, e:
98 self.__dbus_error(e)
99
100 # Timeout ID to avoid spamming DBus from spinbutton changes
101 self.__update_id = 0
102
103 self.load_config()
104
105 self.__construct()
106
107 def load_config(self):
108 """Load the configuration, and initilize if empty."""
109 if not os.path.isdir(os.path.dirname(CONF_FILE)):
110 os.makedirs(os.path.dirname(CONF_FILE))
111
112 self.config = ConfigParser()
113 self.config.read(CONF_FILE)
114
115 if not self.config.has_section("ubuntuone"):
116 self.config.add_section("ubuntuone")
117
118 if not self.config.has_option("ubuntuone", "show_applet"):
119 self.config.set("ubuntuone", "show_applet", "1")
120
121 if not self.config.has_option("ubuntuone", "connect"):
122 self.config.set("ubuntuone", "connect", "0")
123
124 if not self.config.has_option("ubuntuone", "connected"):
125 self.config.set("ubuntuone", "connected", "False")
126
127 if not os.path.exists(CONF_FILE):
128 self.save_config()
129
130 def save_config(self):
131 """Write the configuration back to a file."""
132 with open(CONF_FILE, "w+b") as f:
133 self.config.write(f)
134
135 def quit(self):
136 """Exit the main loop."""
137 gtk.main_quit()
138
139 def __dbus_error(self, error):
140 """Error getting throttling config."""
141 print repr(error)
142
143 def __got_limits(self, limits):
144 """Got the throttling limits."""
145 self.up_limit = int(limits['upload'])
146 self.dn_limit = int(limits['download'])
147 self.up_spin.set_value(self.up_limit / 1024)
148 self.dn_spin.set_value(self.dn_limit / 1024)
149
150 def __got_enabled(self, enabled):
151 """Got the throttling enabled config."""
152 self.bw_enabled = bool(enabled)
153 self.limit_check.set_active(self.bw_enabled)
154
155 def __update_bw_settings(self):
156 """Update the bandwidth throttling config in syncdaemon."""
157 self.bw_enabled = self.limit_check.get_active()
158 self.up_limit = self.up_spin.get_value_as_int() * 1024
159 self.dn_limit = self.dn_spin.get_value_as_int() * 1024
160
161 try:
162 client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
163 follow_name_owner_changes=True)
164 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
165 iface.set_throttling_limits(self.dn_limit, self.up_limit,
166 reply_handler=dbus_async,
167 error_handler=self.__dbus_error)
168 if self.bw_enabled:
169 iface.enable_bandwidth_throttling(
170 reply_handler=dbus_async,
171 error_handler=self.__dbus_error)
172 else:
173 iface.disable_bandwidth_throttling(
174 reply_handler=dbus_async,
175 error_handler=self.__dbus_error)
176 except DBusException, e:
177 self.__dbus_error(e)
178
179 def __handle_response(self, dialog, response):
180 """Handle the dialog's response."""
181 self.hide()
182 self.config.set("ubuntuone", "show_applet",
183 self.show_menu.get_active())
184 self.config.set("ubuntuone", "connect",
185 self.conn_menu.get_active())
186
187 self.__update_bw_settings()
188 self.save_config()
189 gtk.main_quit()
190
191 def __show_menu_changed(self, menu, data=None):
192 """Update the config for showing the applet."""
193 value = menu.get_active()
194 self.config.set("ubuntuone", "show_applet", str(value))
195 try:
196 client = self.__bus.get_object(APPLET_IFACE_NAME, "/config",
197 follow_name_owner_changes=True)
198 iface = dbus.Interface(client, APPLET_IFACE_CONFIG_NAME)
199 iface.set_visibility_config(value, reply_handler=dbus_async,
200 error_handler=self.__dbus_error)
201 except DBusException, e:
202 self.__dbus_error(e)
203
204 def __conn_menu_changed(self, menu, data=None):
205 """Update the config for showing the applet."""
206 value = menu.get_active()
207 self.config.set("ubuntuone", "connect", str(value))
208 try:
209 client = self.__bus.get_object(APPLET_IFACE_NAME, "/config",
210 follow_name_owner_changes=True)
211 iface = dbus.Interface(client, APPLET_IFACE_CONFIG_NAME)
212 iface.set_connection_config(value, reply_handler=dbus_async,
213 error_handler=self.__dbus_error)
214 except DBusException, e:
215 self.__dbus_error(e)
216
217 def __bw_limit_toggled(self, button, data=None):
218 """Toggle the bw limit panel."""
219 self.bw_enabled = self.limit_check.get_active()
220 self.bw_table.set_sensitive(self.bw_enabled)
221 try:
222 client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
223 follow_name_owner_changes=True)
224 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
225 iface.set_throttling_limits(self.dn_limit, self.up_limit,
226 reply_handler=dbus_async,
227 error_handler=self.__dbus_error)
228 if self.bw_enabled:
229 iface.enable_bandwidth_throttling(
230 reply_handler=dbus_async,
231 error_handler=self.__dbus_error)
232 else:
233 iface.disable_bandwidth_throttling(
234 reply_handler=dbus_async,
235 error_handler=self.__dbus_error)
236 except DBusException, e:
237 self.__dbus_error(e)
238
239 def __spinner_changed(self, button, data=None):
240 """Remove timeout and add anew."""
241 if self.__update_id != 0:
242 gobject.source_remove(self.__update_id)
243
244 self.__update_id = gobject.timeout_add_seconds(
245 1, self.__update_bw_settings)
246
247 def __construct(self):
248 """Construct the dialog's layout."""
249 area = self.get_content_area()
250
251 vbox = gtk.VBox(spacing=12)
252 vbox.set_border_width(12)
253 area.add(vbox)
254 vbox.show()
255
256 # Put the first set of options in a table.
257 table = gtk.Table(rows=2, columns=2)
258 table.set_row_spacings(12)
259 table.set_col_spacings(6)
260 vbox.add(table)
261 table.show()
262
263 label = gtk.Label(_("_Show icon:"))
264 label.set_use_underline(True)
265 label.set_alignment(0, 0.5)
266 table.attach(label, 0, 1, 0, 1)
267 label.show()
268
269 self.show_menu = gtk.combo_box_new_text()
270 self.show_menu.connect("changed", self.__show_menu_changed)
271 label.set_mnemonic_widget(self.show_menu)
272 self.show_menu.append_text(_("Always"))
273 self.show_menu.append_text(_("When updating"))
274 self.show_menu.append_text(_("Never"))
275 self.show_menu.set_active(self.config.getint("ubuntuone",
276 "show_applet"))
277 table.attach(self.show_menu, 1, 2, 0, 1)
278 self.show_menu.show()
279
280 label = gtk.Label(_("Connect on start:"))
281 label.set_use_underline(True)
282 label.set_alignment(0, 0.5)
283 table.attach(label, 0, 1, 1, 2)
284 label.show()
285
286 self.conn_menu = gtk.combo_box_new_text()
287 self.conn_menu.connect("changed", self.__conn_menu_changed)
288 label.set_mnemonic_widget(self.conn_menu)
289 self.conn_menu.append_text(_("Automatically"))
290 self.conn_menu.append_text(_("Remember last"))
291 self.conn_menu.append_text(_("Never"))
292 self.conn_menu.set_active(self.config.getint("ubuntuone",
293 "connect"))
294 table.attach(self.conn_menu, 1, 2, 1, 2)
295 self.conn_menu.show()
296
297 # Bandwidth limiting
298 self.limit_check = gtk.CheckButton(_("_Limit Bandwidth Usage"))
299 self.limit_check.connect("toggled", self.__bw_limit_toggled)
300 vbox.add(self.limit_check)
301 self.limit_check.show()
302
303 hbox = gtk.HBox(spacing=12)
304 vbox.add(hbox)
305 hbox.show()
306
307 label = gtk.Label()
308 hbox.add(label)
309 label.show()
310
311 # Now put the bw limit bits in a table too
312 self.bw_table = gtk.Table(rows=2, columns=2)
313 self.bw_table.set_row_spacings(6)
314 self.bw_table.set_col_spacings(6)
315 self.bw_table.set_sensitive(False)
316 hbox.add(self.bw_table)
317 self.bw_table.show()
318
319 # Upload speed
320 label = gtk.Label(_("Maximum _upload speed (KB/s):"))
321 label.set_use_underline(True)
322 label.set_alignment(0, 0.5)
323 self.bw_table.attach(label, 0, 1, 0, 1)
324 label.show()
325
326 adjustment = gtk.Adjustment(value=2048.0, lower=0.0, upper=4096.0,
327 step_incr=64.0, page_incr=128.0)
328 self.up_spin = gtk.SpinButton(adjustment)
329 self.up_spin.connect("value-changed", self.__spinner_changed)
330 label.set_mnemonic_widget(self.up_spin)
331 self.bw_table.attach(self.up_spin, 1, 2, 0, 1)
332 self.up_spin.show()
333
334 # Download speed
335 label = gtk.Label(_("Maximum _download speed (KB/s):"))
336 label.set_use_underline(True)
337 label.set_alignment(0, 0.5)
338 self.bw_table.attach(label, 0, 1, 1, 2)
339 label.show()
340 adjustment = gtk.Adjustment(value=2048.0, lower=0.0, upper=4096.0,
341 step_incr=64.0, page_incr=128.0)
342 self.dn_spin = gtk.SpinButton(adjustment)
343 self.dn_spin.connect("value-changed", self.__spinner_changed)
344 label.set_mnemonic_widget(self.dn_spin)
345 self.bw_table.attach(self.dn_spin, 1, 2, 1, 2)
346 self.dn_spin.show()
347
348
349if __name__ == "__main__":
350 gettext.bindtextdomain(clientdefs.GETTEXT_PACKAGE, clientdefs.LOCALEDIR)
351 gettext.textdomain(clientdefs.GETTEXT_PACKAGE)
352
353 gtk.rc_parse_string(RCSTYLE)
354
355 try:
356 dialog = AppletConfigDialog()
357 dialog.show()
358 gtk.main()
359 except KeyboardInterrupt:
360 pass
3610
=== added file 'bin/ubuntuone-login'
--- bin/ubuntuone-login 1970-01-01 00:00:00 +0000
+++ bin/ubuntuone-login 2010-02-18 00:10:25 +0000
@@ -0,0 +1,226 @@
1#!/usr/bin/python
2
3# ubuntuone-login - Client side log-in utility for Ubuntu One
4#
5# Author: Rodney Dawes <rodney.dawes@canonical.com>
6#
7# Copyright 2009 Canonical Ltd.
8#
9# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published
11# by the Free Software Foundation.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranties of
15# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16# PURPOSE. See the GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License along
19# with this program. If not, see <http://www.gnu.org/licenses/>.
20
21import pygtk
22pygtk.require('2.0')
23import gtk
24import pango
25import sys
26import gettext
27from ubuntuone import clientdefs
28
29import dbus.service
30
31from dbus.mainloop.glib import DBusGMainLoop
32from ubuntuone.oauthdesktop.main import Login
33
34from ubuntuone.oauthdesktop.logger import setupLogging
35logger = setupLogging("ubuntuone-login")
36
37DBusGMainLoop(set_as_default=True)
38
39_ = gettext.gettext
40ngettext = gettext.ngettext
41
42DBUS_IFACE_AUTH_NAME = "com.ubuntuone.Authentication"
43
44OAUTH_REALM = "https://ubuntuone.com"
45OAUTH_CONSUMER = "ubuntuone"
46
47NOTIFY_ICON_SIZE = 48
48
49# Why thank you GTK+ for enforcing style-set and breaking API
50RCSTYLE = """
51style 'dialogs' {
52 GtkDialog::action-area-border = 12
53 GtkDialog::button-spacing = 6
54 GtkDialog::content-area-border = 0
55}
56widget_class '*Dialog*' style 'dialogs'
57"""
58
59
60class LoginMain(object):
61 """Main login manager process class."""
62
63 def __init__(self, *args, **kw):
64 """Initializes the child threads and dbus monitor."""
65 gtk.rc_parse_string(RCSTYLE)
66
67 logger.info(_("Starting Ubuntu One login manager version %s") %
68 clientdefs.VERSION)
69
70 self.__bus = dbus.SessionBus()
71
72 def _connect_dbus_signals(self):
73 """Set up some signal handlers for DBus signals."""
74 self.__bus.add_signal_receiver(
75 handler_function=self.new_credentials,
76 signal_name="NewCredentials",
77 dbus_interface=DBUS_IFACE_AUTH_NAME)
78 self.__bus.add_signal_receiver(
79 handler_function=self.auth_denied,
80 signal_name="AuthorizationDenied",
81 dbus_interface=DBUS_IFACE_AUTH_NAME)
82 self.__bus.add_signal_receiver(
83 handler_function=self.got_oauth_error,
84 signal_name="OAuthError",
85 dbus_interface=DBUS_IFACE_AUTH_NAME)
86
87
88 def new_credentials(self, realm=None, consumer_key=None, sender=None):
89 """Signal callback for when we get new credentials."""
90 self.set_up_desktopcouch_pairing(consumer_key)
91
92 def auth_denied(self):
93 """Signal callback for when auth was denied by user."""
94 logger.info(_("Access to Ubuntu One was denied."))
95
96 from twisted.internet import reactor
97 reactor.stop()
98
99 def got_oauth_error(self, message=None):
100 """Signal callback for when an OAuth error occured."""
101 def dialog_response(dialog, response):
102 """Handle the dialog closing."""
103 dialog.destroy()
104
105 if message:
106 logger.error(message)
107 dialog = gtk.Dialog(title=_("Ubuntu One: Error"),
108 flags=gtk.DIALOG_NO_SEPARATOR,
109 buttons=(gtk.STOCK_CLOSE,
110 gtk.RESPONSE_CLOSE))
111 dialog.set_default_response(gtk.RESPONSE_CLOSE)
112 dialog.set_icon_name("ubuntuone-client")
113
114 area = dialog.get_content_area()
115
116 hbox = gtk.HBox(spacing=12)
117 hbox.set_border_width(12)
118 area.pack_start(hbox)
119 hbox.show()
120
121 image = gtk.Image()
122 image.set_from_icon_name("dialog-error", gtk.ICON_SIZE_DIALOG)
123 image.set_alignment(0.5, 0.0)
124 image.show()
125 hbox.pack_start(image, False, False)
126
127 vbox = gtk.VBox(spacing=12)
128 vbox.show()
129 hbox.pack_start(vbox)
130
131 label = gtk.Label("<b>%s</b>" % _("Authorization Error"))
132 label.set_use_markup(True)
133 label.set_alignment(0.0, 0.5)
134 label.show()
135 vbox.pack_start(label, False, False)
136
137 label = gtk.Label(message)
138 label.set_line_wrap(True)
139 label.set_max_width_chars(64)
140 label.set_ellipsize(pango.ELLIPSIZE_MIDDLE)
141 label.set_alignment(0.0, 0.0)
142 label.show()
143 vbox.pack_start(label, True, True)
144
145 dialog.connect('close', dialog_response, gtk.RESPONSE_CLOSE)
146 dialog.connect('response', dialog_response)
147
148 dialog.show()
149 else:
150 logger.error(_("Got an OAuth error with no message."))
151
152 def set_up_desktopcouch_pairing(self, consumer_key):
153 """Add a pairing record between desktopcouch and Ubuntu One"""
154 try:
155 from desktopcouch.pair.couchdb_pairing.couchdb_io import \
156 put_static_paired_service
157 from desktopcouch.records.server import CouchDatabase
158 except ImportError:
159 # desktopcouch is not installed
160 logger.debug(_("Not adding desktopcouch pairing since"
161 " desktopcouch is not installed"))
162 return
163 # Check whether there is already a record of the Ubuntu One service
164 db = CouchDatabase("management", create=True)
165 if not db.view_exists("ubuntu_one_pair_record","ubuntu_one_pair_record"):
166 map_js = """function(doc) {
167 if (doc.service_name == "ubuntuone") {
168 if (doc.application_annotations &&
169 doc.application_annotations["Ubuntu One"] &&
170 doc.application_annotations["Ubuntu One"]["private_application_annotations"] &&
171 doc.application_annotations["Ubuntu One"]["private_application_annotations"]["deleted"]) {
172 emit(doc._id, 1);
173 } else {
174 emit(doc._id, 0)
175 }
176 }
177 }"""
178 db.add_view("ubuntu_one_pair_record", map_js, None,
179 "ubuntu_one_pair_record")
180 results = db.execute_view("ubuntu_one_pair_record",
181 "ubuntu_one_pair_record")
182 found = False
183 # Results should contain either one row or no rows
184 # If there is one row, its value will be 0, meaning that there is
185 # already an Ubuntu One pairing record, or 1, meaning that there
186 # was an Ubuntu One pairing record but it has since been unpaired
187 # Only create a new record if there is not one already. Specifically,
188 # do not add the record if there is a deleted one, as this means
189 # that the user explicitly unpaired it!
190 for row in results:
191 found = True
192 if row.value == 1:
193 logger.debug(_("Not adding desktopcouch pairing since"
194 " the user has explicitly unpaired with Ubuntu One"))
195 else:
196 logger.debug(_("Not adding desktopcouch pairing since"
197 " we are already paired"))
198 if not found:
199 put_static_paired_service(None, "ubuntuone")
200 logger.debug(_("Pairing desktopcouch with Ubuntu One"))
201
202 def main(self):
203 """Starts the gtk main loop."""
204 self._connect_dbus_signals()
205
206 from twisted.internet import reactor
207 reactor.run()
208
209
210if __name__ == "__main__":
211 gettext.bindtextdomain(clientdefs.GETTEXT_PACKAGE, clientdefs.LOCALEDIR)
212 gettext.textdomain(clientdefs.GETTEXT_PACKAGE)
213
214 # Register DBus service for making sure we run only one instance
215 bus = dbus.SessionBus()
216 if bus.request_name(DBUS_IFACE_AUTH_NAME, dbus.bus.NAME_FLAG_DO_NOT_QUEUE) == dbus.bus.REQUEST_NAME_REPLY_EXISTS:
217 print _("Ubuntu One login manager already running, quitting")
218 sys.exit(0)
219
220 from twisted.internet import gtk2reactor
221 gtk2reactor.install()
222
223 login = Login(dbus.service.BusName(DBUS_IFACE_AUTH_NAME,
224 bus=dbus.SessionBus()))
225 manager = LoginMain()
226 manager.main()
0227
=== added file 'bin/ubuntuone-preferences'
--- bin/ubuntuone-preferences 1970-01-01 00:00:00 +0000
+++ bin/ubuntuone-preferences 2010-02-18 00:10:25 +0000
@@ -0,0 +1,549 @@
1#!/usr/bin/python
2
3# ubuntuone-client-applet - Tray icon applet for managing Ubuntu One
4#
5# Author: Rodney Dawes <rodney.dawes@canonical.com>
6#
7# Copyright 2009 Canonical Ltd.
8#
9# This program is free software: you can redistribute it and/or modify it
10# under the terms of the GNU General Public License version 3, as published
11# by the Free Software Foundation.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranties of
15# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16# PURPOSE. See the GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License along
19# with this program. If not, see <http://www.gnu.org/licenses/>.
20
21from __future__ import division
22
23import pygtk
24pygtk.require('2.0')
25import gobject
26import gtk
27import os
28import gettext
29import gnomekeyring
30import httplib2
31import simplejson
32from oauth import oauth
33from ubuntuone import clientdefs
34
35import dbus.service
36from ConfigParser import ConfigParser
37from dbus.exceptions import DBusException
38from dbus.mainloop.glib import DBusGMainLoop
39from xdg.BaseDirectory import xdg_config_home
40
41DBusGMainLoop(set_as_default=True)
42
43_ = gettext.gettext
44
45DBUS_IFACE_NAME = "com.ubuntuone.SyncDaemon"
46DBUS_IFACE_CONFIG_NAME = DBUS_IFACE_NAME + ".Config"
47
48DBUS_IFACE_AUTH_NAME = "com.ubuntuone.Authentication"
49DBUS_IFACE_AUTH_PATH = "/"
50
51# Why thank you GTK+ for enforcing style-set and breaking API
52RCSTYLE = """
53style 'dialogs' {
54 GtkDialog::action-area-border = 12
55 GtkDialog::button-spacing = 6
56 GtkDialog::content-area-border = 0
57}
58widget_class '*Dialog*' style 'dialogs'
59"""
60
61def dbus_async(*args):
62 """Simple handler to make dbus do stuff async."""
63 pass
64
65
66class UbuntuOneDialog(gtk.Dialog):
67 """Preferences dialog."""
68
69 def __init__(self, config=None, *args, **kw):
70 """Initializes our config dialog."""
71 super(UbuntuOneDialog, self).__init__(*args, **kw)
72 self.set_title(_("Ubuntu One Preferences"))
73 self.set_has_separator(False)
74 self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)
75 self.set_default_response(gtk.RESPONSE_CLOSE)
76 self.set_icon_name("ubuntuone")
77
78 self.connect("close", self.__handle_response, gtk.RESPONSE_CLOSE)
79 self.connect("response", self.__handle_response)
80
81 self.bw_enabled = False
82 self.up_limit = 2097152
83 self.dn_limit = 2097152
84
85 self.__bus = dbus.SessionBus()
86 self.keyring = gnomekeyring
87
88 try:
89 client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
90 follow_name_owner_changes=True)
91 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
92 iface.get_throttling_limits(
93 reply_handler=self.__got_limits,
94 error_handler=self.__dbus_error)
95 iface.bandwidth_throttling_enabled(
96 reply_handler=self.__got_enabled,
97 error_handler=self.__dbus_error)
98 except DBusException, e:
99 self.__dbus_error(e)
100
101 # Timeout ID to avoid spamming DBus from spinbutton changes
102 self.__update_id = 0
103
104 self.__construct()
105
106 def quit(self):
107 """Exit the main loop."""
108 gtk.main_quit()
109
110 def __dbus_error(self, error):
111 """Error getting throttling config."""
112 print repr(error)
113
114 def __got_limits(self, limits):
115 """Got the throttling limits."""
116 self.up_limit = int(limits['upload'])
117 self.dn_limit = int(limits['download'])
118 self.up_spin.set_value(self.up_limit / 1024)
119 self.dn_spin.set_value(self.dn_limit / 1024)
120
121 def __got_enabled(self, enabled):
122 """Got the throttling enabled config."""
123 self.bw_enabled = bool(enabled)
124 self.limit_check.set_active(self.bw_enabled)
125
126 def __update_bw_settings(self):
127 """Update the bandwidth throttling config in syncdaemon."""
128 self.bw_enabled = self.limit_check.get_active()
129 self.up_limit = self.up_spin.get_value_as_int() * 1024
130 self.dn_limit = self.dn_spin.get_value_as_int() * 1024
131
132 try:
133 client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
134 follow_name_owner_changes=True)
135 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
136 iface.set_throttling_limits(self.dn_limit, self.up_limit,
137 reply_handler=dbus_async,
138 error_handler=self.__dbus_error)
139 if self.bw_enabled:
140 iface.enable_bandwidth_throttling(
141 reply_handler=dbus_async,
142 error_handler=self.__dbus_error)
143 else:
144 iface.disable_bandwidth_throttling(
145 reply_handler=dbus_async,
146 error_handler=self.__dbus_error)
147 except DBusException, e:
148 self.__dbus_error(e)
149
150 def __handle_response(self, dialog, response):
151 """Handle the dialog's response."""
152 self.hide()
153 self.__update_bw_settings()
154 gtk.main_quit()
155
156 def __bw_limit_toggled(self, button, data=None):
157 """Toggle the bw limit panel."""
158 self.bw_enabled = self.limit_check.get_active()
159 self.bw_table.set_sensitive(self.bw_enabled)
160 try:
161 client = self.__bus.get_object(DBUS_IFACE_NAME, "/config",
162 follow_name_owner_changes=True)
163 iface = dbus.Interface(client, DBUS_IFACE_CONFIG_NAME)
164 iface.set_throttling_limits(self.dn_limit, self.up_limit,
165 reply_handler=dbus_async,
166 error_handler=self.__dbus_error)
167 if self.bw_enabled:
168 iface.enable_bandwidth_throttling(
169 reply_handler=dbus_async,
170 error_handler=self.__dbus_error)
171 else:
172 iface.disable_bandwidth_throttling(
173 reply_handler=dbus_async,
174 error_handler=self.__dbus_error)
175 except DBusException, e:
176 self.__dbus_error(e)
177
178 def __spinner_changed(self, button, data=None):
179 """Remove timeout and add anew."""
180 if self.__update_id != 0:
181 gobject.source_remove(self.__update_id)
182
183 self.__update_id = gobject.timeout_add_seconds(
184 1, self.__update_bw_settings)
185
186 def _format_for_gb_display(self, bytes):
187 """Format bytes into reasonable gb display."""
188 gb = bytes / 1024 / 1024 / 1024
189 if gb < 1.0:
190 mb = bytes / 1024 / 1024
191 if mb < 1.0:
192 return (bytes / 1024, 'KB')
193 return (mb, 'MB')
194 return (gb, 'GB')
195
196 def update_quota_display(self, used, total):
197 """Update the quota display."""
198 percent = (float(used) / float(total)) * 100
199 real_used, real_type = self._format_for_gb_display(used)
200 self.usage_label.set_text(
201 _("%(used)0.1f %(type)s Used (%(percent)0.1f%%)") % {
202 'used' : real_used,
203 'type' : real_type,
204 'percent' : percent })
205 self.usage_graph.set_fraction(percent / 100)
206
207 def request_REST_info(self, url, method):
208 """Make a REST request and return the resulting dict, or None."""
209 consumer = oauth.OAuthConsumer("ubuntuone", "hammertime")
210 items = []
211 items = self.keyring.find_items_sync(
212 gnomekeyring.ITEM_GENERIC_SECRET,
213 {'ubuntuone-realm': "https://ubuntuone.com",
214 'oauth-consumer-key': consumer.key})
215 token = oauth.OAuthToken.from_string(items[0].secret)
216 request = oauth.OAuthRequest.from_consumer_and_token(
217 http_url=url, http_method=method, oauth_consumer=consumer,
218 token=token)
219 request.sign_request(oauth.OAuthSignatureMethod_HMAC_SHA1(),
220 consumer, token)
221 client = httplib2.Http()
222 headers = {}
223 headers.update(request.to_header())
224 resp, content = client.request(url, method, headers=headers)
225 if resp['status'] == '200':
226 return simplejson.loads(content)
227 # FIXME: Log json parsing failures
228 else:
229 # FIXME: Log errors
230 return None
231
232 def request_quota_info(self):
233 """Request new quota info from server, and update display."""
234 quota = self.request_REST_info('https://one.ubuntu.com/api/quota/',
235 'GET')
236 if quota:
237 self.update_quota_display(quota['used'], quota['total'])
238
239 def request_account_info(self):
240 """Request account info from server, and update display."""
241 user = self.request_REST_info('https://one.ubuntu.com/api/account/',
242 'GET')
243 if user:
244 self.name_label.set_text(user['nickname'])
245 self.user_label.set_text(user['username'])
246 self.mail_label.set_text(user['email'])
247
248 def toggle_db_sync(self, dbname, disable=False):
249 """
250 Toggle whether a db in desktopcouch is synchronized to the
251 Ubuntu One couchdb server.
252 """
253 # FIXME: Actually enable/disable the dbs if desktopcouch exists
254
255 def __db_check_toggled(self, checkbutton):
256 """Handle toggling a desktopcouch service toggling."""
257 dbname = checkbutton.get_data('dbname')
258 self.toggle_db_sync(dbname, not checkbutton.get_active())
259
260 def __files_check_toggled(self, checkbutton):
261 """Handle toggling the files service."""
262 enable = checkbutton.get_active()
263 if enable:
264 self.music_check.set_sensitive(True)
265 if self.music_check.get_active():
266 self.__music_check_toggled(self.music_check)
267 else:
268 self.music_check.set_sensitive(False)
269 # FIXME: Actually stop or start ubuntuone-syncdaemon
270
271 def __music_check_toggled(self, checkbutton):
272 """Handle toggling the music download service."""
273 if not self.files_check.get_active():
274 return
275 # FIXME: Actually subscribe or unsubscribe to the UDF
276
277 def __construct(self):
278 """Construct the dialog's layout."""
279 area = self.get_content_area()
280
281 vbox = gtk.VBox(spacing=12)
282 vbox.set_border_width(12)
283 area.add(vbox)
284 vbox.show()
285
286 # Usage text/progress bar
287 hbox = gtk.HBox(homogeneous=True)
288 vbox.pack_start(hbox, False, False)
289 hbox.show()
290
291 label = gtk.Label("")
292 hbox.add(label)
293 label.show()
294
295 rbox = gtk.VBox(spacing=2)
296 hbox.pack_end(rbox)
297 rbox.show()
298
299 self.usage_label = gtk.Label("")
300 self.usage_label.set_alignment(0.5, 0.5)
301 rbox.add(self.usage_label)
302 self.usage_label.show()
303
304 self.usage_graph = gtk.ProgressBar()
305 rbox.add(self.usage_graph)
306 self.usage_graph.show()
307
308 self.update_quota_display(0, 2)
309
310 # Notebook
311 self.notebook = gtk.Notebook()
312 vbox.add(self.notebook)
313 self.notebook.show()
314
315 # Account tab
316 account = gtk.VBox(spacing=12)
317 account.set_border_width(6)
318 self.notebook.append_page(account)
319 self.notebook.set_tab_label_text(account, _("Account"))
320 account.show()
321
322 # User info in account tab
323 table = gtk.Table(rows=3, columns=2)
324 table.set_row_spacings(6)
325 table.set_col_spacings(6)
326 account.pack_start(table, False, False)
327 table.show()
328
329 label = gtk.Label(_("_Name:"))
330 label.set_use_underline(True)
331 label.set_alignment(0.0, 0.5)
332 table.attach(label, 0, 1, 0, 1)
333 label.show()
334
335 self.name_label = gtk.Label("")
336 self.name_label.set_use_underline(True)
337 self.name_label.set_alignment(0.0, 0.5)
338 table.attach(self.name_label, 1, 2, 0, 1)
339 self.name_label.show()
340
341 label = gtk.Label(_("_Username:"))
342 label.set_use_underline(True)
343 label.set_alignment(0.0, 0.5)
344 table.attach(label, 0, 1, 1, 2)
345 label.show()
346
347 self.user_label = gtk.Label("")
348 self.user_label.set_use_underline(True)
349 self.user_label.set_alignment(0.0, 0.5)
350 table.attach(self.user_label, 1, 2, 1, 2)
351 self.user_label.show()
352
353 label = gtk.Label(_("_E-mail:"))
354 label.set_use_underline(True)
355 label.set_alignment(0.0, 0.5)
356 table.attach(label, 0, 1, 2, 3)
357 label.show()
358
359 self.mail_label = gtk.Label("")
360 self.mail_label.set_use_underline(True)
361 self.mail_label.set_alignment(0.0, 0.5)
362 table.attach(self.mail_label, 1, 2, 2, 3)
363 self.mail_label.show()
364
365 # Devices tab
366 devices = gtk.VBox(spacing=12)
367 devices.set_border_width(6)
368 self.notebook.append_page(devices)
369 self.notebook.set_tab_label_text(devices, _("Devices"))
370 devices.show()
371
372 # Bandwidth limiting
373 self.limit_check = gtk.CheckButton(_("_Limit Bandwidth Usage"))
374 self.limit_check.connect("toggled", self.__bw_limit_toggled)
375 devices.pack_start(self.limit_check, False, False)
376 self.limit_check.show()
377
378 hbox = gtk.HBox(spacing=12)
379 devices.pack_start(hbox, False, False)
380 hbox.show()
381
382 label = gtk.Label()
383 hbox.pack_start(label, False, False)
384 label.show()
385
386 # Now put the bw limit bits in a table too
387 self.bw_table = gtk.Table(rows=2, columns=2)
388 self.bw_table.set_row_spacings(6)
389 self.bw_table.set_col_spacings(6)
390 self.bw_table.set_sensitive(False)
391 hbox.pack_start(self.bw_table, False, False)
392 self.bw_table.show()
393
394 # Upload speed
395 label = gtk.Label(_("Maximum _upload speed (KB/s):"))
396 label.set_use_underline(True)
397 label.set_alignment(0, 0.5)
398 self.bw_table.attach(label, 0, 1, 0, 1)
399 label.show()
400
401 adjustment = gtk.Adjustment(value=2048.0, lower=0.0, upper=4096.0,
402 step_incr=64.0, page_incr=128.0)
403 self.up_spin = gtk.SpinButton(adjustment)
404 self.up_spin.connect("value-changed", self.__spinner_changed)
405 label.set_mnemonic_widget(self.up_spin)
406 self.bw_table.attach(self.up_spin, 1, 2, 0, 1)
407 self.up_spin.show()
408
409 # Download speed
410 label = gtk.Label(_("Maximum _download speed (KB/s):"))
411 label.set_use_underline(True)
412 label.set_alignment(0, 0.5)
413 self.bw_table.attach(label, 0, 1, 1, 2)
414 label.show()
415 adjustment = gtk.Adjustment(value=2048.0, lower=0.0, upper=4096.0,
416 step_incr=64.0, page_incr=128.0)
417 self.dn_spin = gtk.SpinButton(adjustment)
418 self.dn_spin.connect("value-changed", self.__spinner_changed)
419 label.set_mnemonic_widget(self.dn_spin)
420 self.bw_table.attach(self.dn_spin, 1, 2, 1, 2)
421 self.dn_spin.show()
422
423 # Services tab
424 services = gtk.VBox(spacing=12)
425 services.set_border_width(6)
426 self.notebook.append_page(services)
427 self.notebook.set_tab_label_text(services, _("Services"))
428 # FIXME: These are all disabled for the moment
429 services.set_sensitive(False)
430 services.show()
431
432 self.bookmarks_check = gtk.CheckButton(_("_Bookmarks"))
433 self.bookmarks_check.set_data('dbname', 'bookmarks')
434 self.bookmarks_check.connect('toggled', self.__db_check_toggled)
435 services.pack_start(self.bookmarks_check, False, False)
436 self.bookmarks_check.show()
437
438 self.abook_check = gtk.CheckButton(_("C_ontacts"))
439 self.abook_check.set_data('dbname', 'contacts')
440 self.abook_check.connect('toggled', self.__db_check_toggled)
441 services.pack_start(self.abook_check, False, False)
442 self.abook_check.show()
443
444 fbox = gtk.VBox(spacing=6)
445 services.pack_start(fbox, False, False)
446 fbox.show()
447
448 self.files_check = gtk.CheckButton(_("_File Synchronization"))
449 self.files_check.set_active(True)
450 self.files_check.connect('toggled', self.__files_check_toggled)
451 fbox.pack_start(self.files_check, False, False)
452 self.files_check.show()
453
454 alignment = gtk.Alignment(0.0, 0.5)
455 alignment.set_padding(0, 0, 12, 0)
456 fbox.pack_start(alignment, False, False)
457 alignment.show()
458
459 self.music_check = gtk.CheckButton(_("_Music Download"))
460 self.music_check.set_active(True)
461 self.music_check.connect('toggled', self.__music_check_toggled)
462 alignment.add(self.music_check)
463 self.music_check.show()
464
465class UbuntuoneLoginHandler(object):
466 """Class to handle registration/login, in case we aren't already."""
467
468 def __init__(self, *args, **kw):
469 self.bus = dbus.SessionBus()
470
471 self.newcreds = None
472 self.oautherr = None
473 self.authdeny = None
474
475 def got_newcredentials(self, realm, consumer_key):
476 """Show our dialog, since we can do stuff now."""
477 self.disconnect_signal_handlers()
478 dialog = UbuntuOneDialog()
479 dialog.request_quota_info()
480 dialog.request_account_info()
481 dialog.show()
482
483 def got_oautherror(self, message=None):
484 """Got an error during oauth."""
485 gtk.main_quit()
486
487 def got_authdenied(self):
488 """User denied access."""
489 gtk.main_quit()
490
491 def got_dbus_error(self, error):
492 """Got a DBusError."""
493 gtk.main_quit()
494
495 def register_signal_handlers(self):
496 """Register the dbus signal handlers."""
497 self.newcreds = self.bus.add_signal_receiver(
498 handler_function=self.got_newcredentials,
499 signal_name='NewCredentials',
500 dbus_interface=DBUS_IFACE_AUTH_NAME)
501 self.oautherr = self.bus.add_signal_receiver(
502 handler_function=self.got_oautherror,
503 signal_name='OAuthError',
504 dbus_interface=DBUS_IFACE_AUTH_NAME)
505 self.authdeny = self.bus.add_signal_receiver(
506 handler_function=self.got_authdenied,
507 signal_name='AuthorizationDenied',
508 dbus_interface=DBUS_IFACE_AUTH_NAME)
509
510 def disconnect_signal_handlers(self):
511 """Disconnect the dbus signal handlers, so we don't break."""
512 self.bus.remove_signal_receiver(
513 self.newcreds,
514 dbus_interface=DBUS_IFACE_AUTH_NAME)
515 self.bus.remove_signal_receiver(
516 self.oautherr,
517 dbus_interface=DBUS_IFACE_AUTH_NAME)
518 self.bus.remove_signal_receiver(
519 self.authdeny,
520 dbus_interface=DBUS_IFACE_AUTH_NAME)
521
522 def do_login_check(self):
523 """Log in to U1 or validate that we already are."""
524 try:
525 client = self.bus.get_object(DBUS_IFACE_AUTH_NAME,
526 DBUS_IFACE_AUTH_PATH,
527 follow_name_owner_changes=True)
528 iface = dbus.Interface(client, DBUS_IFACE_AUTH_NAME)
529 iface.login('https://ubuntuone.com', 'ubuntuone',
530 reply_handler=dbus_async,
531 error_handler=self.got_dbus_error)
532 except DBusException, e:
533 self.got_dbus_error(e)
534
535
536if __name__ == "__main__":
537 gettext.bindtextdomain(clientdefs.GETTEXT_PACKAGE, clientdefs.LOCALEDIR)
538 gettext.textdomain(clientdefs.GETTEXT_PACKAGE)
539
540 gtk.rc_parse_string(RCSTYLE)
541 gobject.set_application_name("Ubuntu One")
542
543 try:
544 login = UbuntuoneLoginHandler()
545 login.register_signal_handlers()
546 login.do_login_check()
547 gtk.main()
548 except KeyboardInterrupt:
549 pass
0550
=== modified file 'bin/ubuntuone-syncdaemon'
--- bin/ubuntuone-syncdaemon 2009-09-28 18:15:00 +0000
+++ bin/ubuntuone-syncdaemon 2010-02-18 00:10:25 +0000
@@ -31,7 +31,7 @@
31import sys31import sys
32import shutil32import shutil
3333
34from ubuntuone.syncdaemon import dbus_interface, logger34from ubuntuone.syncdaemon import dbus_interface, logger, config
35from ubuntuone.syncdaemon.config import (35from ubuntuone.syncdaemon.config import (
36 get_config_files,36 get_config_files,
37 get_parsers,37 get_parsers,
@@ -75,14 +75,15 @@
75 configs.append(args.pop(0))75 configs.append(args.pop(0))
76 if len(configs) == 0:76 if len(configs) == 0:
77 configs.extend(get_config_files())77 configs.extend(get_config_files())
78 (parser, options, argv) = configglue(file(configs[0]), *configs[1:], 78 (parser, options, argv) = config.configglue(file(configs[0]), *configs[1:],
79 args=args, usage=usage,79 args=args, usage=usage)
80 extra_parsers=get_parsers())
8180
82 if options.debug:81 if options.debug:
83 logger.set_debug('stdout file')82 logger.set_debug('stdout file')
84 else:83 else:
85 logger.set_level(options.log_level)84 logger.configure_logging(options.logging_level,
85 options.logging_file_size,
86 options.logging_backup_count)
8687
87 # check we're not running as root, or have explicitely and in88 # check we're not running as root, or have explicitely and in
88 # length expressed our desire to do so89 # length expressed our desire to do so
8990
=== modified file 'config.guess'
--- config.guess 2009-07-27 16:00:00 +0000
+++ config.guess 2010-02-18 00:10:25 +0000
@@ -1,10 +1,10 @@
1#! /bin/sh1#! /bin/sh
2# Attempt to guess a canonical system name.2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 20084# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5# Free Software Foundation, Inc.5# Free Software Foundation, Inc.
66
7timestamp='2009-04-27'7timestamp='2009-06-10'
88
9# This file is free software; you can redistribute it and/or modify it9# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by10# under the terms of the GNU General Public License as published by
@@ -170,7 +170,7 @@
170 arm*|i386|m68k|ns32k|sh3*|sparc|vax)170 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171 eval $set_cc_for_build171 eval $set_cc_for_build
172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \172 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173 | grep __ELF__ >/dev/null173 | grep -q __ELF__
174 then174 then
175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).175 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176 # Return netbsd for either. FIX?176 # Return netbsd for either. FIX?
@@ -656,7 +656,7 @@
656 # => hppa64-hp-hpux11.23656 # => hppa64-hp-hpux11.23
657657
658 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |658 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
659 grep __LP64__ >/dev/null659 grep -q __LP64__
660 then660 then
661 HP_ARCH="hppa2.0w"661 HP_ARCH="hppa2.0w"
662 else662 else
@@ -822,6 +822,9 @@
822 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)822 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
823 echo i${UNAME_MACHINE}-pc-mks823 echo i${UNAME_MACHINE}-pc-mks
824 exit ;;824 exit ;;
825 8664:Windows_NT:*)
826 echo x86_64-pc-mks
827 exit ;;
825 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)828 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
826 # How do we know it's Interix rather than the generic POSIX subsystem?829 # How do we know it's Interix rather than the generic POSIX subsystem?
827 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we830 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -882,40 +885,17 @@
882 m68*:Linux:*:*)885 m68*:Linux:*:*)
883 echo ${UNAME_MACHINE}-unknown-linux-gnu886 echo ${UNAME_MACHINE}-unknown-linux-gnu
884 exit ;;887 exit ;;
885 mips:Linux:*:*)888 mips:Linux:*:* | mips64:Linux:*:*)
886 eval $set_cc_for_build889 eval $set_cc_for_build
887 sed 's/^ //' << EOF >$dummy.c890 sed 's/^ //' << EOF >$dummy.c
888 #undef CPU891 #undef CPU
889 #undef mips892 #undef ${UNAME_MACHINE}
890 #undef mipsel893 #undef ${UNAME_MACHINE}el
891 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)894 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
892 CPU=mipsel895 CPU=${UNAME_MACHINE}el
893 #else896 #else
894 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)897 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
895 CPU=mips898 CPU=${UNAME_MACHINE}
896 #else
897 CPU=
898 #endif
899 #endif
900EOF
901 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
902 /^CPU/{
903 s: ::g
904 p
905 }'`"
906 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
907 ;;
908 mips64:Linux:*:*)
909 eval $set_cc_for_build
910 sed 's/^ //' << EOF >$dummy.c
911 #undef CPU
912 #undef mips64
913 #undef mips64el
914 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
915 CPU=mips64el
916 #else
917 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
918 CPU=mips64
919 #else899 #else
920 CPU=900 CPU=
921 #endif901 #endif
@@ -947,7 +927,7 @@
947 EV67) UNAME_MACHINE=alphaev67 ;;927 EV67) UNAME_MACHINE=alphaev67 ;;
948 EV68*) UNAME_MACHINE=alphaev68 ;;928 EV68*) UNAME_MACHINE=alphaev68 ;;
949 esac929 esac
950 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null930 objdump --private-headers /bin/sh | grep -q ld.so.1
951 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi931 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
952 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}932 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
953 exit ;;933 exit ;;
@@ -1001,14 +981,6 @@
1001 elf32-i386)981 elf32-i386)
1002 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"982 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
1003 ;;983 ;;
1004 a.out-i386-linux)
1005 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
1006 exit ;;
1007 "")
1008 # Either a pre-BFD a.out linker (linux-gnuoldld) or
1009 # one that does not give us useful --help.
1010 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
1011 exit ;;
1012 esac984 esac
1013 # Determine whether the default compiler is a.out or elf985 # Determine whether the default compiler is a.out or elf
1014 eval $set_cc_for_build986 eval $set_cc_for_build
@@ -1074,7 +1046,7 @@
1074 i*86:syllable:*:*)1046 i*86:syllable:*:*)
1075 echo ${UNAME_MACHINE}-pc-syllable1047 echo ${UNAME_MACHINE}-pc-syllable
1076 exit ;;1048 exit ;;
1077 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)1049 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1078 echo i386-unknown-lynxos${UNAME_RELEASE}1050 echo i386-unknown-lynxos${UNAME_RELEASE}
1079 exit ;;1051 exit ;;
1080 i*86:*DOS:*:*)1052 i*86:*DOS:*:*)
@@ -1182,7 +1154,7 @@
1182 rs6000:LynxOS:2.*:*)1154 rs6000:LynxOS:2.*:*)
1183 echo rs6000-unknown-lynxos${UNAME_RELEASE}1155 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1184 exit ;;1156 exit ;;
1185 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)1157 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1186 echo powerpc-unknown-lynxos${UNAME_RELEASE}1158 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1187 exit ;;1159 exit ;;
1188 SM[BE]S:UNIX_SV:*:*)1160 SM[BE]S:UNIX_SV:*:*)
11891161
=== modified file 'config.sub'
--- config.sub 2009-07-27 16:00:00 +0000
+++ config.sub 2010-02-18 00:10:25 +0000
@@ -1,10 +1,10 @@
1#! /bin/sh1#! /bin/sh
2# Configuration validation subroutine script.2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 20084# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5# Free Software Foundation, Inc.5# Free Software Foundation, Inc.
66
7timestamp='2009-04-17'7timestamp='2009-06-11'
88
9# This file is (in principle) common to ALL GNU software.9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software10# The presence of a machine in this file suggests that SOME GNU software
@@ -153,6 +153,9 @@
153 os=153 os=
154 basic_machine=$1154 basic_machine=$1
155 ;;155 ;;
156 -bluegene*)
157 os=-cnk
158 ;;
156 -sim | -cisco | -oki | -wec | -winbond)159 -sim | -cisco | -oki | -wec | -winbond)
157 os=160 os=
158 basic_machine=$1161 basic_machine=$1
@@ -467,6 +470,10 @@
467 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`470 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
468 os=-linux471 os=-linux
469 ;;472 ;;
473 bluegene*)
474 basic_machine=powerpc-ibm
475 os=-cnk
476 ;;
470 c90)477 c90)
471 basic_machine=c90-cray478 basic_machine=c90-cray
472 os=-unicos479 os=-unicos
@@ -1260,7 +1267,7 @@
1260 # Each alternative MUST END IN A *, to match a version number.1267 # Each alternative MUST END IN A *, to match a version number.
1261 # -sysv* is not here because it comes later, after sysvr4.1268 # -sysv* is not here because it comes later, after sysvr4.
1262 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \1269 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1263 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\1270 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1264 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \1271 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1265 | -kopensolaris* \1272 | -kopensolaris* \
1266 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \1273 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
@@ -1613,7 +1620,7 @@
1613 -sunos*)1620 -sunos*)
1614 vendor=sun1621 vendor=sun
1615 ;;1622 ;;
1616 -aix*)1623 -cnk*|-aix*)
1617 vendor=ibm1624 vendor=ibm
1618 ;;1625 ;;
1619 -beos*)1626 -beos*)
16201627
=== modified file 'configure'
--- configure 2009-12-07 17:35:00 +0000
+++ configure 2010-02-18 00:10:25 +0000
@@ -1,10 +1,12 @@
1#! /bin/sh1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.64 for ubuntuone-client 1.1.0.3# Generated by GNU Autoconf 2.65 for ubuntuone-client 1.1.2.
4#
4#5#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
7# Foundation, Inc.8# Inc.
9#
8#10#
9# This configure script is free software; the Free Software Foundation11# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.12# gives unlimited permission to copy, distribute and modify it.
@@ -673,7 +675,8 @@
673675
674676
675677
676exec 7<&0 </dev/null 6>&1678test -n "$DJDIR" || exec 7<&0 </dev/null
679exec 6>&1
677680
678# Name of the host.681# Name of the host.
679# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,682# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -695,8 +698,8 @@
695# Identity of this package.698# Identity of this package.
696PACKAGE_NAME='ubuntuone-client'699PACKAGE_NAME='ubuntuone-client'
697PACKAGE_TARNAME='ubuntuone-client'700PACKAGE_TARNAME='ubuntuone-client'
698PACKAGE_VERSION='1.1.0'701PACKAGE_VERSION='1.1.2'
699PACKAGE_STRING='ubuntuone-client 1.1.0'702PACKAGE_STRING='ubuntuone-client 1.1.2'
700PACKAGE_BUGREPORT=''703PACKAGE_BUGREPORT=''
701PACKAGE_URL=''704PACKAGE_URL=''
702705
@@ -756,6 +759,8 @@
756PYTHON_PREFIX759PYTHON_PREFIX
757PYTHON_VERSION760PYTHON_VERSION
758PYTHON761PYTHON
762LOG_FILE_SIZE
763LOG_LEVEL
759ENABLE_RENDERING_FALSE764ENABLE_RENDERING_FALSE
760ENABLE_RENDERING_TRUE765ENABLE_RENDERING_TRUE
761ICONTOOL_RENDER766ICONTOOL_RENDER
@@ -911,6 +916,7 @@
911enable_libtool_lock916enable_libtool_lock
912enable_nls917enable_nls
913enable_rendering918enable_rendering
919enable_debug
914enable_pycentral920enable_pycentral
915with_protocol921with_protocol
916with_dbus_services922with_dbus_services
@@ -1470,7 +1476,7 @@
1470 # Omit some internal or obsolete options to make the list less imposing.1476 # Omit some internal or obsolete options to make the list less imposing.
1471 # This message is too long to be a string in the A/UX 3.1 sh.1477 # This message is too long to be a string in the A/UX 3.1 sh.
1472 cat <<_ACEOF1478 cat <<_ACEOF
1473\`configure' configures ubuntuone-client 1.1.0 to adapt to many kinds of systems.1479\`configure' configures ubuntuone-client 1.1.2 to adapt to many kinds of systems.
14741480
1475Usage: $0 [OPTION]... [VAR=VALUE]...1481Usage: $0 [OPTION]... [VAR=VALUE]...
14761482
@@ -1541,7 +1547,7 @@
15411547
1542if test -n "$ac_init_help"; then1548if test -n "$ac_init_help"; then
1543 case $ac_init_help in1549 case $ac_init_help in
1544 short | recursive ) echo "Configuration of ubuntuone-client 1.1.0:";;1550 short | recursive ) echo "Configuration of ubuntuone-client 1.1.2:";;
1545 esac1551 esac
1546 cat <<\_ACEOF1552 cat <<\_ACEOF
15471553
@@ -1557,8 +1563,9 @@
1557 optimize for fast installation [default=yes]1563 optimize for fast installation [default=yes]
1558 --disable-libtool-lock avoid locking (might break parallel builds)1564 --disable-libtool-lock avoid locking (might break parallel builds)
1559 --disable-nls do not use Native Language Support1565 --disable-nls do not use Native Language Support
1560 --enable-rendering Enable icon rendering default=auto1566 --enable-rendering Enable icon rendering [default=auto]
1561 --enable-pycentral Enable usage of pycentral default=disabled1567 --enable-debug Enable debug logging by default [default=auto]
1568 --enable-pycentral Enable usage of pycentral [default=disabled]
15621569
1563Optional Packages:1570Optional Packages:
1564 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]1571 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1566,7 +1573,7 @@
1566 --with-pic try to use only PIC/non-PIC objects [default=use1573 --with-pic try to use only PIC/non-PIC objects [default=use
1567 both]1574 both]
1568 --with-gnu-ld assume the C compiler uses GNU ld [default=no]1575 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1569 --with-protocol Specify path to storage protocol default=auto1576 --with-protocol Specify path to storage protocol [default=auto]
1570 --with-dbus-services=<dir>1577 --with-dbus-services=<dir>
1571 where D-BUS services directory is1578 where D-BUS services directory is
15721579
@@ -1576,7 +1583,7 @@
1576 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a1583 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1577 nonstandard directory <lib dir>1584 nonstandard directory <lib dir>
1578 LIBS libraries to pass to the linker, e.g. -l<library>1585 LIBS libraries to pass to the linker, e.g. -l<library>
1579 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if1586 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1580 you have headers in a nonstandard directory <include dir>1587 you have headers in a nonstandard directory <include dir>
1581 CPP C preprocessor1588 CPP C preprocessor
1582 PKG_CONFIG path to pkg-config utility1589 PKG_CONFIG path to pkg-config utility
@@ -1653,8 +1660,8 @@
1653test -n "$ac_init_help" && exit $ac_status1660test -n "$ac_init_help" && exit $ac_status
1654if $ac_init_version; then1661if $ac_init_version; then
1655 cat <<\_ACEOF1662 cat <<\_ACEOF
1656ubuntuone-client configure 1.1.01663ubuntuone-client configure 1.1.2
1657generated by GNU Autoconf 2.641664generated by GNU Autoconf 2.65
16581665
1659Copyright (C) 2009 Free Software Foundation, Inc.1666Copyright (C) 2009 Free Software Foundation, Inc.
1660This configure script is free software; the Free Software Foundation1667This configure script is free software; the Free Software Foundation
@@ -1701,7 +1708,7 @@
1701 ac_retval=11708 ac_retval=1
1702fi1709fi
1703 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}1710 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1704 return $ac_retval1711 as_fn_set_status $ac_retval
17051712
1706} # ac_fn_c_try_compile1713} # ac_fn_c_try_compile
17071714
@@ -1747,7 +1754,7 @@
1747 # left behind by Apple's compiler. We do this before executing the actions.1754 # left behind by Apple's compiler. We do this before executing the actions.
1748 rm -rf conftest.dSYM conftest_ipa8_conftest.oo1755 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1749 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}1756 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1750 return $ac_retval1757 as_fn_set_status $ac_retval
17511758
1752} # ac_fn_c_try_link1759} # ac_fn_c_try_link
17531760
@@ -1815,7 +1822,7 @@
1815 ac_retval=11822 ac_retval=1
1816fi1823fi
1817 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}1824 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1818 return $ac_retval1825 as_fn_set_status $ac_retval
18191826
1820} # ac_fn_c_try_cpp1827} # ac_fn_c_try_cpp
18211828
@@ -1857,7 +1864,7 @@
1857fi1864fi
1858 rm -rf conftest.dSYM conftest_ipa8_conftest.oo1865 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1859 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}1866 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1860 return $ac_retval1867 as_fn_set_status $ac_retval
18611868
1862} # ac_fn_c_try_run1869} # ac_fn_c_try_run
18631870
@@ -1931,8 +1938,8 @@
1931This file contains any messages produced by compilers while1938This file contains any messages produced by compilers while
1932running configure, to aid debugging if configure makes a mistake.1939running configure, to aid debugging if configure makes a mistake.
19331940
1934It was created by ubuntuone-client $as_me 1.1.0, which was1941It was created by ubuntuone-client $as_me 1.1.2, which was
1935generated by GNU Autoconf 2.64. Invocation command line was1942generated by GNU Autoconf 2.65. Invocation command line was
19361943
1937 $ $0 $@1944 $ $0 $@
19381945
@@ -2185,7 +2192,7 @@
2185for ac_site_file in "$ac_site_file1" "$ac_site_file2"2192for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2186do2193do
2187 test "x$ac_site_file" = xNONE && continue2194 test "x$ac_site_file" = xNONE && continue
2188 if test -r "$ac_site_file"; then2195 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2189 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&52196 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2190$as_echo "$as_me: loading site script $ac_site_file" >&6;}2197$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2191 sed 's/^/| /' "$ac_site_file" >&52198 sed 's/^/| /' "$ac_site_file" >&5
@@ -2194,9 +2201,9 @@
2194done2201done
21952202
2196if test -r "$cache_file"; then2203if test -r "$cache_file"; then
2197 # Some versions of bash will fail to source /dev/null (special2204 # Some versions of bash will fail to source /dev/null (special files
2198 # files actually), so we avoid doing that.2205 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2199 if test -f "$cache_file"; then2206 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2200 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&52207 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2201$as_echo "$as_me: loading cache $cache_file" >&6;}2208$as_echo "$as_me: loading cache $cache_file" >&6;}
2202 case $cache_file in2209 case $cache_file in
@@ -2617,6 +2624,7 @@
26172624
2618fi2625fi
26192626
2627 test -d ./--version && rmdir ./--version
2620 if test "${ac_cv_path_mkdir+set}" = set; then2628 if test "${ac_cv_path_mkdir+set}" = set; then
2621 MKDIR_P="$ac_cv_path_mkdir -p"2629 MKDIR_P="$ac_cv_path_mkdir -p"
2622 else2630 else
@@ -2624,7 +2632,6 @@
2624 # value for MKDIR_P within a source directory, because that will2632 # value for MKDIR_P within a source directory, because that will
2625 # break other packages using the cache if that directory is2633 # break other packages using the cache if that directory is
2626 # removed, or if the value is a relative name.2634 # removed, or if the value is a relative name.
2627 test -d ./--version && rmdir ./--version
2628 MKDIR_P="$ac_install_sh -d"2635 MKDIR_P="$ac_install_sh -d"
2629 fi2636 fi
2630fi2637fi
@@ -2741,7 +2748,7 @@
27412748
2742# Define the identity of the package.2749# Define the identity of the package.
2743 PACKAGE='ubuntuone-client'2750 PACKAGE='ubuntuone-client'
2744 VERSION='1.1.0'2751 VERSION='1.1.2'
27452752
27462753
2747cat >>confdefs.h <<_ACEOF2754cat >>confdefs.h <<_ACEOF
@@ -3168,32 +3175,30 @@
3168... rest of stderr output deleted ...3175... rest of stderr output deleted ...
3169 10q' conftest.err >conftest.er13176 10q' conftest.err >conftest.er1
3170 cat conftest.er1 >&53177 cat conftest.er1 >&5
3171 rm -f conftest.er1 conftest.err
3172 fi3178 fi
3179 rm -f conftest.er1 conftest.err
3173 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&53180 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3174 test $ac_status = 0; }3181 test $ac_status = 0; }
3175done3182done
31763183
3177cat confdefs.h - <<_ACEOF >conftest.$ac_ext3184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3178/* end confdefs.h. */3185/* end confdefs.h. */
3179#include <stdio.h>3186
3180int3187int
3181main ()3188main ()
3182{3189{
3183FILE *f = fopen ("conftest.out", "w");
3184 return ferror (f) || fclose (f) != 0;
31853190
3186 ;3191 ;
3187 return 0;3192 return 0;
3188}3193}
3189_ACEOF3194_ACEOF
3190ac_clean_files_save=$ac_clean_files3195ac_clean_files_save=$ac_clean_files
3191ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"3196ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3192# Try to create an executable without -o first, disregard a.out.3197# Try to create an executable without -o first, disregard a.out.
3193# It will help us diagnose broken compilers, and finding out an intuition3198# It will help us diagnose broken compilers, and finding out an intuition
3194# of exeext.3199# of exeext.
3195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&53200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3196$as_echo_n "checking for C compiler default output file name... " >&6; }3201$as_echo_n "checking whether the C compiler works... " >&6; }
3197ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`3202ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
31983203
3199# The possible output files:3204# The possible output files:
@@ -3255,10 +3260,10 @@
3255else3260else
3256 ac_file=''3261 ac_file=''
3257fi3262fi
3258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3259$as_echo "$ac_file" >&6; }
3260if test -z "$ac_file"; then :3263if test -z "$ac_file"; then :
3261 $as_echo "$as_me: failed program was:" >&53264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3265$as_echo "no" >&6; }
3266$as_echo "$as_me: failed program was:" >&5
3262sed 's/^/| /' conftest.$ac_ext >&53267sed 's/^/| /' conftest.$ac_ext >&5
32633268
3264{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&53269{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -3266,51 +3271,18 @@
3266{ as_fn_set_status 773271{ as_fn_set_status 77
3267as_fn_error "C compiler cannot create executables3272as_fn_error "C compiler cannot create executables
3268See \`config.log' for more details." "$LINENO" 5; }; }3273See \`config.log' for more details." "$LINENO" 5; }; }
3274else
3275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3276$as_echo "yes" >&6; }
3269fi3277fi
3278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3279$as_echo_n "checking for C compiler default output file name... " >&6; }
3280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3281$as_echo "$ac_file" >&6; }
3270ac_exeext=$ac_cv_exeext3282ac_exeext=$ac_cv_exeext
32713283
3272# Check that the compiler produces executables we can run. If not, either3284rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3273# the compiler is broken, or we cross compile.
3274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3275$as_echo_n "checking whether the C compiler works... " >&6; }
3276# If not cross compiling, check that we can run a simple program.
3277if test "$cross_compiling" != yes; then
3278 if { ac_try='./$ac_file'
3279 { { case "(($ac_try" in
3280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3281 *) ac_try_echo=$ac_try;;
3282esac
3283eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3284$as_echo "$ac_try_echo"; } >&5
3285 (eval "$ac_try") 2>&5
3286 ac_status=$?
3287 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3288 test $ac_status = 0; }; }; then
3289 cross_compiling=no
3290 else
3291 if test "$cross_compiling" = maybe; then
3292 cross_compiling=yes
3293 else
3294 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3296as_fn_error "cannot run C compiled programs.
3297If you meant to cross compile, use \`--host'.
3298See \`config.log' for more details." "$LINENO" 5; }
3299 fi
3300 fi
3301fi
3302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3303$as_echo "yes" >&6; }
3304
3305rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
3306ac_clean_files=$ac_clean_files_save3285ac_clean_files=$ac_clean_files_save
3307# Check that the compiler produces executables we can run. If not, either
3308# the compiler is broken, or we cross compile.
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3310$as_echo_n "checking whether we are cross compiling... " >&6; }
3311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3312$as_echo "$cross_compiling" >&6; }
3313
3314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&53286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3315$as_echo_n "checking for suffix of executables... " >&6; }3287$as_echo_n "checking for suffix of executables... " >&6; }
3316if { { ac_try="$ac_link"3288if { { ac_try="$ac_link"
@@ -3343,13 +3315,72 @@
3343as_fn_error "cannot compute suffix of executables: cannot compile and link3315as_fn_error "cannot compute suffix of executables: cannot compile and link
3344See \`config.log' for more details." "$LINENO" 5; }3316See \`config.log' for more details." "$LINENO" 5; }
3345fi3317fi
3346rm -f conftest$ac_cv_exeext3318rm -f conftest conftest$ac_cv_exeext
3347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&53319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3348$as_echo "$ac_cv_exeext" >&6; }3320$as_echo "$ac_cv_exeext" >&6; }
33493321
3350rm -f conftest.$ac_ext3322rm -f conftest.$ac_ext
3351EXEEXT=$ac_cv_exeext3323EXEEXT=$ac_cv_exeext
3352ac_exeext=$EXEEXT3324ac_exeext=$EXEEXT
3325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3326/* end confdefs.h. */
3327#include <stdio.h>
3328int
3329main ()
3330{
3331FILE *f = fopen ("conftest.out", "w");
3332 return ferror (f) || fclose (f) != 0;
3333
3334 ;
3335 return 0;
3336}
3337_ACEOF
3338ac_clean_files="$ac_clean_files conftest.out"
3339# Check that the compiler produces executables we can run. If not, either
3340# the compiler is broken, or we cross compile.
3341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3342$as_echo_n "checking whether we are cross compiling... " >&6; }
3343if test "$cross_compiling" != yes; then
3344 { { ac_try="$ac_link"
3345case "(($ac_try" in
3346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3347 *) ac_try_echo=$ac_try;;
3348esac
3349eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3350$as_echo "$ac_try_echo"; } >&5
3351 (eval "$ac_link") 2>&5
3352 ac_status=$?
3353 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3354 test $ac_status = 0; }
3355 if { ac_try='./conftest$ac_cv_exeext'
3356 { { case "(($ac_try" in
3357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3358 *) ac_try_echo=$ac_try;;
3359esac
3360eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3361$as_echo "$ac_try_echo"; } >&5
3362 (eval "$ac_try") 2>&5
3363 ac_status=$?
3364 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3365 test $ac_status = 0; }; }; then
3366 cross_compiling=no
3367 else
3368 if test "$cross_compiling" = maybe; then
3369 cross_compiling=yes
3370 else
3371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3372$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3373as_fn_error "cannot run C compiled programs.
3374If you meant to cross compile, use \`--host'.
3375See \`config.log' for more details." "$LINENO" 5; }
3376 fi
3377 fi
3378fi
3379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3380$as_echo "$cross_compiling" >&6; }
3381
3382rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3383ac_clean_files=$ac_clean_files_save
3353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&53384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3354$as_echo_n "checking for suffix of object files... " >&6; }3385$as_echo_n "checking for suffix of object files... " >&6; }
3355if test "${ac_cv_objext+set}" = set; then :3386if test "${ac_cv_objext+set}" = set; then :
@@ -4119,8 +4150,8 @@
4119... rest of stderr output deleted ...4150... rest of stderr output deleted ...
4120 10q' conftest.err >conftest.er14151 10q' conftest.err >conftest.er1
4121 cat conftest.er1 >&54152 cat conftest.er1 >&5
4122 rm -f conftest.er1 conftest.err
4123 fi4153 fi
4154 rm -f conftest.er1 conftest.err
4124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&54155 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4125 test $ac_status = 0; }4156 test $ac_status = 0; }
4126done4157done
@@ -4472,8 +4503,8 @@
44724503
44734504
44744505
4475macro_version='2.2.6'4506macro_version='2.2.6b'
4476macro_revision='1.3012'4507macro_revision='1.3017'
44774508
44784509
44794510
@@ -5144,13 +5175,13 @@
5144else5175else
5145 lt_cv_nm_interface="BSD nm"5176 lt_cv_nm_interface="BSD nm"
5146 echo "int some_variable = 0;" > conftest.$ac_ext5177 echo "int some_variable = 0;" > conftest.$ac_ext
5147 (eval echo "\"\$as_me:5147: $ac_compile\"" >&5)5178 (eval echo "\"\$as_me:5178: $ac_compile\"" >&5)
5148 (eval "$ac_compile" 2>conftest.err)5179 (eval "$ac_compile" 2>conftest.err)
5149 cat conftest.err >&55180 cat conftest.err >&5
5150 (eval echo "\"\$as_me:5150: $NM \\\"conftest.$ac_objext\\\"\"" >&5)5181 (eval echo "\"\$as_me:5181: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5151 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)5182 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5152 cat conftest.err >&55183 cat conftest.err >&5
5153 (eval echo "\"\$as_me:5153: output\"" >&5)5184 (eval echo "\"\$as_me:5184: output\"" >&5)
5154 cat conftest.out >&55185 cat conftest.out >&5
5155 if $GREP 'External.*some_variable' conftest.out > /dev/null; then5186 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5156 lt_cv_nm_interface="MS dumpbin"5187 lt_cv_nm_interface="MS dumpbin"
@@ -5616,7 +5647,7 @@
5616 ;;5647 ;;
56175648
5618# This must be Linux ELF.5649# This must be Linux ELF.
5619linux* | k*bsd*-gnu)5650linux* | k*bsd*-gnu | kopensolaris*-gnu)
5620 lt_cv_deplibs_check_method=pass_all5651 lt_cv_deplibs_check_method=pass_all
5621 ;;5652 ;;
56225653
@@ -6355,7 +6386,7 @@
6355 ;;6386 ;;
6356*-*-irix6*)6387*-*-irix6*)
6357 # Find out which ABI we are using.6388 # Find out which ABI we are using.
6358 echo '#line 6358 "configure"' > conftest.$ac_ext6389 echo '#line 6389 "configure"' > conftest.$ac_ext
6359 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&56390 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6360 (eval $ac_compile) 2>&56391 (eval $ac_compile) 2>&5
6361 ac_status=$?6392 ac_status=$?
@@ -7885,11 +7916,11 @@
7885 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \7916 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7886 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \7917 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7887 -e 's:$: $lt_compiler_flag:'`7918 -e 's:$: $lt_compiler_flag:'`
7888 (eval echo "\"\$as_me:7888: $lt_compile\"" >&5)7919 (eval echo "\"\$as_me:7919: $lt_compile\"" >&5)
7889 (eval "$lt_compile" 2>conftest.err)7920 (eval "$lt_compile" 2>conftest.err)
7890 ac_status=$?7921 ac_status=$?
7891 cat conftest.err >&57922 cat conftest.err >&5
7892 echo "$as_me:7892: \$? = $ac_status" >&57923 echo "$as_me:7923: \$? = $ac_status" >&5
7893 if (exit $ac_status) && test -s "$ac_outfile"; then7924 if (exit $ac_status) && test -s "$ac_outfile"; then
7894 # The compiler can only warn and ignore the option if not recognized7925 # The compiler can only warn and ignore the option if not recognized
7895 # So say no if there are warnings other than the usual output.7926 # So say no if there are warnings other than the usual output.
@@ -8054,7 +8085,7 @@
8054 lt_prog_compiler_static='-non_shared'8085 lt_prog_compiler_static='-non_shared'
8055 ;;8086 ;;
80568087
8057 linux* | k*bsd*-gnu)8088 linux* | k*bsd*-gnu | kopensolaris*-gnu)
8058 case $cc_basename in8089 case $cc_basename in
8059 # old Intel for x86_64 which still supported -KPIC.8090 # old Intel for x86_64 which still supported -KPIC.
8060 ecc*)8091 ecc*)
@@ -8224,11 +8255,11 @@
8224 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \8255 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8225 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \8256 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8226 -e 's:$: $lt_compiler_flag:'`8257 -e 's:$: $lt_compiler_flag:'`
8227 (eval echo "\"\$as_me:8227: $lt_compile\"" >&5)8258 (eval echo "\"\$as_me:8258: $lt_compile\"" >&5)
8228 (eval "$lt_compile" 2>conftest.err)8259 (eval "$lt_compile" 2>conftest.err)
8229 ac_status=$?8260 ac_status=$?
8230 cat conftest.err >&58261 cat conftest.err >&5
8231 echo "$as_me:8231: \$? = $ac_status" >&58262 echo "$as_me:8262: \$? = $ac_status" >&5
8232 if (exit $ac_status) && test -s "$ac_outfile"; then8263 if (exit $ac_status) && test -s "$ac_outfile"; then
8233 # The compiler can only warn and ignore the option if not recognized8264 # The compiler can only warn and ignore the option if not recognized
8234 # So say no if there are warnings other than the usual output.8265 # So say no if there are warnings other than the usual output.
@@ -8329,11 +8360,11 @@
8329 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \8360 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8330 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \8361 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8331 -e 's:$: $lt_compiler_flag:'`8362 -e 's:$: $lt_compiler_flag:'`
8332 (eval echo "\"\$as_me:8332: $lt_compile\"" >&5)8363 (eval echo "\"\$as_me:8363: $lt_compile\"" >&5)
8333 (eval "$lt_compile" 2>out/conftest.err)8364 (eval "$lt_compile" 2>out/conftest.err)
8334 ac_status=$?8365 ac_status=$?
8335 cat out/conftest.err >&58366 cat out/conftest.err >&5
8336 echo "$as_me:8336: \$? = $ac_status" >&58367 echo "$as_me:8367: \$? = $ac_status" >&5
8337 if (exit $ac_status) && test -s out/conftest2.$ac_objext8368 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8338 then8369 then
8339 # The compiler can only warn and ignore the option if not recognized8370 # The compiler can only warn and ignore the option if not recognized
@@ -8384,11 +8415,11 @@
8384 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \8415 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8385 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \8416 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8386 -e 's:$: $lt_compiler_flag:'`8417 -e 's:$: $lt_compiler_flag:'`
8387 (eval echo "\"\$as_me:8387: $lt_compile\"" >&5)8418 (eval echo "\"\$as_me:8418: $lt_compile\"" >&5)
8388 (eval "$lt_compile" 2>out/conftest.err)8419 (eval "$lt_compile" 2>out/conftest.err)
8389 ac_status=$?8420 ac_status=$?
8390 cat out/conftest.err >&58421 cat out/conftest.err >&5
8391 echo "$as_me:8391: \$? = $ac_status" >&58422 echo "$as_me:8422: \$? = $ac_status" >&5
8392 if (exit $ac_status) && test -s out/conftest2.$ac_objext8423 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8393 then8424 then
8394 # The compiler can only warn and ignore the option if not recognized8425 # The compiler can only warn and ignore the option if not recognized
@@ -8527,6 +8558,7 @@
8527 fi8558 fi
8528 supports_anon_versioning=no8559 supports_anon_versioning=no
8529 case `$LD -v 2>&1` in8560 case `$LD -v 2>&1` in
8561 *GNU\ gold*) supports_anon_versioning=yes ;;
8530 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.118562 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8531 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...8563 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8532 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...8564 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -8618,7 +8650,7 @@
8618 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'8650 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8619 ;;8651 ;;
86208652
8621 gnu* | linux* | tpf* | k*bsd*-gnu)8653 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8622 tmp_diet=no8654 tmp_diet=no
8623 if test "$host_os" = linux-dietlibc; then8655 if test "$host_os" = linux-dietlibc; then
8624 case $cc_basename in8656 case $cc_basename in
@@ -10080,7 +10112,7 @@
10080 ;;10112 ;;
1008110113
10082# This must be Linux ELF.10114# This must be Linux ELF.
10083linux* | k*bsd*-gnu)10115linux* | k*bsd*-gnu | kopensolaris*-gnu)
10084 version_type=linux10116 version_type=linux
10085 need_lib_prefix=no10117 need_lib_prefix=no
10086 need_version=no10118 need_version=no
@@ -10767,7 +10799,7 @@
10767 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=210799 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10768 lt_status=$lt_dlunknown10800 lt_status=$lt_dlunknown
10769 cat > conftest.$ac_ext <<_LT_EOF10801 cat > conftest.$ac_ext <<_LT_EOF
10770#line 10770 "configure"10802#line 10802 "configure"
10771#include "confdefs.h"10803#include "confdefs.h"
1077210804
10773#if HAVE_DLFCN_H10805#if HAVE_DLFCN_H
@@ -10863,7 +10895,7 @@
10863 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=210895 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10864 lt_status=$lt_dlunknown10896 lt_status=$lt_dlunknown
10865 cat > conftest.$ac_ext <<_LT_EOF10897 cat > conftest.$ac_ext <<_LT_EOF
10866#line 10866 "configure"10898#line 10898 "configure"
10867#include "confdefs.h"10899#include "confdefs.h"
1086810900
10869#if HAVE_DLFCN_H10901#if HAVE_DLFCN_H
@@ -11893,6 +11925,37 @@
11893fi11925fi
1189411926
1189511927
11928# Alter default logging if we're development vs. stable
11929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking development series build" >&5
11930$as_echo_n "checking development series build... " >&6; }
11931DEVVERSION="`echo $PACKAGE_VERSION|cut -d. -f2`"
11932if expr $DEVVERSION % 2 > /dev/null != "0"; then
11933 debugging=yes
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11935$as_echo "yes" >&6; }
11936else
11937 debugging=no
11938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11939$as_echo "no" >&6; }
11940fi
11941
11942# Check whether --enable-debug was given.
11943if test "${enable_debug+set}" = set; then :
11944 enableval=$enable_debug; enable_debug=$enableval
11945else
11946 enable_debug=$debugging
11947fi
11948
11949if test "x$enable_debug" != "xno"; then
11950 LOG_LEVEL="DEBUG"
11951 LOG_FILE_SIZE="10485760"
11952else
11953 LOG_LEVEL="INFO"
11954 LOG_FILE_SIZE="1048576"
11955fi
11956
11957
11958
11896# Check for python 2.511959# Check for python 2.5
1189711960
1189811961
@@ -12058,6 +12121,14 @@
12058 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`12121 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
12059 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`12122 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
12060 ;;12123 ;;
12124 *)
12125 case $am_py_prefix in
12126 /usr|/System*) ;;
12127 *)
12128 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
12129 ;;
12130 esac
12131 ;;
12061 esac12132 esac
1206212133
12063fi12134fi
@@ -12088,6 +12159,14 @@
12088 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`12159 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
12089 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`12160 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
12090 ;;12161 ;;
12162 *)
12163 case $am_py_exec_prefix in
12164 /usr|/System*) ;;
12165 *)
12166 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
12167 ;;
12168 esac
12169 ;;
12091 esac12170 esac
1209212171
12093fi12172fi
@@ -12167,12 +12246,12 @@
12167 pkg_cv_NAUTILUS_CFLAGS="$NAUTILUS_CFLAGS"12246 pkg_cv_NAUTILUS_CFLAGS="$NAUTILUS_CFLAGS"
12168 else12247 else
12169 if test -n "$PKG_CONFIG" && \12248 if test -n "$PKG_CONFIG" && \
12170 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnautilus-extension >= 2.6.0\""; } >&512249 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0\""; } >&5
12171 ($PKG_CONFIG --exists --print-errors "libnautilus-extension >= 2.6.0") 2>&512250 ($PKG_CONFIG --exists --print-errors "libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0") 2>&5
12172 ac_status=$?12251 ac_status=$?
12173 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&512252 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12174 test $ac_status = 0; }; then12253 test $ac_status = 0; }; then
12175 pkg_cv_NAUTILUS_CFLAGS=`$PKG_CONFIG --cflags "libnautilus-extension >= 2.6.0" 2>/dev/null`12254 pkg_cv_NAUTILUS_CFLAGS=`$PKG_CONFIG --cflags "libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0" 2>/dev/null`
12176else12255else
12177 pkg_failed=yes12256 pkg_failed=yes
12178fi12257fi
@@ -12185,12 +12264,12 @@
12185 pkg_cv_NAUTILUS_LIBS="$NAUTILUS_LIBS"12264 pkg_cv_NAUTILUS_LIBS="$NAUTILUS_LIBS"
12186 else12265 else
12187 if test -n "$PKG_CONFIG" && \12266 if test -n "$PKG_CONFIG" && \
12188 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnautilus-extension >= 2.6.0\""; } >&512267 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0\""; } >&5
12189 ($PKG_CONFIG --exists --print-errors "libnautilus-extension >= 2.6.0") 2>&512268 ($PKG_CONFIG --exists --print-errors "libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0") 2>&5
12190 ac_status=$?12269 ac_status=$?
12191 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&512270 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12192 test $ac_status = 0; }; then12271 test $ac_status = 0; }; then
12193 pkg_cv_NAUTILUS_LIBS=`$PKG_CONFIG --libs "libnautilus-extension >= 2.6.0" 2>/dev/null`12272 pkg_cv_NAUTILUS_LIBS=`$PKG_CONFIG --libs "libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0" 2>/dev/null`
12194else12273else
12195 pkg_failed=yes12274 pkg_failed=yes
12196fi12275fi
@@ -12209,14 +12288,14 @@
12209 _pkg_short_errors_supported=no12288 _pkg_short_errors_supported=no
12210fi12289fi
12211 if test $_pkg_short_errors_supported = yes; then12290 if test $_pkg_short_errors_supported = yes; then
12212 NAUTILUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libnautilus-extension >= 2.6.0"`12291 NAUTILUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0"`
12213 else12292 else
12214 NAUTILUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libnautilus-extension >= 2.6.0"`12293 NAUTILUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0"`
12215 fi12294 fi
12216 # Put the nasty error message in config.log where it belongs12295 # Put the nasty error message in config.log where it belongs
12217 echo "$NAUTILUS_PKG_ERRORS" >&512296 echo "$NAUTILUS_PKG_ERRORS" >&5
1221812297
12219 as_fn_error "Package requirements (libnautilus-extension >= 2.6.0) were not met:12298 as_fn_error "Package requirements (libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0) were not met:
1222012299
12221$NAUTILUS_PKG_ERRORS12300$NAUTILUS_PKG_ERRORS
1222212301
@@ -12893,8 +12972,8 @@
12893# report actual input values of CONFIG_FILES etc. instead of their12972# report actual input values of CONFIG_FILES etc. instead of their
12894# values after options handling.12973# values after options handling.
12895ac_log="12974ac_log="
12896This file was extended by ubuntuone-client $as_me 1.1.0, which was12975This file was extended by ubuntuone-client $as_me 1.1.2, which was
12897generated by GNU Autoconf 2.64. Invocation command line was12976generated by GNU Autoconf 2.65. Invocation command line was
1289812977
12899 CONFIG_FILES = $CONFIG_FILES12978 CONFIG_FILES = $CONFIG_FILES
12900 CONFIG_HEADERS = $CONFIG_HEADERS12979 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -12934,6 +13013,7 @@
1293413013
12935 -h, --help print this help, then exit13014 -h, --help print this help, then exit
12936 -V, --version print version number and configuration settings, then exit13015 -V, --version print version number and configuration settings, then exit
13016 --config print configuration, then exit
12937 -q, --quiet, --silent13017 -q, --quiet, --silent
12938 do not print progress messages13018 do not print progress messages
12939 -d, --debug don't remove temporary files13019 -d, --debug don't remove temporary files
@@ -12956,10 +13036,11 @@
1295613036
12957_ACEOF13037_ACEOF
12958cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=113038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13039ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
12959ac_cs_version="\\13040ac_cs_version="\\
12960ubuntuone-client config.status 1.1.013041ubuntuone-client config.status 1.1.2
12961configured by $0, generated by GNU Autoconf 2.64,13042configured by $0, generated by GNU Autoconf 2.65,
12962 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"13043 with options \\"\$ac_cs_config\\"
1296313044
12964Copyright (C) 2009 Free Software Foundation, Inc.13045Copyright (C) 2009 Free Software Foundation, Inc.
12965This config.status script is free software; the Free Software Foundation13046This config.status script is free software; the Free Software Foundation
@@ -12997,6 +13078,8 @@
12997 ac_cs_recheck=: ;;13078 ac_cs_recheck=: ;;
12998 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )13079 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12999 $as_echo "$ac_cs_version"; exit ;;13080 $as_echo "$ac_cs_version"; exit ;;
13081 --config | --confi | --conf | --con | --co | --c )
13082 $as_echo "$ac_cs_config"; exit ;;
13000 --debug | --debu | --deb | --de | --d | -d )13083 --debug | --debu | --deb | --de | --d | -d )
13001 debug=: ;;13084 debug=: ;;
13002 --file | --fil | --fi | --f )13085 --file | --fil | --fi | --f )
@@ -13444,7 +13527,7 @@
13444t delim13527t delim
13445:nl13528:nl
13446h13529h
13447s/\(.\{148\}\).*/\1/13530s/\(.\{148\}\)..*/\1/
13448t more113531t more1
13449s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/13532s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13450p13533p
@@ -13458,7 +13541,7 @@
13458t nl13541t nl
13459:delim13542:delim
13460h13543h
13461s/\(.\{148\}\).*/\1/13544s/\(.\{148\}\)..*/\1/
13462t more213545t more2
13463s/["\\]/\\&/g; s/^/"/; s/$/"/13546s/["\\]/\\&/g; s/^/"/; s/$/"/
13464p13547p
1346513548
=== modified file 'configure.ac'
--- configure.ac 2009-12-07 17:35:00 +0000
+++ configure.ac 2010-02-18 00:10:25 +0000
@@ -1,7 +1,7 @@
1dnl Process this file with autoconf to produce a configure script.1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.53)2AC_PREREQ(2.53)
33
4AC_INIT([ubuntuone-client], [1.1.0])4AC_INIT([ubuntuone-client], [1.1.2])
5AC_CONFIG_SRCDIR([config.h.in])5AC_CONFIG_SRCDIR([config.h.in])
66
7AM_INIT_AUTOMAKE([1.10 foreign])7AM_INIT_AUTOMAKE([1.10 foreign])
@@ -46,6 +46,32 @@
46fi46fi
47AM_CONDITIONAL(ENABLE_RENDERING, test "x$enable_rendering" = "xyes")47AM_CONDITIONAL(ENABLE_RENDERING, test "x$enable_rendering" = "xyes")
4848
49# Alter default logging if we're development vs. stable
50AC_MSG_CHECKING([development series build])
51DEVVERSION="`echo $PACKAGE_VERSION|cut -d. -f2`"
52if expr $DEVVERSION % 2 > /dev/null != "0"; then
53 debugging=yes
54 AC_MSG_RESULT([yes])
55else
56 debugging=no
57 AC_MSG_RESULT([no])
58fi
59
60AC_ARG_ENABLE([debug],
61 AC_HELP_STRING([--enable-debug],
62 [Enable debug logging by default [default=auto]]),
63 enable_debug=$enableval,
64 enable_debug=$debugging)
65if test "x$enable_debug" != "xno"; then
66 LOG_LEVEL="DEBUG"
67 LOG_FILE_SIZE="10485760"
68else
69 LOG_LEVEL="INFO"
70 LOG_FILE_SIZE="1048576"
71fi
72AC_SUBST(LOG_LEVEL)
73AC_SUBST(LOG_FILE_SIZE)
74
49# Check for python 2.575# Check for python 2.5
50AM_PATH_PYTHON([2.5])76AM_PATH_PYTHON([2.5])
5177
@@ -90,7 +116,7 @@
90AC_SUBST(USP_PATH)116AC_SUBST(USP_PATH)
91117
92# Stuff we need to build the extension shlib118# Stuff we need to build the extension shlib
93PKG_CHECK_MODULES(NAUTILUS, [libnautilus-extension >= 2.6.0])119PKG_CHECK_MODULES(NAUTILUS, [libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0])
94AC_SUBST(NAUTILUS_CFLAGS)120AC_SUBST(NAUTILUS_CFLAGS)
95AC_SUBST(NAUTILUS_LIBS)121AC_SUBST(NAUTILUS_LIBS)
96122
97123
=== modified file 'contrib/__init__.pyc'
98Binary files contrib/__init__.pyc 2009-12-07 17:35:00 +0000 and contrib/__init__.pyc 2010-02-18 00:10:25 +0000 differ124Binary files contrib/__init__.pyc 2009-12-07 17:35:00 +0000 and contrib/__init__.pyc 2010-02-18 00:10:25 +0000 differ
=== added file 'contrib/dbus-docs'
--- contrib/dbus-docs 1970-01-01 00:00:00 +0000
+++ contrib/dbus-docs 2010-02-18 00:10:25 +0000
@@ -0,0 +1,196 @@
1#!/usr/bin/env python
2#
3# Author: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>
4#
5# Copyright 2009 Canonical Ltd.
6#
7# This program is free software: you can redistribute it and/or modify it
8# under the terms of the GNU General Public License version 3, as published
9# by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranties of
13# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14# PURPOSE. See the GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program. If not, see <http://www.gnu.org/licenses/>.
18
19from twisted.internet import glib2reactor
20glib2reactor.install()
21
22import sys
23import os
24import signal
25import dbus
26import subprocess
27import shutil
28
29from xml.etree import ElementTree
30
31sys.path.insert(0, os.path.abspath("."))
32
33from contrib.dbus_util import DBusRunner
34from contrib.testing.testcase import (
35 FakeMain,
36 DBusGMainLoop,
37 DBusInterface,
38 FakeNetworkManager,
39)
40
41from ubuntuone.syncdaemon.dbus_interface import (
42 DBUS_IFACE_SYNC_NAME,
43 DBUS_IFACE_STATUS_NAME,
44 DBUS_IFACE_EVENTS_NAME,
45 DBUS_IFACE_FS_NAME,
46 DBUS_IFACE_SHARES_NAME,
47 DBUS_IFACE_CONFIG_NAME,
48 DBUS_IFACE_FOLDERS_NAME,
49)
50from ubuntuone.syncdaemon.tools import DBusClient
51from twisted.internet import reactor, defer
52
53
54iface_path = ((DBUS_IFACE_SYNC_NAME, '/'), (DBUS_IFACE_CONFIG_NAME, '/config'),
55 (DBUS_IFACE_EVENTS_NAME, '/events'),
56 (DBUS_IFACE_FS_NAME, '/filesystem'),
57 (DBUS_IFACE_SHARES_NAME, '/shares'),
58 (DBUS_IFACE_STATUS_NAME, '/status'),
59 (DBUS_IFACE_FOLDERS_NAME, '/folders'),
60 )
61
62
63def parse_introspect_data(xml):
64 """Parse the xml returned by Introspect and returns a dict"""
65 info = dict()
66 e = ElementTree.fromstring(xml)
67 for c in e.findall('interface'):
68 # ignore other interfaces
69 if not c.attrib['name'].startswith('com.ubuntuone'):
70 continue
71 iface_name = c.attrib['name']
72 info[iface_name] = dict()
73 # methods
74 methods = dict()
75 for method in c.findall('method'):
76 meth_name = method.attrib['name']
77 args = []
78 for arg in method.findall('arg'):
79 dir = arg.attrib['direction']
80 type = arg.attrib['type']
81 if 'name' in arg.attrib:
82 name = arg.attrib['name']
83 args.append((type, dir, name))
84 else:
85 args.append((type, dir))
86 docstrings = method.findall('docstring')
87 docstring = docstrings[0].text if docstrings else 'No docstring'
88 methods[meth_name] = dict(args=args, docstring=docstring)
89 info[iface_name]['methods'] = methods
90 # signals
91 signals = dict()
92 for signal in c.findall('signal'):
93 sig_name = signal.attrib['name']
94 args = []
95 for arg in signal.findall('arg'):
96 type = arg.attrib['type']
97 name = arg.attrib['name']
98 args.append((type, name))
99 docstrings = signal.findall('docstring')
100 docstring = docstrings[0].text if docstrings else 'No docstring'
101 signals[sig_name] = dict(args=args, docstring=docstring)
102 info[iface_name]['signals'] = signals
103 return info
104
105
106def get_info(path):
107 """Get all the introspectable info from 'path'"""
108 d = defer.Deferred()
109 client = DBusClient(bus, path, 'org.freedesktop.DBus.Introspectable')
110 client.call_method('Introspect', reply_handler=d.callback,
111 error_handler=d.errback)
112 return d
113
114
115def dump_to_stream(info_by_path, stream):
116 print >>stream, "SyncDaemon DBus API\n"
117 for path, interfaces in info_by_path.items():
118 print >>stream, "Object path: %s" % path
119 for iface_name, kinds in interfaces.items():
120 print >>stream, " Interface: %s" % iface_name
121 print >>stream, " Methods:"
122 for meth_name, val in kinds['methods'].items():
123 in_args = ','.join([arg[2] + '=' + arg[0] for arg in
124 val['args'] if arg[1] == 'in'])
125 out_args = ','.join([arg[0] for arg in val['args']
126 if arg[1] == 'out'])
127 if out_args and in_args:
128 print >>stream, " %s(%s) -> %s" % (meth_name, in_args,
129 out_args)
130 elif in_args:
131 print >>stream, " %s(%s)" % (meth_name, in_args)
132 else:
133 print >>stream, " %s()" % meth_name
134 print >>stream, " %s\n" % val['docstring']
135 print >>stream, " Signals:"
136 for signal_name, val in kinds['signals'].items():
137 in_args = ','.join([arg[1] + '=' + arg[0] \
138 for arg in val['args']])
139 if in_args:
140 print >>stream, " %s(%s)" % (signal_name, in_args)
141 else:
142 print >>stream, " %s(%s)" % signal_name
143 print >>stream, " %s\n" % val['docstring']
144
145
146@defer.inlineCallbacks
147def main(bus):
148 """Entry point"""
149 info_by_path = dict()
150 for iface, path in iface_path:
151 xml = yield get_info(path)
152 obj_info = parse_introspect_data(xml)
153 info_by_path[path] = obj_info
154 dest_file = os.path.join(os.getcwd(), 'docs', 'syncdaemon_dbus_api.txt')
155 with open(dest_file, 'w') as f:
156 dump_to_stream(info_by_path, f)
157 reactor.stop()
158
159
160def start_syncdaemon(tmp_dir):
161 """Starts a syncdaemon instance just like the one used in the test suite"""
162 xdg_cache = os.path.join(tmp_dir, 'xdg_cache')
163 data_dir = os.path.join(xdg_cache, 'data')
164 partials_dir = os.path.join(xdg_cache, 'partials')
165 root_dir = os.path.join(tmp_dir, 'root')
166 shares_dir = os.path.join(tmp_dir, 'shares')
167 main = FakeMain(root_dir, shares_dir, data_dir, partials_dir)
168 loop = DBusGMainLoop(set_as_default=True)
169 bus = dbus.bus.BusConnection(mainloop=loop)
170 nm = FakeNetworkManager(bus)
171 dbus_iface = DBusInterface(bus, main, system_bus=bus)
172 main.dbus_iface = dbus_iface
173 return main, bus
174
175
176if __name__ == '__main__':
177 dbus_runner = DBusRunner()
178 dbus_runner.startDBus()
179 tmp_dir = os.path.join(os.getcwd(), 'tmp')
180 try:
181
182 m, bus = start_syncdaemon(tmp_dir)
183 try:
184 reactor.callWhenRunning(main, bus)
185 reactor.run()
186 finally:
187 m.quit()
188 finally:
189 dbus_runner.stopDBus()
190 # remove the tmp dir
191 os.chmod(tmp_dir, 0777)
192 for dirpath, dirs, _ in os.walk(tmp_dir):
193 for dir in dirs:
194 os.chmod(os.path.join(dirpath, dir), 0777)
195 shutil.rmtree(tmp_dir)
196
0197
=== added file 'contrib/dbus_util.py'
--- contrib/dbus_util.py 1970-01-01 00:00:00 +0000
+++ contrib/dbus_util.py 2010-02-18 00:10:25 +0000
@@ -0,0 +1,72 @@
1#
2# Author: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>
3#
4# Copyright 2009 Canonical Ltd.
5#
6# This program is free software: you can redistribute it and/or modify it
7# under the terms of the GNU General Public License version 3, as published
8# by the Free Software Foundation.
9#
10# This program is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranties of
12# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13# PURPOSE. See the GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License along
16# with this program. If not, see <http://www.gnu.org/licenses/>.
17
18import os
19import signal
20import subprocess
21
22from distutils.spawn import find_executable
23
24
25class DBusLaunchError(Exception):
26 """Error while launching dbus-daemon"""
27 pass
28
29class NotFoundError(Exception):
30 """Not found error"""
31 pass
32
33
34class DBusRunner(object):
35
36 def __init__(self):
37 self.dbus_address = None
38 self.dbus_pid = None
39 self.running = False
40
41 def startDBus(self):
42 """Start our own session bus daemon for testing."""
43 dbus = find_executable("dbus-daemon")
44 if not dbus:
45 raise NotFoundError("dbus-daemon was not found.")
46
47 config_file = os.path.join(os.getcwd(), "contrib", "testing",
48 "dbus-session.conf")
49 dbus_args = ["--fork",
50 "--config-file=" + config_file,
51 "--print-address=1",
52 "--print-pid=2"]
53 p = subprocess.Popen([dbus] + dbus_args,
54 bufsize=4096, stdout=subprocess.PIPE,
55 stderr=subprocess.PIPE)
56
57 self.dbus_address = "".join(p.stdout.readlines()).strip()
58 self.dbus_pid = int("".join(p.stderr.readlines()).strip())
59
60 if self.dbus_address != "":
61 os.environ["DBUS_SESSION_BUS_ADDRESS"] = self.dbus_address
62 else:
63 os.kill(self.dbus_pid, signal.SIGKILL)
64 raise DBusLaunchError("There was a problem launching dbus-daemon.")
65 self.running = True
66
67 def stopDBus(self):
68 """Stop our DBus session bus daemon."""
69 del os.environ["DBUS_SESSION_BUS_ADDRESS"]
70 os.kill(self.dbus_pid, signal.SIGKILL)
71 self.running = False
72
073
=== added file 'contrib/dbus_util.pyc'
1Binary files contrib/dbus_util.pyc 1970-01-01 00:00:00 +0000 and contrib/dbus_util.pyc 2010-02-18 00:10:25 +0000 differ74Binary files contrib/dbus_util.pyc 1970-01-01 00:00:00 +0000 and contrib/dbus_util.pyc 2010-02-18 00:10:25 +0000 differ
=== modified file 'contrib/mocker.pyc'
2Binary files contrib/mocker.pyc 2009-12-07 17:35:00 +0000 and contrib/mocker.pyc 2010-02-18 00:10:25 +0000 differ75Binary files contrib/mocker.pyc 2009-12-07 17:35:00 +0000 and contrib/mocker.pyc 2010-02-18 00:10:25 +0000 differ
=== modified file 'contrib/test'
--- contrib/test 2009-12-07 17:35:00 +0000
+++ contrib/test 2010-02-18 00:10:25 +0000
@@ -66,37 +66,7 @@
66 suite.addTests(module_suite)66 suite.addTests(module_suite)
67 return suite67 return suite
6868
69 def startDBus(self):69 def run(self, testpath, test_pattern=None, loops=None):
70 """Start our own session bus daemon for testing."""
71 dbus = find_executable("dbus-daemon")
72 if not dbus:
73 raise NotFoundError("dbus-daemon was not found.")
74
75 config_file = os.path.join(os.getcwd(), "contrib", "testing",
76 "dbus-session.conf")
77 dbus_args = ["--fork",
78 "--config-file=" + config_file,
79 "--print-address=1",
80 "--print-pid=2"]
81 p = subprocess.Popen([dbus] + dbus_args,
82 bufsize=4096, stdout=subprocess.PIPE,
83 stderr=subprocess.PIPE)
84
85 self.dbus_address = "".join(p.stdout.readlines()).strip()
86 self.dbus_pid = int("".join(p.stderr.readlines()).strip())
87
88 if self.dbus_address != "":
89 os.environ["DBUS_SESSION_BUS_ADDRESS"] = self.dbus_address
90 else:
91 os.kill(self.dbus_pid, signal.SIGKILL)
92 raise DBusLaunchError("There was a problem launching dbus-daemon.")
93
94 def stopDBus(self):
95 """Stop our DBus session bus daemon."""
96 del os.environ["DBUS_SESSION_BUS_ADDRESS"]
97 os.kill(self.dbus_pid, signal.SIGKILL)
98
99 def run(self, testpath, test_pattern=None):
100 """run the tests. """70 """run the tests. """
101 # install the glib2reactor before any import of the reactor to avoid71 # install the glib2reactor before any import of the reactor to avoid
102 # using the default SelectReactor and be able to run the dbus tests72 # using the default SelectReactor and be able to run the dbus tests
@@ -106,7 +76,9 @@
106 from twisted.trial.reporter import TreeReporter76 from twisted.trial.reporter import TreeReporter
107 from twisted.trial.runner import TrialRunner77 from twisted.trial.runner import TrialRunner
10878
109 self.startDBus()79 from contrib.dbus_util import DBusRunner
80 dbus_runner = DBusRunner()
81 dbus_runner.startDBus()
11082
111 workingDirectory = os.path.join(os.getcwd(), "_trial_temp", "tmp")83 workingDirectory = os.path.join(os.getcwd(), "_trial_temp", "tmp")
112 runner = TrialRunner(reporterFactory=TreeReporter, realTimeErrors=True,84 runner = TrialRunner(reporterFactory=TreeReporter, realTimeErrors=True,
@@ -115,17 +87,22 @@
115 # setup a custom XDG_CACHE_HOME and create the logs directory87 # setup a custom XDG_CACHE_HOME and create the logs directory
116 xdg_cache = os.path.join(os.getcwd(), "_trial_temp", "xdg_cache")88 xdg_cache = os.path.join(os.getcwd(), "_trial_temp", "xdg_cache")
117 os.environ["XDG_CACHE_HOME"] = xdg_cache89 os.environ["XDG_CACHE_HOME"] = xdg_cache
118 # setup the ROOT_DIR env var90 # setup the ROOTDIR env var
119 os.environ['ROOT_DIR'] = os.getcwd()91 os.environ['ROOTDIR'] = os.getcwd()
120 if not os.path.exists(xdg_cache):92 if not os.path.exists(xdg_cache):
121 os.makedirs(xdg_cache)93 os.makedirs(xdg_cache)
122 success = 094 success = 0
123 try:95 try:
124 suite = self._collect_tests(testpath, test_pattern)96 suite = self._collect_tests(testpath, test_pattern)
97 if loops:
98 old_suite = suite
99 suite = unittest.TestSuite()
100 for x in xrange(loops):
101 suite.addTest(old_suite)
125 result = runner.run(suite)102 result = runner.run(suite)
126 success = result.wasSuccessful()103 success = result.wasSuccessful()
127 finally:104 finally:
128 self.stopDBus()105 dbus_runner.stopDBus()
129 if not success:106 if not success:
130 sys.exit(1)107 sys.exit(1)
131 else:108 else:
@@ -138,6 +115,9 @@
138 parser = OptionParser(usage=usage)115 parser = OptionParser(usage=usage)
139 parser.add_option("-t", "--test", dest="test",116 parser.add_option("-t", "--test", dest="test",
140 help = "run specific tests, e.g: className.methodName")117 help = "run specific tests, e.g: className.methodName")
118 parser.add_option("-l", "--loop", dest="loops", type="int", default=1,
119 help = "loop selected tests LOOPS number of times",
120 metavar="LOOPS")
141121
142 (options, args) = parser.parse_args()122 (options, args) = parser.parse_args()
143 if args:123 if args:
@@ -147,4 +127,4 @@
147 sys.exit()127 sys.exit()
148 else:128 else:
149 testpath = None129 testpath = None
150 TestRunner().run(testpath, options.test) 130 TestRunner().run(testpath, options.test, options.loops)
151131
=== modified file 'contrib/testing/__init__.pyc'
152Binary files contrib/testing/__init__.pyc 2009-12-07 17:35:00 +0000 and contrib/testing/__init__.pyc 2010-02-18 00:10:25 +0000 differ132Binary files contrib/testing/__init__.pyc 2009-12-07 17:35:00 +0000 and contrib/testing/__init__.pyc 2010-02-18 00:10:25 +0000 differ
=== modified file 'contrib/testing/testcase.py'
--- contrib/testing/testcase.py 2009-10-16 13:35:00 +0000
+++ contrib/testing/testcase.py 2010-02-18 00:10:25 +0000
@@ -19,11 +19,12 @@
1919
20import dbus20import dbus
21from dbus.mainloop.glib import DBusGMainLoop21from dbus.mainloop.glib import DBusGMainLoop
22import contextlib
22import logging23import logging
23import os24import os
24import shutil25import shutil
2526
2627from ubuntuone.oauthdesktop.main import Login, LoginProcessor
27from ubuntuone.syncdaemon import (28from ubuntuone.syncdaemon import (
28 config,29 config,
29 action_queue,30 action_queue,
@@ -32,16 +33,33 @@
32 interfaces,33 interfaces,
33 volume_manager,34 volume_manager,
34 main,35 main,
36 local_rescan,
35)37)
36from ubuntuone.syncdaemon.dbus_interface import (38from ubuntuone.syncdaemon.dbus_interface import (
37 DBusInterface,39 DBusInterface,
38 DBusExposedObject,40 DBusExposedObject,
39 NM_STATE_CONNECTED,41 NM_STATE_CONNECTED,
40 NM_STATE_DISCONNECTED,42 NM_STATE_DISCONNECTED,
43 DBUS_IFACE_AUTH_NAME,
41)44)
42from twisted.internet import defer45from twisted.internet import defer
46from twisted.python import failure
43from twisted.trial.unittest import TestCase as TwistedTestCase47from twisted.trial.unittest import TestCase as TwistedTestCase
44from zope.interface import implements48from zope.interface import implements
49from oauth import oauth
50
51
52@contextlib.contextmanager
53def environ(env_var, new_value):
54 """context manager to replace/add an environ value"""
55 old_value = os.environ.get(env_var, None)
56 os.environ[env_var] = new_value
57 yield
58 if old_value is None:
59 os.environ.pop(env_var)
60 else:
61 os.environ[env_var] = old_value
62
4563
46class FakeOAuthClient(object):64class FakeOAuthClient(object):
47 """ Fake OAuthClient"""65 """ Fake OAuthClient"""
@@ -49,7 +67,7 @@
49 def __init__(self, realm):67 def __init__(self, realm):
50 """ create the instance. """68 """ create the instance. """
51 self.realm = realm69 self.realm = realm
52 self.consumer = 'ubuntuone'70 self.consumer = oauth.OAuthConsumer('ubuntuone', 'hammertime')
5371
54 def get_access_token(self):72 def get_access_token(self):
55 """ returns a Token"""73 """ returns a Token"""
@@ -103,13 +121,15 @@
103 self.partials_dir, self.vm)121 self.partials_dir, self.vm)
104 self.event_q = event_queue.EventQueue(self.fs)122 self.event_q = event_queue.EventQueue(self.fs)
105 self.fs.register_eq(self.event_q)123 self.fs.register_eq(self.event_q)
106 self.action_q = FakeActionQueue(self.event_q)124 self.action_q = FakeActionQueue(self.event_q, main=self)
107 self.state = main.SyncDaemonStateManager(self, 2, 0)125 self.state = main.SyncDaemonStateManager(self, 2, 0)
108 self.event_q.subscribe(self.vm)126 self.event_q.subscribe(self.vm)
109 self.vm.init_root()127 self.vm.init_root()
110 self.hash_q = FakeHashQueue()128 self.hash_q = FakeHashQueue()
111 self.mark = FakeMark()129 self.mark = FakeMark()
112 self.dbus_iface = FakeDBusInterface()130 self.dbus_iface = FakeDBusInterface()
131 self.lr = local_rescan.LocalRescan(self.vm, self.fs,
132 self.event_q, self.action_q)
113133
114 def _connect_aq(self, token):134 def _connect_aq(self, token):
115 """ Connect the fake action queue """135 """ Connect the fake action queue """
@@ -193,14 +213,18 @@
193213
194 def setUp(self):214 def setUp(self):
195 TwistedTestCase.setUp(self)215 TwistedTestCase.setUp(self)
196 # invalidate the current config216 # use the config from the branch
217 self.old_get_config_files = config.get_config_files
218 config.get_config_files = lambda: [os.path.join(os.environ['ROOTDIR'],
219 'data', 'syncdaemon.conf')]
220 # fake a very basic config file with sane defaults for the tests
197 config_file = os.path.join(self.mktemp('config'), 'syncdaemon.conf')221 config_file = os.path.join(self.mktemp('config'), 'syncdaemon.conf')
198 # fake a very basic config file with sane defaults for the tests
199 with open(config_file, 'w') as fp:222 with open(config_file, 'w') as fp:
200 fp.write('[bandwidth_throttling]\n')223 fp.write('[bandwidth_throttling]\n')
201 fp.write('on = False\n')224 fp.write('on = False\n')
202 fp.write('read_limit = -1\n')225 fp.write('read_limit = -1\n')
203 fp.write('write_limit = -1\n')226 fp.write('write_limit = -1\n')
227 # invalidate the current config
204 config._user_config = None228 config._user_config = None
205 config.get_user_config(config_file=config_file)229 config.get_user_config(config_file=config_file)
206230
@@ -208,7 +232,8 @@
208 """ cleanup the temp dir. """232 """ cleanup the temp dir. """
209 # invalidate the current config233 # invalidate the current config
210 config._user_config = None234 config._user_config = None
211 config.get_user_config()235 # restore the old get_config_files
236 config.get_config_files = self.old_get_config_files
212 if hasattr(self, '__root'):237 if hasattr(self, '__root'):
213 self.rmtree(self.__root)238 self.rmtree(self.__root)
214 return TwistedTestCase.tearDown(self)239 return TwistedTestCase.tearDown(self)
@@ -253,7 +278,7 @@
253278
254 def tearDown(self):279 def tearDown(self):
255 """ Cleanup the test. """280 """ Cleanup the test. """
256 d = self.cleanup_signal_receivers()281 d = self.cleanup_signal_receivers(self.signal_receivers)
257 d.addBoth(self._tearDown)282 d.addBoth(self._tearDown)
258 d.addBoth(lambda _: BaseTwistedTestCase.tearDown(self))283 d.addBoth(lambda _: BaseTwistedTestCase.tearDown(self))
259 return d284 return d
@@ -272,18 +297,22 @@
272 self.log.info("finished test %s.%s", self.__class__.__name__,297 self.log.info("finished test %s.%s", self.__class__.__name__,
273 self._testMethodName)298 self._testMethodName)
274299
275 def error_handler(self, *error):300 def error_handler(self, error):
276 """ default error handler for DBus calls. """301 """ default error handler for DBus calls. """
277 self.fail(error)302 if isinstance(error, failure.Failure):
303 self.fail(error.getErrorMessage())
304 else:
305 self.fail(str(error))
278306
279 def cleanup_signal_receivers(self):307 def cleanup_signal_receivers(self, signal_receivers):
280 """ cleanup self.signal_receivers and returns a deferred """308 """ cleanup self.signal_receivers and returns a deferred """
281 deferreds = []309 deferreds = []
282 for match in self.signal_receivers:310 for match in signal_receivers:
283 d = defer.Deferred()311 d = defer.Deferred()
284 def callback(*args):312 def callback(*args):
285 """ callback that accepts *args. """313 """ callback that accepts *args. """
286 d.callback(args)314 if not d.called:
315 d.callback(args)
287 self.bus.call_async(dbus.bus.BUS_DAEMON_NAME,316 self.bus.call_async(dbus.bus.BUS_DAEMON_NAME,
288 dbus.bus.BUS_DAEMON_PATH,317 dbus.bus.BUS_DAEMON_PATH,
289 dbus.bus.BUS_DAEMON_IFACE, 'RemoveMatch', 's',318 dbus.bus.BUS_DAEMON_IFACE, 'RemoveMatch', 's',
@@ -297,14 +326,15 @@
297326
298327
299class FakeActionQueue(object):328class FakeActionQueue(object):
300 """ stub implementation """329 """Stub implementation."""
301330
302 implements(interfaces.IActionQueue)331 implements(interfaces.IActionQueue)
303332
304 def __init__(self, eq, *args, **kwargs):333 def __init__(self, eq, *args, **kwargs):
305 """ Creates the instance """334 """ Creates the instance """
306 self.eq = self.event_queue = eq335 self.eq = self.event_queue = eq
307 self.client = action_queue.ActionQueueProtocol()336 self.client = action_queue.ActionQueue.protocol()
337 self.client.disconnect = lambda: None
308 self.uploading = {}338 self.uploading = {}
309 self.downloading = {}339 self.downloading = {}
310 # pylint: disable-msg=C0103340 # pylint: disable-msg=C0103
@@ -324,76 +354,68 @@
324 self.throttling = False354 self.throttling = False
325355
326 def connect(self, host=None, port=None, user_ssl=False):356 def connect(self, host=None, port=None, user_ssl=False):
327 """ stub implementation """357 """Stub implementation."""
328 self.eq.push('SYS_CONNECTION_MADE')358 self.eq.push('SYS_CONNECTION_MADE')
329359
330 def disconnect(self):360 def disconnect(self):
331 """ stub implementation """361 """Stub implementation."""
332 pass
333362
334 def enable_throttling(self, value):363 def enable_throttling(self, value):
335 self.throttling = value364 self.throttling = value
336365
337 def cancel_download(self, share_id, node_id):366 def cancel_download(self, share_id, node_id):
338 """ stub implementation """367 """Stub implementation."""
339 pass
340368
341 def cancel_upload(self, share_id, node_id):369 def cancel_upload(self, share_id, node_id):
342 """ stub implementation """370 """Stub implementation."""
343 pass
344371
345 def download(self, share_id, node_id, server_hash, fileobj):372 def download(self, share_id, node_id, server_hash, fileobj):
346 """ stub implementation """373 """Stub implementation."""
347 pass
348374
349 def upload(self, share_id, node_id, previous_hash, hash, crc32,375 def upload(self, share_id, node_id, previous_hash, hash, crc32,
350 size, deflated_size, fileobj):376 size, deflated_size, fileobj):
351 """ stub implementation """377 """Stub implementation."""
352 pass
353378
354 def make_file(self, share_id, parent_id, name, marker):379 def make_file(self, share_id, parent_id, name, marker):
355 """ stub implementation """380 """Stub implementation."""
356 pass
357381
358 def make_dir(self, share_id, parent_id, name, marker):382 def make_dir(self, share_id, parent_id, name, marker):
359 """ stub implementation """383 """Stub implementation."""
360 pass
361384
362 def move(self, share_id, node_id, old_parent_id, new_parent_id, new_name):385 def move(self, share_id, node_id, old_parent_id, new_parent_id, new_name):
363 """ stub implementation """386 """Stub implementation."""
364 pass
365387
366 def unlink(self, share_id, node_id):388 def unlink(self, share_id, node_id):
367 """ stub implementation """389 """Stub implementation."""
368 pass
369390
370 def query(self, items):391 def query(self, items):
371 """ stub implementation """392 """Stub implementation."""
372 pass
373393
374 def listdir(self, share_id, node_id, server_hash, fileobj):394 def listdir(self, share_id, node_id, server_hash, fileobj):
375 """ stub implementation """395 """Stub implementation."""
376 pass
377396
378 def list_shares(self):397 def list_shares(self):
398 """Stub implementation."""
399
400 def list_volumes(self):
379 """ stub implementation """401 """ stub implementation """
380 pass402 pass
381403
382 def answer_share(self, share_id, answer):404 def answer_share(self, share_id, answer):
383 """ stub implementation """405 """Stub implementation."""
384 self.eq.push('AQ_ANSWER_SHARE_OK', share_id, answer)406 self.eq.push('AQ_ANSWER_SHARE_OK', share_id, answer)
385407
386 def create_share(self, *args):408 def create_share(self, *args):
387 """ sutb implementation """409 """ sutb implementation """
388 pass
389410
390 def inquire_free_space(self, share_id):411 def inquire_free_space(self, share_id):
391 """ stub implementation """412 """Stub implementation."""
392 pass
393413
394 def inquire_account_info(self):414 def inquire_account_info(self):
395 """ stub implementation """415 """Stub implementation."""
396 pass416
417 def delete_volume(self, volume_id):
418 """Stub implementation."""
397419
398420
399class MementoHandler(logging.Handler):421class MementoHandler(logging.Handler):
@@ -464,12 +486,13 @@
464486
465 def __init__(self, root_path):487 def __init__(self, root_path):
466 """ Creates the instance"""488 """ Creates the instance"""
467 self.root = volume_manager.Share(root_path, access_level='Modify')489 self.root = volume_manager.Share(path=root_path, access_level='Modify')
468 self.shares = {'':self.root}490 self.shares = {'':self.root}
491 self.udfs = {}
469 self.log = logging.getLogger('ubuntuone.SyncDaemon.VM-test')492 self.log = logging.getLogger('ubuntuone.SyncDaemon.VM-test')
470493
471 def add_share(self, share):494 def add_share(self, share):
472 """ Adss share to the shares dict """495 """Add share to the shares dict."""
473 self.shares[share.id] = share496 self.shares[share.id] = share
474 # if the share don't exists, create it497 # if the share don't exists, create it
475 if not os.path.exists(share.path):498 if not os.path.exists(share.path):
@@ -478,7 +501,117 @@
478 if not share.can_write():501 if not share.can_write():
479 os.chmod(share.path, 0555)502 os.chmod(share.path, 0555)
480503
504 def add_udf(self, udf):
505 """Add udf to the udfs dict."""
506 self.udfs[udf.id] = udf
507
481 def on_server_root(self, _):508 def on_server_root(self, _):
482 """509 """Do nothing."""
483 Do nothing510
484 """511 def share_deleted(self, _):
512 """Do nothing."""
513
514 def get_volume(self, id):
515 """Returns a share or a UDF."""
516 try:
517 return self.shares[id]
518 except KeyError:
519 return self.udfs[id]
520
521 def get_volumes(self, access_level='Modify', all_volumes=False):
522 """Simple get_volumes for FakeVolumeManager."""
523 for share in self.shares.values():
524 if all_volumes or share.access_level == access_level:
525 yield share
526 for udf in self.udfs.values():
527 if all_volumes or udf.subscribed:
528 yield udf
529
530 def unsubscribe_udf(self, udf_id):
531 """Mark the UDF with udf_id as unsubscribed."""
532 udf = self.udfs[udf_id]
533 udf.subscribed = False
534 self.udfs[udf_id] = udf
535
536 def delete_volume(self, volume_id):
537 """Request the deletion of a volume."""
538
539# OAuth stubs
540class FakeLoginProcessor(LoginProcessor):
541 """Stub login processor."""
542
543 def __init__(self, dbus_object):
544 """Initialize the login processor."""
545 LoginProcessor.__init__(self, dbus_object, use_libnotify=False)
546 self.next_login_cb = None
547
548 def login(self, realm, consumer_key, error_handler=None,
549 reply_handler=None, do_login=True):
550 """Stub, call self.next_login_cb or send NewCredentials if
551 self.next_login_cb isn't defined.
552 """
553 self.realm = str(realm)
554 self.consumer_key = str(consumer_key)
555 if self.next_login_cb:
556 cb = self.next_login_cb[0]
557 args = self.next_login_cb[1]
558 self.next_login_cb = None
559 return cb(*args)
560 else:
561 self.dbus_object.NewCredentials(realm, consumer_key)
562
563 def clear_token(self, realm, consumer_key):
564 """Stub, do nothing"""
565 pass
566
567 def next_login_with(self, callback, args=tuple()):
568 """shortcircuit the next call to login and call the specified callback.
569 callback is usually one of: self.got_token, self.got_no_token,
570 self.got_denial or self.got_error.
571 """
572 self.next_login_cb = (callback, args)
573
574
575class FakeLogin(Login):
576 """Stub Object which listens for D-Bus OAuth requests"""
577
578 def __init__(self, bus):
579 """Initiate the object."""
580 self.bus = bus
581 self.busName = dbus.service.BusName(DBUS_IFACE_AUTH_NAME, bus=self.bus)
582 # bypass the parent class __init__ as it has the path hardcoded
583 # and we can't use '/' as the path, as we are already using it
584 # for syncdaemon. pylint: disable-msg=W0233,W0231
585 dbus.service.Object.__init__(self, object_path="/oauthdesktop",
586 bus_name=self.busName)
587 self.processor = FakeLoginProcessor(self)
588 self.currently_authing = False
589
590 def shutdown(self):
591 """Shutdown and remove any trace from the bus"""
592 self.busName.get_bus().release_name(self.busName.get_name())
593 self.remove_from_connection()
594
595
596class Listener(object):
597 """Helper class to gather events."""
598
599 def __init__(self):
600 self.events = []
601
602 def handle_default(self, event_name, *args, **kwargs):
603 """Keep record of every event."""
604 self.events.append((event_name, args, kwargs))
605
606
607def noop(*args, **kwargs):
608 """No op."""
609
610
611class DummyClass(object):
612 """Dummy class, does nothing."""
613
614 def __getattribute__(self, name):
615 """Any attribute is a no-op."""
616 return noop
617
485618
=== modified file 'contrib/testing/testcase.pyc'
486Binary files contrib/testing/testcase.pyc 2009-12-07 17:35:00 +0000 and contrib/testing/testcase.pyc 2010-02-18 00:10:25 +0000 differ619Binary files contrib/testing/testcase.pyc 2009-12-07 17:35:00 +0000 and contrib/testing/testcase.pyc 2010-02-18 00:10:25 +0000 differ
=== modified file 'data/Makefile.am'
--- data/Makefile.am 2009-09-28 18:15:00 +0000
+++ data/Makefile.am 2010-02-18 00:10:25 +0000
@@ -6,17 +6,29 @@
6crashdb_DATA = ubuntuone-client-crashdb.conf6crashdb_DATA = ubuntuone-client-crashdb.conf
77
8configdir = $(sysconfdir)/xdg/ubuntuone8configdir = $(sysconfdir)/xdg/ubuntuone
9config_DATA = oauth_urls syncdaemon.conf9config_in_files = logging.conf.in
10config_DATA = oauth_urls syncdaemon.conf $(config_in_files:.conf.in=.conf)
1011
11oauthdir = $(configdir)/oauth_registration.d12oauthdir = $(configdir)/oauth_registration.d
12oauth_DATA = oauth_registration.d/ubuntuone13oauth_DATA = oauth_registration.d/ubuntuone
1314
15memenudir = $(datadir)/indicators/me
16memenu_in_files = ubuntuone.menu.in
17memenu_DATA = $(memenu_in_files:.menu.in=.menu)
18
19%.menu: %.menu.in
20 @sed -e "s|\@DATADIR\@|$(datadir)|" $< > $@
21
14desktopdir = $(datadir)/applications22desktopdir = $(datadir)/applications
15desktop_in_files = ubuntuone-client-applet.desktop.in23desktop_in_files = ubuntuone-preferences.desktop.in
16desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)24desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
1725
18@INTLTOOL_DESKTOP_RULE@26@INTLTOOL_DESKTOP_RULE@
1927
28%.conf: %.conf.in
29 @sed -e "s|\@LOG_LEVEL\@|$(LOG_LEVEL)|" \
30 -e "s|\@LOG_FILE_SIZE\@|$(LOG_FILE_SIZE)|" $< > $@
31
20hicolordir = $(datadir)/icons/hicolor32hicolordir = $(datadir)/icons/hicolor
21privateiconsdir = $(pkgdatadir)/icons/hicolor33privateiconsdir = $(pkgdatadir)/icons/hicolor
22emblem_in_files = \34emblem_in_files = \
@@ -117,7 +129,9 @@
117 rm -rf icons129 rm -rf icons
118130
119EXTRA_DIST = \131EXTRA_DIST = \
120 $(desktop_in_files) \132 $(config_in_files) \
133 $(memenu_in_files) \
134 $(desktop_in_files) \
121 $(service_in_files) \135 $(service_in_files) \
122 $(emblem_in_files) \136 $(emblem_in_files) \
123 $(icon_in_files) \137 $(icon_in_files) \
@@ -128,7 +142,8 @@
128 oauth_registration.d142 oauth_registration.d
129143
130CLEANFILES = \144CLEANFILES = \
131 $(desktop_DATA) \145 $(memenu_DATA) \
146 $(desktop_DATA) \
132 $(service_DATA) \147 $(service_DATA) \
133 $(emblem_files) \148 $(emblem_files) \
134 hicolor149 hicolor
135150
=== modified file 'data/Makefile.in'
--- data/Makefile.in 2009-09-28 18:15:00 +0000
+++ data/Makefile.in 2010-02-18 00:10:25 +0000
@@ -1,4 +1,4 @@
1# Makefile.in generated by automake 1.11 from Makefile.am.1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@2# @configure_input@
33
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -72,9 +72,10 @@
72 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'72 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
73am__installdirs = "$(DESTDIR)$(apportdir)" "$(DESTDIR)$(configdir)" \73am__installdirs = "$(DESTDIR)$(apportdir)" "$(DESTDIR)$(configdir)" \
74 "$(DESTDIR)$(crashdbdir)" "$(DESTDIR)$(desktopdir)" \74 "$(DESTDIR)$(crashdbdir)" "$(DESTDIR)$(desktopdir)" \
75 "$(DESTDIR)$(oauthdir)" "$(DESTDIR)$(servicedir)"75 "$(DESTDIR)$(memenudir)" "$(DESTDIR)$(oauthdir)" \
76 "$(DESTDIR)$(servicedir)"
76DATA = $(apport_DATA) $(config_DATA) $(crashdb_DATA) $(desktop_DATA) \77DATA = $(apport_DATA) $(config_DATA) $(crashdb_DATA) $(desktop_DATA) \
77 $(oauth_DATA) $(service_DATA)78 $(memenu_DATA) $(oauth_DATA) $(service_DATA)
78DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)79DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
79ACLOCAL = @ACLOCAL@80ACLOCAL = @ACLOCAL@
80ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@81ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -126,6 +127,8 @@
126LIPO = @LIPO@127LIPO = @LIPO@
127LNDIR = @LNDIR@128LNDIR = @LNDIR@
128LN_S = @LN_S@129LN_S = @LN_S@
130LOG_FILE_SIZE = @LOG_FILE_SIZE@
131LOG_LEVEL = @LOG_LEVEL@
129LTLIBOBJS = @LTLIBOBJS@132LTLIBOBJS = @LTLIBOBJS@
130MAKEINFO = @MAKEINFO@133MAKEINFO = @MAKEINFO@
131MKDIR_P = @MKDIR_P@134MKDIR_P = @MKDIR_P@
@@ -224,11 +227,15 @@
224crashdbdir = $(sysconfdir)/apport/crashdb.conf.d227crashdbdir = $(sysconfdir)/apport/crashdb.conf.d
225crashdb_DATA = ubuntuone-client-crashdb.conf228crashdb_DATA = ubuntuone-client-crashdb.conf
226configdir = $(sysconfdir)/xdg/ubuntuone229configdir = $(sysconfdir)/xdg/ubuntuone
227config_DATA = oauth_urls syncdaemon.conf230config_in_files = logging.conf.in
231config_DATA = oauth_urls syncdaemon.conf $(config_in_files:.conf.in=.conf)
228oauthdir = $(configdir)/oauth_registration.d232oauthdir = $(configdir)/oauth_registration.d
229oauth_DATA = oauth_registration.d/ubuntuone233oauth_DATA = oauth_registration.d/ubuntuone
234memenudir = $(datadir)/indicators/me
235memenu_in_files = ubuntuone.menu.in
236memenu_DATA = $(memenu_in_files:.menu.in=.menu)
230desktopdir = $(datadir)/applications237desktopdir = $(datadir)/applications
231desktop_in_files = ubuntuone-client-applet.desktop.in238desktop_in_files = ubuntuone-preferences.desktop.in
232desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)239desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
233hicolordir = $(datadir)/icons/hicolor240hicolordir = $(datadir)/icons/hicolor
234privateiconsdir = $(pkgdatadir)/icons/hicolor241privateiconsdir = $(pkgdatadir)/icons/hicolor
@@ -248,7 +255,9 @@
248icon_cache = $(icon_in_files:.svg=.rendercache)255icon_cache = $(icon_in_files:.svg=.rendercache)
249icon_files = $(shell BUILDDIR="$(builddir)"; for i in `find $$BUILDDIR -name "*.rendercache"`; do cat $$i|sort|uniq; done)256icon_files = $(shell BUILDDIR="$(builddir)"; for i in `find $$BUILDDIR -name "*.rendercache"`; do cat $$i|sort|uniq; done)
250EXTRA_DIST = \257EXTRA_DIST = \
251 $(desktop_in_files) \258 $(config_in_files) \
259 $(memenu_in_files) \
260 $(desktop_in_files) \
252 $(service_in_files) \261 $(service_in_files) \
253 $(emblem_in_files) \262 $(emblem_in_files) \
254 $(icon_in_files) \263 $(icon_in_files) \
@@ -259,7 +268,8 @@
259 oauth_registration.d268 oauth_registration.d
260269
261CLEANFILES = \270CLEANFILES = \
262 $(desktop_DATA) \271 $(memenu_DATA) \
272 $(desktop_DATA) \
263 $(service_DATA) \273 $(service_DATA) \
264 $(emblem_files) \274 $(emblem_files) \
265 hicolor275 hicolor
@@ -387,6 +397,26 @@
387 test -n "$$files" || exit 0; \397 test -n "$$files" || exit 0; \
388 echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \398 echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \
389 cd "$(DESTDIR)$(desktopdir)" && rm -f $$files399 cd "$(DESTDIR)$(desktopdir)" && rm -f $$files
400install-memenuDATA: $(memenu_DATA)
401 @$(NORMAL_INSTALL)
402 test -z "$(memenudir)" || $(MKDIR_P) "$(DESTDIR)$(memenudir)"
403 @list='$(memenu_DATA)'; test -n "$(memenudir)" || list=; \
404 for p in $$list; do \
405 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
406 echo "$$d$$p"; \
407 done | $(am__base_list) | \
408 while read files; do \
409 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(memenudir)'"; \
410 $(INSTALL_DATA) $$files "$(DESTDIR)$(memenudir)" || exit $$?; \
411 done
412
413uninstall-memenuDATA:
414 @$(NORMAL_UNINSTALL)
415 @list='$(memenu_DATA)'; test -n "$(memenudir)" || list=; \
416 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
417 test -n "$$files" || exit 0; \
418 echo " ( cd '$(DESTDIR)$(memenudir)' && rm -f" $$files ")"; \
419 cd "$(DESTDIR)$(memenudir)" && rm -f $$files
390install-oauthDATA: $(oauth_DATA)420install-oauthDATA: $(oauth_DATA)
391 @$(NORMAL_INSTALL)421 @$(NORMAL_INSTALL)
392 test -z "$(oauthdir)" || $(MKDIR_P) "$(DESTDIR)$(oauthdir)"422 test -z "$(oauthdir)" || $(MKDIR_P) "$(DESTDIR)$(oauthdir)"
@@ -471,7 +501,7 @@
471check: check-am501check: check-am
472all-am: Makefile $(DATA)502all-am: Makefile $(DATA)
473installdirs:503installdirs:
474 for dir in "$(DESTDIR)$(apportdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(crashdbdir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(oauthdir)" "$(DESTDIR)$(servicedir)"; do \504 for dir in "$(DESTDIR)$(apportdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(crashdbdir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(memenudir)" "$(DESTDIR)$(oauthdir)" "$(DESTDIR)$(servicedir)"; do \
475 test -z "$$dir" || $(MKDIR_P) "$$dir"; \505 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
476 done506 done
477install: install-am507install: install-am
@@ -523,7 +553,7 @@
523553
524install-data-am: install-apportDATA install-configDATA \554install-data-am: install-apportDATA install-configDATA \
525 install-crashdbDATA install-data-local install-desktopDATA \555 install-crashdbDATA install-data-local install-desktopDATA \
526 install-oauthDATA install-serviceDATA556 install-memenuDATA install-oauthDATA install-serviceDATA
527557
528install-dvi: install-dvi-am558install-dvi: install-dvi-am
529559
@@ -570,7 +600,7 @@
570600
571uninstall-am: uninstall-apportDATA uninstall-configDATA \601uninstall-am: uninstall-apportDATA uninstall-configDATA \
572 uninstall-crashdbDATA uninstall-desktopDATA uninstall-local \602 uninstall-crashdbDATA uninstall-desktopDATA uninstall-local \
573 uninstall-oauthDATA uninstall-serviceDATA603 uninstall-memenuDATA uninstall-oauthDATA uninstall-serviceDATA
574604
575.MAKE: install-am install-strip605.MAKE: install-am install-strip
576606
@@ -582,19 +612,26 @@
582 install-data-local install-desktopDATA install-dvi \612 install-data-local install-desktopDATA install-dvi \
583 install-dvi-am install-exec install-exec-am install-html \613 install-dvi-am install-exec install-exec-am install-html \
584 install-html-am install-info install-info-am install-man \614 install-html-am install-info install-info-am install-man \
585 install-oauthDATA install-pdf install-pdf-am install-ps \615 install-memenuDATA install-oauthDATA install-pdf \
586 install-ps-am install-serviceDATA install-strip installcheck \616 install-pdf-am install-ps install-ps-am install-serviceDATA \
587 installcheck-am installdirs maintainer-clean \617 install-strip installcheck installcheck-am installdirs \
588 maintainer-clean-generic maintainer-clean-local mostlyclean \618 maintainer-clean maintainer-clean-generic \
589 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \619 maintainer-clean-local mostlyclean mostlyclean-generic \
590 uninstall uninstall-am uninstall-apportDATA \620 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
591 uninstall-configDATA uninstall-crashdbDATA \621 uninstall-apportDATA uninstall-configDATA \
592 uninstall-desktopDATA uninstall-local uninstall-oauthDATA \622 uninstall-crashdbDATA uninstall-desktopDATA uninstall-local \
593 uninstall-serviceDATA623 uninstall-memenuDATA uninstall-oauthDATA uninstall-serviceDATA
594624
625
626%.menu: %.menu.in
627 @sed -e "s|\@DATADIR\@|$(datadir)|" $< > $@
595628
596@INTLTOOL_DESKTOP_RULE@629@INTLTOOL_DESKTOP_RULE@
597630
631%.conf: %.conf.in
632 @sed -e "s|\@LOG_LEVEL\@|$(LOG_LEVEL)|" \
633 -e "s|\@LOG_FILE_SIZE\@|$(LOG_FILE_SIZE)|" $< > $@
634
598%.icon: %.icon.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache635%.icon: %.icon.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
599636
600%.service: %.service.in637%.service: %.service.in
601638
=== modified file 'data/com.ubuntuone.Authentication.service.in'
--- data/com.ubuntuone.Authentication.service.in 2009-06-30 12:00:00 +0000
+++ data/com.ubuntuone.Authentication.service.in 2010-02-18 00:10:25 +0000
@@ -1,3 +1,3 @@
1[D-BUS Service]1[D-BUS Service]
2Name=com.ubuntuone.Authentication2Name=com.ubuntuone.Authentication
3Exec=@bindir@/ubuntuone-client-applet3Exec=@libexecdir@/ubuntuone-login
44
=== removed file 'data/icons/16x16/apps/ubuntuone-client.png'
5Binary files data/icons/16x16/apps/ubuntuone-client.png 2009-09-28 18:15:00 +0000 and data/icons/16x16/apps/ubuntuone-client.png 1970-01-01 00:00:00 +0000 differ5Binary files data/icons/16x16/apps/ubuntuone-client.png 2009-09-28 18:15:00 +0000 and data/icons/16x16/apps/ubuntuone-client.png 1970-01-01 00:00:00 +0000 differ
=== added file 'data/icons/16x16/apps/ubuntuone.png'
6Binary files data/icons/16x16/apps/ubuntuone.png 1970-01-01 00:00:00 +0000 and data/icons/16x16/apps/ubuntuone.png 2010-02-18 00:10:25 +0000 differ6Binary files data/icons/16x16/apps/ubuntuone.png 1970-01-01 00:00:00 +0000 and data/icons/16x16/apps/ubuntuone.png 2010-02-18 00:10:25 +0000 differ
=== removed file 'data/icons/16x16/status/ubuntuone-client-offline.png'
7Binary files data/icons/16x16/status/ubuntuone-client-offline.png 2009-09-28 18:15:00 +0000 and data/icons/16x16/status/ubuntuone-client-offline.png 1970-01-01 00:00:00 +0000 differ7Binary files data/icons/16x16/status/ubuntuone-client-offline.png 2009-09-28 18:15:00 +0000 and data/icons/16x16/status/ubuntuone-client-offline.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/24x24/apps/ubuntuone-client.png'
8Binary files data/icons/24x24/apps/ubuntuone-client.png 2009-09-28 18:15:00 +0000 and data/icons/24x24/apps/ubuntuone-client.png 1970-01-01 00:00:00 +0000 differ8Binary files data/icons/24x24/apps/ubuntuone-client.png 2009-09-28 18:15:00 +0000 and data/icons/24x24/apps/ubuntuone-client.png 1970-01-01 00:00:00 +0000 differ
=== added file 'data/icons/24x24/apps/ubuntuone.png'
9Binary files data/icons/24x24/apps/ubuntuone.png 1970-01-01 00:00:00 +0000 and data/icons/24x24/apps/ubuntuone.png 2010-02-18 00:10:25 +0000 differ9Binary files data/icons/24x24/apps/ubuntuone.png 1970-01-01 00:00:00 +0000 and data/icons/24x24/apps/ubuntuone.png 2010-02-18 00:10:25 +0000 differ
=== removed file 'data/icons/24x24/status/ubuntuone-client-offline.png'
10Binary files data/icons/24x24/status/ubuntuone-client-offline.png 2009-09-28 18:15:00 +0000 and data/icons/24x24/status/ubuntuone-client-offline.png 1970-01-01 00:00:00 +0000 differ10Binary files data/icons/24x24/status/ubuntuone-client-offline.png 2009-09-28 18:15:00 +0000 and data/icons/24x24/status/ubuntuone-client-offline.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/32x32/apps/ubuntuone-client.png'
11Binary files data/icons/32x32/apps/ubuntuone-client.png 2009-09-28 18:15:00 +0000 and data/icons/32x32/apps/ubuntuone-client.png 1970-01-01 00:00:00 +0000 differ11Binary files data/icons/32x32/apps/ubuntuone-client.png 2009-09-28 18:15:00 +0000 and data/icons/32x32/apps/ubuntuone-client.png 1970-01-01 00:00:00 +0000 differ
=== added file 'data/icons/32x32/apps/ubuntuone.png'
12Binary files data/icons/32x32/apps/ubuntuone.png 1970-01-01 00:00:00 +0000 and data/icons/32x32/apps/ubuntuone.png 2010-02-18 00:10:25 +0000 differ12Binary files data/icons/32x32/apps/ubuntuone.png 1970-01-01 00:00:00 +0000 and data/icons/32x32/apps/ubuntuone.png 2010-02-18 00:10:25 +0000 differ
=== removed file 'data/icons/32x32/status/ubuntuone-client-offline.png'
13Binary files data/icons/32x32/status/ubuntuone-client-offline.png 2009-09-28 18:15:00 +0000 and data/icons/32x32/status/ubuntuone-client-offline.png 1970-01-01 00:00:00 +0000 differ13Binary files data/icons/32x32/status/ubuntuone-client-offline.png 2009-09-28 18:15:00 +0000 and data/icons/32x32/status/ubuntuone-client-offline.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'data/icons/48x48/apps/ubuntuone-client.png'
14Binary files data/icons/48x48/apps/ubuntuone-client.png 2009-09-28 18:15:00 +0000 and data/icons/48x48/apps/ubuntuone-client.png 1970-01-01 00:00:00 +0000 differ14Binary files data/icons/48x48/apps/ubuntuone-client.png 2009-09-28 18:15:00 +0000 and data/icons/48x48/apps/ubuntuone-client.png 1970-01-01 00:00:00 +0000 differ
=== added file 'data/icons/48x48/apps/ubuntuone.png'
15Binary files data/icons/48x48/apps/ubuntuone.png 1970-01-01 00:00:00 +0000 and data/icons/48x48/apps/ubuntuone.png 2010-02-18 00:10:25 +0000 differ15Binary files data/icons/48x48/apps/ubuntuone.png 1970-01-01 00:00:00 +0000 and data/icons/48x48/apps/ubuntuone.png 2010-02-18 00:10:25 +0000 differ
=== removed file 'data/icons/48x48/status/ubuntuone-client-offline.png'
16Binary files data/icons/48x48/status/ubuntuone-client-offline.png 2009-09-28 18:15:00 +0000 and data/icons/48x48/status/ubuntuone-client-offline.png 1970-01-01 00:00:00 +0000 differ16Binary files data/icons/48x48/status/ubuntuone-client-offline.png 2009-09-28 18:15:00 +0000 and data/icons/48x48/status/ubuntuone-client-offline.png 1970-01-01 00:00:00 +0000 differ
=== added file 'data/logging.conf'
--- data/logging.conf 1970-01-01 00:00:00 +0000
+++ data/logging.conf 2010-02-18 00:10:25 +0000
@@ -0,0 +1,13 @@
1[logging]
2level.default = DEBUG
3level.parser = log_level
4level.help = Set the log level (TRACE, DEBUG, INFO, WARNING, ERROR, NOTE
5 CRITICAL, FATAL)
6
7file_size.default = 10485760
8file_size.parser = int
9file_size.help = max file size (the file will be rotated)
10
11backup_count.default = 5
12backup_count.parser = int
13backup_count.help = number of rotated log files to keep around.
014
=== added file 'data/logging.conf.in'
--- data/logging.conf.in 1970-01-01 00:00:00 +0000
+++ data/logging.conf.in 2010-02-18 00:10:25 +0000
@@ -0,0 +1,13 @@
1[logging]
2level.default = @LOG_LEVEL@
3level.parser = log_level
4level.help = Set the log level (TRACE, DEBUG, INFO, WARNING, ERROR, NOTE
5 CRITICAL, FATAL)
6
7file_size.default = @LOG_FILE_SIZE@
8file_size.parser = int
9file_size.help = max file size (the file will be rotated)
10
11backup_count.default = 5
12backup_count.parser = int
13backup_count.help = number of rotated log files to keep around.
014
=== modified file 'data/syncdaemon.conf'
--- data/syncdaemon.conf 2009-09-28 18:15:00 +0000
+++ data/syncdaemon.conf 2010-02-18 00:10:25 +0000
@@ -47,18 +47,13 @@
47im_ok_with_being_root_pretty_please_let_me_be_root.help = Allows the syncdaemon47im_ok_with_being_root_pretty_please_let_me_be_root.help = Allows the syncdaemon
48 to run as root. Please don't use this option.48 to run as root. Please don't use this option.
4949
50log_level.default = INFO
51log_level.parser = log_level
52log_level.help = Set the log level (TRACE, DEBUG, INFO, WARNING, ERROR, NOTE
53 CRITICAL, FATAL)
54
55send_events_over_dbus.default = False50send_events_over_dbus.default = False
56send_events_over_dbus.parser = bool51send_events_over_dbus.parser = bool
57send_events_over_dbus.action = store_true52send_events_over_dbus.action = store_true
58send_events_over_dbus.help = Enable sending "Event" singals for each internal 53send_events_over_dbus.help = Enable sending "Event" singals for each internal
59 event54 event
6055
61handshake_timeout.default = 3056handshake_timeout.default = 50
62handshake_timeout.parser = int57handshake_timeout.parser = int
63handshake_timeout.help = The timeout for the connection and related states, in seconds58handshake_timeout.help = The timeout for the connection and related states, in seconds
6459
@@ -67,18 +62,23 @@
67max_handshake_timeouts.help = The number of consecutive handshake timeouts62max_handshake_timeouts.help = The number of consecutive handshake timeouts
68 before we give up63 before we give up
6964
65udf_autosubscribe.default = True
66udf_autosubscribe.parser = bool
67udf_autosubscribe.help = Autosubsribe to new User Defined Folders, 'on' by default.
68 (accepted values: 1/0, on/off, true/false and yes/no)
69
70[bandwidth_throttling]70[bandwidth_throttling]
71on.default = False71on.default = False
72on.parser = bool72on.parser = bool
73on.action = store_true73on.action = store_true
74on.help = Enable bandwidth throttling74on.help = Enable bandwidth throttling
7575
76read_limit.default = -176read_limit.default = 2097152
77read_limit.parser = throttling_limit77read_limit.parser = throttling_limit
78read_limit.metavar = DOWNLOAD_LIMIT78read_limit.metavar = DOWNLOAD_LIMIT
79read_limit.help = Set the download limit (bytes/sec).79read_limit.help = Set the download limit (bytes/sec).
8080
81write_limit.default = -181write_limit.default = 2097152
82write_limit.parser = throttling_limit82write_limit.parser = throttling_limit
83write_limit.metavar = UPLOAD_LIMIT83write_limit.metavar = UPLOAD_LIMIT
84write_limit.help = Set the upload limit (bytes/sec).84write_limit.help = Set the upload limit (bytes/sec).
8585
=== removed file 'data/ubuntuone-client-applet.desktop.in'
--- data/ubuntuone-client-applet.desktop.in 2009-08-11 16:45:00 +0000
+++ data/ubuntuone-client-applet.desktop.in 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
1[Desktop Entry]
2Name=Ubuntu One
3_Comment=Access and manage your Ubuntu One account
4Exec=ubuntuone-client-applet
5Icon=ubuntuone-client
6Terminal=false
7Type=Application
8Categories=GTK;Network;TrayIcon;
9X-Ubuntu-Gettext-Domain=ubuntuone-client
100
=== modified file 'data/ubuntuone-icons.rendercache'
--- data/ubuntuone-icons.rendercache 2009-09-28 18:15:00 +0000
+++ data/ubuntuone-icons.rendercache 2010-02-18 00:10:25 +0000
@@ -1,6 +1,5 @@
1status/ubuntuone-client-error.png1status/ubuntuone-client-error.png
2status/ubuntuone-client-offline.png
3emblems/emblem-ubuntuone-unsynchronized.png2emblems/emblem-ubuntuone-unsynchronized.png
4status/ubuntuone-client-updating.png3status/ubuntuone-client-updating.png
5emblems/emblem-ubuntuone-updating.png4emblems/emblem-ubuntuone-updating.png
6apps/ubuntuone-client.png5apps/ubuntuone.png
76
=== modified file 'data/ubuntuone-icons.svg'
--- data/ubuntuone-icons.svg 2009-09-28 18:15:00 +0000
+++ data/ubuntuone-icons.svg 2010-02-18 00:10:25 +0000
@@ -17,7 +17,7 @@
17 height="600"17 height="600"
18 id="svg11300"18 id="svg11300"
19 sodipodi:version="0.32"19 sodipodi:version="0.32"
20 inkscape:version="0.47pre1 r21720"20 inkscape:version="0.47 r22583"
21 sodipodi:docname="ubuntuone-icons.svg"21 sodipodi:docname="ubuntuone-icons.svg"
22 inkscape:output_extension="org.inkscape.output.svg.inkscape"22 inkscape:output_extension="org.inkscape.output.svg.inkscape"
23 version="1.0"23 version="1.0"
@@ -1522,16 +1522,6 @@
1522 inkscape:vp_x="0 : 0.5 : 1"1522 inkscape:vp_x="0 : 0.5 : 1"
1523 sodipodi:type="inkscape:persp3d" />1523 sodipodi:type="inkscape:persp3d" />
1524 <linearGradient1524 <linearGradient
1525 inkscape:collect="always"
1526 xlink:href="#XMLID_63_"
1527 id="linearGradient6446"
1528 gradientUnits="userSpaceOnUse"
1529 gradientTransform="matrix(2.4956521,0,0,2.4956521,-223.97574,-53.226089)"
1530 x1="113.0654"
1531 y1="100.6621"
1532 x2="113.0654"
1533 y2="94.512703" />
1534 <linearGradient
1535 x1="113.0654"1525 x1="113.0654"
1536 y1="100.6621"1526 y1="100.6621"
1537 x2="113.0654"1527 x2="113.0654"
@@ -1552,17 +1542,6 @@
1552 id="stop500" />1542 id="stop500" />
1553 </linearGradient>1543 </linearGradient>
1554 <radialGradient1544 <radialGradient
1555 inkscape:collect="always"
1556 xlink:href="#XMLID_64_"
1557 id="radialGradient6448"
1558 gradientUnits="userSpaceOnUse"
1559 gradientTransform="matrix(2.4956521,0,0,2.4956521,-223.97574,-53.226089)"
1560 cx="113.0654"
1561 cy="97.587898"
1562 fx="113.667"
1563 fy="98"
1564 r="2.5631001" />
1565 <radialGradient
1566 cx="113.0654"1545 cx="113.0654"
1567 cy="97.587898"1546 cy="97.587898"
1568 r="2.5631001"1547 r="2.5631001"
@@ -1588,16 +1567,6 @@
1588 id="stop511" />1567 id="stop511" />
1589 </radialGradient>1568 </radialGradient>
1590 <linearGradient1569 <linearGradient
1591 inkscape:collect="always"
1592 xlink:href="#linearGradient4120"
1593 id="linearGradient6430"
1594 gradientUnits="userSpaceOnUse"
1595 gradientTransform="matrix(0.3024372,0,0,0.3560377,303.56427,209.43456)"
1596 x1="7.6046205"
1597 y1="28.481176"
1598 x2="36.183067"
1599 y2="40.943935" />
1600 <linearGradient
1601 id="linearGradient4120">1570 id="linearGradient4120">
1602 <stop1571 <stop
1603 style="stop-color:#555753;stop-opacity:1"1572 style="stop-color:#555753;stop-opacity:1"
@@ -1608,17 +1577,6 @@
1608 offset="1.0000000"1577 offset="1.0000000"
1609 id="stop4124" />1578 id="stop4124" />
1610 </linearGradient>1579 </linearGradient>
1611 <radialGradient
1612 inkscape:collect="always"
1613 xlink:href="#linearGradient4244"
1614 id="radialGradient6427"
1615 gradientUnits="userSpaceOnUse"
1616 gradientTransform="matrix(0.4569434,0.4167071,-0.2525086,0.6234641,302.55498,203.55522)"
1617 cx="15.571491"
1618 cy="2.958519"
1619 fx="15.571491"
1620 fy="2.958519"
1621 r="20.935818" />
1622 <linearGradient1580 <linearGradient
1623 id="linearGradient4244">1581 id="linearGradient4244">
1624 <stop1582 <stop
@@ -1634,39 +1592,6 @@
1634 offset="1.0000000"1592 offset="1.0000000"
1635 id="stop4248" />1593 id="stop4248" />
1636 </linearGradient>1594 </linearGradient>
1637 <radialGradient
1638 inkscape:collect="always"
1639 xlink:href="#linearGradient7497"
1640 id="radialGradient6424"
1641 gradientUnits="userSpaceOnUse"
1642 gradientTransform="matrix(0.05803462,0.01454178,-0.00385459,0.0639583,303.56081,200.28873)"
1643 cx="150.17931"
1644 cy="301.80243"
1645 fx="150.17931"
1646 fy="301.80243"
1647 r="106.18474" />
1648 <linearGradient
1649 inkscape:collect="always"
1650 id="linearGradient7497">
1651 <stop
1652 style="stop-color:#ffffff;stop-opacity:1;"
1653 offset="0"
1654 id="stop7499" />
1655 <stop
1656 style="stop-color:#ffffff;stop-opacity:0;"
1657 offset="1"
1658 id="stop7501" />
1659 </linearGradient>
1660 <linearGradient
1661 inkscape:collect="always"
1662 xlink:href="#linearGradient7243"
1663 id="linearGradient6442"
1664 gradientUnits="userSpaceOnUse"
1665 gradientTransform="matrix(5.0962816,0,0,5.0962816,25.377261,30.286921)"
1666 x1="7.0625"
1667 y1="35.28125"
1668 x2="24.6875"
1669 y2="35.28125" />
1670 <linearGradient1595 <linearGradient
1671 id="linearGradient7243">1596 id="linearGradient7243">
1672 <stop1597 <stop
@@ -1679,39 +1604,6 @@
1679 style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />1604 style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
1680 </linearGradient>1605 </linearGradient>
1681 <linearGradient1606 <linearGradient
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: