Merge lp:~dobey/ubuntuone-client/grrrr-gir-4-0 into lp:ubuntuone-client/stable-4-0

Proposed by dobey
Status: Merged
Merged at revision: 1267
Proposed branch: lp:~dobey/ubuntuone-client/grrrr-gir-4-0
Merge into: lp:ubuntuone-client/stable-4-0
Diff against target: 55 lines (+6/-7)
2 files modified
bin/ubuntuone-launch (+3/-4)
bin/ubuntuone-login (+3/-3)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/grrrr-gir-4-0
Reviewer Review Type Date Requested Status
Mike McCracken (community) Approve
Diego Sarmentero (community) Approve
Review via email: mp+129904@code.launchpad.net

Commit message

Use GI bindings of GLib instead of static bindings in launch/login scripts.

To post a comment you must log in.
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
Revision history for this message
Mike McCracken (mikemc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-launch'
2--- bin/ubuntuone-launch 2012-04-09 20:07:05 +0000
3+++ bin/ubuntuone-launch 2012-10-16 14:21:26 +0000
4@@ -63,10 +63,9 @@
5 sys.exit(1)
6
7 import dbus
8-import glib
9-import gobject
10
11 from dbus.mainloop.glib import DBusGMainLoop
12+from gi.repository import GLib
13 from twisted.internet import defer
14
15 from ubuntuone.syncdaemon.config import get_user_config
16@@ -76,7 +75,7 @@
17 @defer.inlineCallbacks
18 def main():
19 """Start syncdaemon and ask it to connect, if possible."""
20- gobject.set_application_name("ubuntuone-launch")
21+ GLib.set_application_name("ubuntuone-launch")
22
23 files_sync_enabled = get_user_config().get_files_sync_enabled()
24 if not files_sync_enabled:
25@@ -99,5 +98,5 @@
26 # os._exit feels like it's cheating, but it's simple and fast
27 d.addCallbacks(lambda _: os._exit(0), lambda _: os._exit(1))
28
29- mainloop = glib.MainLoop()
30+ mainloop = GLib.MainLoop()
31 mainloop.run()
32
33=== modified file 'bin/ubuntuone-login'
34--- bin/ubuntuone-login 2012-06-18 08:48:44 +0000
35+++ bin/ubuntuone-login 2012-10-16 14:21:26 +0000
36@@ -40,8 +40,8 @@
37
38 import dbus.mainloop.glib
39 import dbus.service
40-import glib
41
42+from gi.repository import GLib
43 from ubuntuone.logger import basic_formatter
44 from ubuntuone.platform.credentials import logger
45 from ubuntuone.platform.credentials.dbus_service import (
46@@ -70,8 +70,8 @@
47
48 logger.info("Starting Ubuntu One login manager for bus %r.", DBUS_BUS_NAME)
49 bus_name = dbus.service.BusName(DBUS_BUS_NAME, bus=dbus.SessionBus())
50- mainloop = glib.MainLoop()
51- CredentialsManagement(timeout_func=glib.timeout_add,
52+ mainloop = GLib.MainLoop()
53+ CredentialsManagement(timeout_func=GLib.timeout_add,
54 shutdown_func=mainloop.quit,
55 bus_name=bus_name, object_path=DBUS_CREDENTIALS_PATH)
56

Subscribers

People subscribed via source and target branches

to all changes: