Popup the account dialog when no callback number is configured
authorEd Page <eopage@byu.net>
Tue, 14 Dec 2010 03:51:37 +0000 (21:51 -0600)
committerEd Page <eopage@byu.net>
Tue, 14 Dec 2010 03:51:37 +0000 (21:51 -0600)
src/dialcentral_qt.py
src/session.py

index bb94ba8..c935e68 100755 (executable)
@@ -594,9 +594,13 @@ class MainWindow(object):
        @misc_utils.log_exception(_moduleLogger)
        def _on_login(self):
                with qui_utils.notify_error(self._errorLog):
-                       if self._defaultCredentials != self._curentCredentials:
+                       changedAccounts = self._defaultCredentials != self._curentCredentials
+                       noCallback = not self._session.get_callback_number()
+                       if changedAccounts or noCallback:
                                self._show_account_dialog()
+
                        self._defaultCredentials = self._curentCredentials
+
                        for tab in self._tabsContents:
                                tab.enable()
 
index 963f0a1..ce7c0c1 100644 (file)
@@ -395,11 +395,13 @@ class Session(QtCore.QObject):
                                        oldUsername = self._username
                                        self._username = username
                                        finalState = self.LOGGEDIN_STATE
-                                       self.loggedIn.emit()
                                        if oldUsername != self._username:
                                                needOps = not self._load()
                                        else:
                                                needOps = True
+
+                                       self.loggedIn.emit()
+
                                        if needOps:
                                                loginOps = self._loginOps[:]
                                        else: