Merge lp:~ralsina/ubuntuone-windows-installer/fix_800715 into lp:ubuntuone-windows-installer

Proposed by Roberto Alsina
Status: Merged
Merged at revision: 8
Proposed branch: lp:~ralsina/ubuntuone-windows-installer/fix_800715
Merge into: lp:ubuntuone-windows-installer
Diff against target: 64 lines (+48/-1)
2 files modified
bin/ubuntuone-installer-qt (+1/-1)
ubuntuone_installer/gui/qt/main/windows.py (+47/-0)
To merge this branch: bzr merge lp:~ralsina/ubuntuone-windows-installer/fix_800715
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Review via email: mp+65524@code.launchpad.net

Commit message

Add windows-specific bits.

Description of the change

Add windows-specific bit.

To test (on windows):

1) get txnamedpipes and ubuntuone-client on the PYTHONPATH
2) python bin\ubuntuone-installer-qt

You should see a window.

To post a comment you must log in.
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Works fine on my VM!
Please set your name in the Authors line of the file, or add yourself to the current one.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-installer-qt'
2--- bin/ubuntuone-installer-qt 2011-06-21 16:36:01 +0000
3+++ bin/ubuntuone-installer-qt 2011-06-22 15:54:36 +0000
4@@ -27,7 +27,7 @@
5
6 from optparse import OptionParser
7
8-from ubuntuone.controlpanel import TRANSLATION_DOMAIN
9+from ubuntuone_installer import TRANSLATION_DOMAIN
10
11 gettext.textdomain(TRANSLATION_DOMAIN)
12 # import the GUI after the translation domain has been set
13
14=== added file 'ubuntuone_installer/gui/qt/main/windows.py'
15--- ubuntuone_installer/gui/qt/main/windows.py 1970-01-01 00:00:00 +0000
16+++ ubuntuone_installer/gui/qt/main/windows.py 2011-06-22 15:54:36 +0000
17@@ -0,0 +1,47 @@
18+# -*- coding: utf-8 -*-
19+
20+# Authors: Manuel de la Pena <manuel@canonical.com>
21+#
22+# Copyright 2011 Canonical Ltd.
23+#
24+# This program is free software: you can redistribute it and/or modify it
25+# under the terms of the GNU General Public License version 3, as published
26+# by the Free Software Foundation.
27+#
28+# This program is distributed in the hope that it will be useful, but
29+# WITHOUT ANY WARRANTY; without even the implied warranties of
30+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
31+# PURPOSE. See the GNU General Public License for more details.
32+#
33+# You should have received a copy of the GNU General Public License along
34+# with this program. If not, see <http://www.gnu.org/licenses/>.
35+"""Reactor installation for windows."""
36+
37+import sys
38+
39+from PyQt4 import Qt
40+
41+# pylint: disable=E1101, F0401, W0404
42+from txnamedpipes.threadedreactor import install
43+from txnamedpipes.qt import Interleaver
44+from ubuntuone_installer.gui.qt.gui import MainWindow
45+
46+
47+def main(switch_to='', alert=False):
48+ """Start the Qt reactor and open the main window."""
49+
50+ # The DBus main loop MUST be initialized before importing the reactor
51+ app = Qt.QApplication(sys.argv)
52+
53+ # The following cannot be imported outside this function
54+ # because u1trial already provides a reactor.
55+ # pylint: disable=W0404, F0401
56+ install()
57+ from twisted.internet import reactor
58+ ii = Interleaver()
59+ reactor.interleave(ii.toInterleave)
60+
61+ window = MainWindow(close_callback=app.quit)
62+ window.show()
63+
64+ app.exec_()

Subscribers

People subscribed via source and target branches