Merge lp:~dobey/ubuntuone-installer/launch-cp into lp:ubuntuone-installer

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 3
Merged at revision: 7
Proposed branch: lp:~dobey/ubuntuone-installer/launch-cp
Merge into: lp:ubuntuone-installer
Diff against target: 33 lines (+18/-7)
1 file modified
bin/ubuntuone-installer (+18/-7)
To merge this branch: bzr merge lp:~dobey/ubuntuone-installer/launch-cp
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+70479@code.launchpad.net

Commit message

Launch the control-panel straight away if already installed

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) :
review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/ubuntuone-installer'
--- bin/ubuntuone-installer 2011-07-29 14:31:29 +0000
+++ bin/ubuntuone-installer 2011-08-04 18:29:24 +0000
@@ -16,11 +16,22 @@
16# with this program. If not, see <http://www.gnu.org/licenses/>.16# with this program. If not, see <http://www.gnu.org/licenses/>.
17"""The main script for the Ubuntu One Installer."""17"""The main script for the Ubuntu One Installer."""
1818
19from gi.repository import Gtk19import apt
2020
2121from gi.repository import Gtk, GLib
22
23
24def is_installed(package):
25 """Check if things are installed already."""
26 cache = apt.Cache()
27 return package in cache and cache[package].is_installed
28
29
22if __name__ == "__main__":30if __name__ == "__main__":
23 from ubuntuone.installer.gui import Window31 if is_installed('ubuntuone-control-panel-gtk'):
24 dialog = Window()32 GLib.spawn_command_line_async('ubuntuone-control-panel-gtk')
25 dialog.run()33 else:
26 Gtk.main()34 from ubuntuone.installer.gui import Window
35 dialog = Window()
36 dialog.run()
37 Gtk.main()

Subscribers

People subscribed via source and target branches

to all changes: