~diegosarmentero/ubuntuone-windows-installer/err-dict

« back to all changes in this revision

Viewing changes to ubuntuone_installer/gui/qt/setup_account.py

Removed Setup Account button when the user move to another page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
        """Set set_up_button as default button when the page is shown."""
179
179
        # This method should stays here because if we move it to initializePage
180
180
        # set_up_button won't take the proper style for hover and press
 
181
        self.set_up_button.setVisible(True)
181
182
        self.set_up_button.setDefault(True)
182
 
        self.set_up_button.setProperty("DisabledState", True)
183
 
        self.set_up_button.style().unpolish(self.set_up_button)
184
 
        self.set_up_button.style().polish(self.set_up_button)
 
183
        if not self.set_up_button.isEnabled():
 
184
            self.set_up_button.setProperty("DisabledState", True)
 
185
            self.set_up_button.style().unpolish(self.set_up_button)
 
186
            self.set_up_button.style().polish(self.set_up_button)
185
187
        self.connect(QtGui.QApplication.instance(),
186
188
            QtCore.SIGNAL("focusChanged(QWidget*, QWidget*)"),
187
189
            self.focus_changed)
188
190
 
189
191
    def hideEvent(self, event):
190
192
        """Disconnect the focusChanged signal when the page change."""
 
193
        self.set_up_button.setVisible(False)
191
194
        try:
192
195
            self.disconnect(QtGui.QApplication.instance(),
193
196
                QtCore.SIGNAL("focusChanged(QWidget*, QWidget*)"),