Merge lp:~diegosarmentero/ubuntuone-windows-installer/successful-page into lp:ubuntuone-windows-installer

Proposed by Diego Sarmentero
Status: Superseded
Proposed branch: lp:~diegosarmentero/ubuntuone-windows-installer/successful-page
Merge into: lp:ubuntuone-windows-installer
Diff against target: 110 lines (+32/-2)
3 files modified
ubuntuone_installer/gui/qt/gui.py (+9/-1)
ubuntuone_installer/gui/qt/main/windows.py (+2/-1)
ubuntuone_installer/gui/qt/tests/test_gui.py (+21/-0)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntuone-windows-installer/successful-page
Reviewer Review Type Date Requested Status
Ubuntu One hackers Pending
Review via email: mp+79854@code.launchpad.net

This proposal has been superseded by a proposal from 2011-10-19.

Commit message

Fixed: Process finished successfully (LP: #859743).

Description of the change

Fixed: Process finished successfully (LP: #859743).

To post a comment you must log in.
86. By Diego Sarmentero

Fixed tests

87. By Diego Sarmentero

merge

88. By Diego Sarmentero

Conflicts resolved

89. By Diego Sarmentero

merge

90. By Diego Sarmentero

merge

91. By Diego Sarmentero

Fixed lint issues

92. By Diego Sarmentero

merge

93. By Diego Sarmentero

Removed changes from network-detect branch

94. By Diego Sarmentero

Tests improved.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntuone_installer/gui/qt/gui.py'
--- ubuntuone_installer/gui/qt/gui.py 2011-10-17 15:11:02 +0000
+++ ubuntuone_installer/gui/qt/gui.py 2011-10-19 17:23:35 +0000
@@ -56,6 +56,10 @@
56 TC_URL,56 TC_URL,
57)57)
5858
59# Module used to include the resources into this file
60# pylint: disable=W0611
61from ubuntuone_installer.gui.qt.ui import images_rc
62# pylint: enable=W0611
59from ubuntuone_installer.logger import setup_logging63from ubuntuone_installer.logger import setup_logging
60from ubuntuone_installer.gui.qt.ui import (64from ubuntuone_installer.gui.qt.ui import (
61 choose_sign_in_ui,65 choose_sign_in_ui,
@@ -84,6 +88,7 @@
84CREDENTIALS_ERROR = _('Application will close.\n\n%r')88CREDENTIALS_ERROR = _('Application will close.\n\n%r')
85SKIP_TOUR = _("Skip tour, go to Dashboard")89SKIP_TOUR = _("Skip tour, go to Dashboard")
86START_SETUP = _("Start setup")90START_SETUP = _("Start setup")
91SUCCESSFUL_LOGIN = _("Login successful")
87UPDATE_TITLE = _("Updates are available")92UPDATE_TITLE = _("Updates are available")
88UPDATE_SOFTWARE = _("There is a new version available. "93UPDATE_SOFTWARE = _("There is a new version available. "
89 "Do you want perform an upgrade?")94 "Do you want perform an upgrade?")
@@ -213,9 +218,12 @@
213218
214 def __init__(self, parent=None):219 def __init__(self, parent=None):
215 super(SuccessPage, self).__init__(220 super(SuccessPage, self).__init__(
216 Ui_SuccessPage(), SuccessController(), parent)221 Ui_SuccessPage(),
222 SuccessController(title=SUCCESSFUL_LOGIN), parent)
217 self.finish_button = None223 self.finish_button = None
218 self.next_button = None224 self.next_button = None
225 self.ui.image_label.setPixmap(
226 QtGui.QPixmap(':/win_installer_graphic.png'))
219227
220 def initializePage(self):228 def initializePage(self):
221 """Setup UI details."""229 """Setup UI details."""
222230
=== modified file 'ubuntuone_installer/gui/qt/main/windows.py'
--- ubuntuone_installer/gui/qt/main/windows.py 2011-09-29 13:26:44 +0000
+++ ubuntuone_installer/gui/qt/main/windows.py 2011-10-19 17:23:35 +0000
@@ -29,7 +29,6 @@
29# pylint: disable=W061129# pylint: disable=W0611
30from ubuntuone_installer.gui.qt.ui import images_rc30from ubuntuone_installer.gui.qt.ui import images_rc
31# pylint: enable=W061131# pylint: enable=W0611
32from ubuntuone_installer.gui.qt import utils
3332
3433
35def stop(*args):34def stop(*args):
@@ -48,6 +47,7 @@
48@defer.inlineCallbacks47@defer.inlineCallbacks
49def success_cb(creds, gui, installing, logger):48def success_cb(creds, gui, installing, logger):
50 """Handle credentials success."""49 """Handle credentials success."""
50 from ubuntuone_installer.gui.qt import utils
51 logger.debug('Got back from sso.')51 logger.debug('Got back from sso.')
52 if creds: # Have credentials already52 if creds: # Have credentials already
53 logger.debug('Already got credentials.')53 logger.debug('Already got credentials.')
@@ -89,6 +89,7 @@
89@defer.inlineCallbacks89@defer.inlineCallbacks
90def check_updates(gui, logger):90def check_updates(gui, logger):
91 """Check for updates."""91 """Check for updates."""
92 from ubuntuone_installer.gui.qt import utils
92 logger.info('Checking for updates.')93 logger.info('Checking for updates.')
93 # the idea is simple, check if there are updates, ask user if we perform94 # the idea is simple, check if there are updates, ask user if we perform
94 # the update and continue.95 # the update and continue.
9596
=== modified file 'ubuntuone_installer/gui/qt/tests/test_gui.py'
--- ubuntuone_installer/gui/qt/tests/test_gui.py 2011-10-13 10:30:25 +0000
+++ ubuntuone_installer/gui/qt/tests/test_gui.py 2011-10-19 17:23:35 +0000
@@ -24,6 +24,10 @@
24from ubuntuone.platform.credentials import APP_NAME24from ubuntuone.platform.credentials import APP_NAME
25from twisted.internet import defer25from twisted.internet import defer
2626
27# Module used to include the resources into this file
28# pylint: disable=W0611
29from ubuntuone_installer.gui.qt.ui import images_rc
30# pylint: enable=W0611
27from ubuntuone_installer.gui import NEXT31from ubuntuone_installer.gui import NEXT
28from ubuntuone_installer.gui.qt import gui, forgotten, utils32from ubuntuone_installer.gui.qt import gui, forgotten, utils
29from ubuntuone_installer.gui.qt.tests import (33from ubuntuone_installer.gui.qt.tests import (
@@ -654,6 +658,21 @@
654658
655 class_ui = gui.SuccessPage659 class_ui = gui.SuccessPage
656660
661 def get_pixmap_data(self, pixmap):
662 """Get the raw data of a QPixmap."""
663 byte_array = QtCore.QByteArray()
664 array_buffer = QtCore.QBuffer(byte_array)
665 pixmap.save(array_buffer, "PNG")
666 return byte_array
667
668 # pylint: disable=C0103
669 def assertEqualPixmaps(self, pixmap1, pixmap2):
670 """Compare two Qt pixmaps."""
671 d1 = self.get_pixmap_data(pixmap1)
672 d2 = self.get_pixmap_data(pixmap2)
673 self.assertEqual(d1, d2)
674 # pylint: enable=C0103
675
657 def test_after_initialize(self):676 def test_after_initialize(self):
658 """Check the page is initialized correctly."""677 """Check the page is initialized correctly."""
659 wizard = FakeMainWindow()678 wizard = FakeMainWindow()
@@ -672,6 +691,8 @@
672 QtGui.QWizard.NextButton])691 QtGui.QWizard.NextButton])
673 self.assertTrue(self.ui.next_button.isDefault())692 self.assertTrue(self.ui.next_button.isDefault())
674 self.assertFalse(self.ui.finish_button.isDefault())693 self.assertFalse(self.ui.finish_button.isDefault())
694 self.assertEqualPixmaps(self.ui.ui.image_label.pixmap(),
695 QtGui.QPixmap(':/win_installer_graphic.png'))
675696
676697
677class SignInPageTestCase(BaseTestCase):698class SignInPageTestCase(BaseTestCase):

Subscribers

People subscribed via source and target branches