Merge lp:~thisfred/ubuntuone-control-panel/dbusify into lp:ubuntuone-control-panel

Proposed by Eric Casteleijn on 2011-03-17
Status: Merged
Approved by: Eric Casteleijn on 2011-03-21
Approved revision: 99
Merged at revision: 102
Proposed branch: lp:~thisfred/ubuntuone-control-panel/dbusify
Merge into: lp:ubuntuone-control-panel
Diff against target: 60 lines (+17/-2)
4 files modified
bin/ubuntuone-control-panel-gtk (+10/-1)
com.ubuntuone.controlpanel.gui.service.in (+3/-0)
setup.py (+2/-1)
ubuntuone/controlpanel/gtk/__init__.py (+2/-0)
To merge this branch: bzr merge lp:~thisfred/ubuntuone-control-panel/dbusify
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve on 2011-03-18
dobey (community) 2011-03-17 Approve on 2011-03-18
Review via email: mp+53854@code.launchpad.net

Commit message

* Added service file template (will need a packaging branch to actually install it)
* Make bin/ubuntuone-control-panel-gtk not open a new panel if one is already open

Description of the change

* Added service file template (will need a packaging branch to actually install it)
* Make bin/ubuntuone-control-panel-gtk not open a new panel if one is already open

This temporarily breaks switching tabs in the case the panel is already open, which I will address in the next branch.

To post a comment you must log in.
dobey (dobey) :
review: Approve
Roberto Alsina (ralsina) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/ubuntuone-control-panel-gtk'
--- bin/ubuntuone-control-panel-gtk 2011-03-04 15:47:23 +0000
+++ bin/ubuntuone-control-panel-gtk 2011-03-17 16:50:40 +0000
@@ -27,6 +27,7 @@
27from optparse import OptionParser27from optparse import OptionParser
2828
29from ubuntuone.controlpanel.gtk.gui import ControlPanelWindow29from ubuntuone.controlpanel.gtk.gui import ControlPanelWindow
30from ubuntuone.controlpanel.gtk import DBUS_BUS_NAME
3031
31dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)32dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
3233
@@ -47,7 +48,15 @@
4748
4849
49if __name__ == "__main__":50if __name__ == "__main__":
51 bus = dbus.SessionBus()
52 name = bus.request_name(DBUS_BUS_NAME,
53 dbus.bus.NAME_FLAG_DO_NOT_QUEUE)
54 if name == dbus.bus.REQUEST_NAME_REPLY_EXISTS:
55 sys.exit(0)
56
57 bus_name = dbus.service.BusName(DBUS_BUS_NAME, bus=dbus.SessionBus())
50 parser = parser_options()58 parser = parser_options()
51 (options, args) = parser.parse_args(sys.argv)59 (options, args) = parser.parse_args(sys.argv)
52 gui = ControlPanelWindow(switch_to=options.switch_to, alert=options.alert)60 gui = ControlPanelWindow(
61 switch_to=options.switch_to, alert=options.alert)
53 gui.main()62 gui.main()
5463
=== added file 'com.ubuntuone.controlpanel.gui.service.in'
--- com.ubuntuone.controlpanel.gui.service.in 1970-01-01 00:00:00 +0000
+++ com.ubuntuone.controlpanel.gui.service.in 2011-03-17 16:50:40 +0000
@@ -0,0 +1,3 @@
1[D-BUS Service]
2Name=com.ubuntuone.controlpanel.gui
3Exec=@bindir@/ubuntuone-control-panel-gtk
04
=== modified file 'setup.py'
--- setup.py 2011-03-10 02:51:09 +0000
+++ setup.py 2011-03-17 16:50:40 +0000
@@ -84,7 +84,8 @@
84 long_description='Application to manage a Ubuntu One account. Provides a'\84 long_description='Application to manage a Ubuntu One account. Provides a'\
85 'DBus service to query/modify all the Ubuntu One bits.',85 'DBus service to query/modify all the Ubuntu One bits.',
86 url='https://launchpad.net/ubuntuone-control-panel',86 url='https://launchpad.net/ubuntuone-control-panel',
87 packages=['ubuntuone', 'ubuntuone.controlpanel', 'ubuntuone.controlpanel.gtk'],87 packages=[
88 'ubuntuone', 'ubuntuone.controlpanel', 'ubuntuone.controlpanel.gtk'],
88 extra_path='ubuntuone-control-panel',89 extra_path='ubuntuone-control-panel',
89 data_files=[90 data_files=[
90 ('lib/ubuntuone-control-panel',91 ('lib/ubuntuone-control-panel',
9192
=== modified file 'ubuntuone/controlpanel/gtk/__init__.py'
--- ubuntuone/controlpanel/gtk/__init__.py 2010-11-10 15:55:33 +0000
+++ ubuntuone/controlpanel/gtk/__init__.py 2011-03-17 16:50:40 +0000
@@ -17,3 +17,5 @@
17# with this program. If not, see <http://www.gnu.org/licenses/>.17# with this program. If not, see <http://www.gnu.org/licenses/>.
1818
19"""The GTK graphical interface for the control panel for Ubuntu One."""19"""The GTK graphical interface for the control panel for Ubuntu One."""
20
21DBUS_BUS_NAME = "com.ubuntuone.controlpanel.gui"

Subscribers

People subscribed via source and target branches