Merge lp:~dobey/ubuntuone-client/installer-not-panel into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 1199
Merged at revision: 1198
Proposed branch: lp:~dobey/ubuntuone-client/installer-not-panel
Merge into: lp:ubuntuone-client
Diff against target: 106 lines (+13/-37)
2 files modified
tests/platform/linux/test_messaging.py (+1/-6)
ubuntuone/platform/linux/messaging.py (+12/-31)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/installer-not-panel
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+95237@code.launchpad.net

Commit message

Update the messaging indicator integration to launch ubuntuone-installer
Avoid passing time() to the Indicator API which expects GTimeVal now
Update the tests for the changes

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1

review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

I'm getting this

===============================================================================
[ERROR]
Traceback (most recent call last):
Failure: twisted.trial.util.DirtyReactorAggregateError: Reactor was unclean.
DelayedCalls: (set twisted.internet.base.DelayedCall.debug = True to debug)
<DelayedCall 0x6dad050 [0.0997607707977s] called=0 cancelled=0 GIReactor.callFromThread(<bound method C.push of <tests.syncdaemon.test_hashqueue.C object at 0x6d9a390>>, 'HQ_HASH_ERROR', mdid='mdid')>

tests.syncdaemon.test_hashqueue.HashQueueTests.test_being_hashed

does not seem related... but perhaps you know why I'm getting that?

review: Needs Information
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Seems like the test us buggy, see bug #935568. Looks good!

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (239.4 KiB)

The attempt to merge lp:~dobey/ubuntuone-client/installer-not-panel into lp:ubuntuone-client failed. Below is the output from the failed tests.

/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.68
checking for automake >= 1.10...
  testing automake-1.11... found 1.11.3
checking for libtool >= 1.5...
  testing libtoolize... found 2.4.2
checking for intltool >= 0.30...
  testing intltoolize... found 0.50.1
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.26
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.18
Checking for required M4 macros...
Checking for forbidden M4 macros...
Processing ./configure.ac
Running libtoolize...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running intltoolize...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-gtk-doc --enable-debug ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how ...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/platform/linux/test_messaging.py'
--- tests/platform/linux/test_messaging.py 2012-01-25 22:42:17 +0000
+++ tests/platform/linux/test_messaging.py 2012-02-29 18:58:21 +0000
@@ -83,12 +83,7 @@
83 if message_count is not None:83 if message_count is not None:
84 mock_indicator.set_property("count", str(message_count))84 mock_indicator.set_property("count", str(message_count))
85 else:85 else:
86 if message_time is None:86 if message_time is not None:
87 mock_time = self.mocker.replace("time.time")
88 mock_time()
89 self.mocker.result(FAKE_TIME2)
90 mock_indicator.set_property_time("time", FAKE_TIME2)
91 else:
92 mock_indicator.set_property_time("time", message_time)87 mock_indicator.set_property_time("time", message_time)
93 mock_indicator.set_property("draw-attention", "true")88 mock_indicator.set_property("draw-attention", "true")
94 if update_count:89 if update_count:
9590
=== modified file 'ubuntuone/platform/linux/messaging.py'
--- ubuntuone/platform/linux/messaging.py 2012-01-26 18:09:46 +0000
+++ ubuntuone/platform/linux/messaging.py 2012-02-29 18:58:21 +0000
@@ -21,20 +21,20 @@
21# of them are available, we should fall back to silently discarding21# of them are available, we should fall back to silently discarding
22# messages.22# messages.
2323
24import dbus
25import subprocess
26import sys24import sys
2725
28from time import time
29
30indicate = None26indicate = None
27glib = None
31if 'gobject' in sys.modules and sys.modules['gobject'] is not None:28if 'gobject' in sys.modules and sys.modules['gobject'] is not None:
32 import indicate as pyindicate29 import indicate as pyindicate
30 import glib as GLib
33 indicate = pyindicate31 indicate = pyindicate
32 glib = GLib
34 using_gi = False33 using_gi = False
35else:34else:
36 from gi.repository import Indicate35 from gi.repository import Indicate, GLib
37 indicate = Indicate36 indicate = Indicate
37 glib = GLib
38 using_gi = True38 using_gi = True
3939
40DBUS_BUS_NAME = 'com.ubuntuone.controlpanel.gui'40DBUS_BUS_NAME = 'com.ubuntuone.controlpanel.gui'
@@ -43,34 +43,15 @@
43TRANSLATION_DOMAIN = 'ubuntuone-control-panel'43TRANSLATION_DOMAIN = 'ubuntuone-control-panel'
4444
45from ubuntuone.status.messaging import AbstractMessaging45from ubuntuone.status.messaging import AbstractMessaging
46from ubuntuone.status.logger import logger46
4747
48
49# pylint: disable=W0613
50def open_volumes():48def open_volumes():
51 """Open the control panel to the shares tab."""49 """Open the control panel to the shares tab."""
52 bus = dbus.SessionBus()50 _server_callback(None)
53 obj = bus.get_object(DBUS_BUS_NAME, DBUS_PATH)
54 service = dbus.Interface(obj, dbus_interface=DBUS_IFACE_GUI)
55
56 def error_handler(*args, **kwargs):
57 """Log errors when calling D-Bus methods in a async way."""
58 logger.error(
59 'Dbus call to com.ubuntuone.controlpanel.gui failed: %r %r', args,
60 kwargs)
61
62 def reply_handler(*args, **kwargs):
63 """Exit when done."""
64 pass
65
66 service.switch_to_alert(
67 'volumes', True, reply_handler=reply_handler,
68 error_handler=error_handler)
69
7051
71def _server_callback(the_indicator, message_time=None):52def _server_callback(the_indicator, message_time=None):
72 """Open the control panel to the shares tab."""53 """Open the control panel to the shares tab."""
73 subprocess.Popen(['ubuntuone-control-panel-gtk'])54 glib.spawn_command_line_async('ubuntuone-installer')
74# pylint: enable=W061355# pylint: enable=W0613
7556
7657
@@ -78,6 +59,7 @@
78 """Notification of the end user."""59 """Notification of the end user."""
7960
80 def __init__(self, server_callback=_server_callback):61 def __init__(self, server_callback=_server_callback):
62 self.server_callback = server_callback
81 self.indicators = []63 self.indicators = []
82 if using_gi:64 if using_gi:
83 self.server = indicate.Server.ref_default()65 self.server = indicate.Server.ref_default()
@@ -107,9 +89,8 @@
107 if message_count is not None:89 if message_count is not None:
108 indicator.set_property("count", str(message_count))90 indicator.set_property("count", str(message_count))
109 else:91 else:
110 if message_time is None:92 if message_time is not None:
111 message_time = time()93 indicator.set_property_time("time", message_time)
112 indicator.set_property_time("time", message_time)
113 indicator.set_property("draw-attention", "true")94 indicator.set_property("draw-attention", "true")
114 indicator.show()95 indicator.show()
115 self.indicators.append(indicator)96 self.indicators.append(indicator)

Subscribers

People subscribed via source and target branches