From: epage Date: Sat, 3 Oct 2009 11:42:12 +0000 (+0000) Subject: Showing more notifications for login status X-Git-Url: http://git.maemo.org/git/?p=gc-dialer;a=commitdiff_plain;h=46119df8c79753a1ffda2b39bd333173a83110d7 Showing more notifications for login status git-svn-id: file:///svnroot/gc-dialer/trunk@501 c39d3808-3fe2-4d86-a59f-b7f623ee9f21 --- diff --git a/src/constants.py b/src/constants.py index c3cd238..0da667d 100644 --- a/src/constants.py +++ b/src/constants.py @@ -3,7 +3,7 @@ import os __pretty_app_name__ = "DialCentral" __app_name__ = "dialcentral" __version__ = "1.0.7" -__build__ = 1 +__build__ = 2 __app_magic__ = 0xdeadbeef _data_path_ = os.path.join(os.path.expanduser("~"), ".dialcentral") _user_settings_ = "%s/settings.ini" % _data_path_ diff --git a/src/dc_glade.py b/src/dc_glade.py index 1c1f6da..735786b 100755 --- a/src/dc_glade.py +++ b/src/dc_glade.py @@ -17,8 +17,6 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -@todo Add "login failed" and "attempting login" notifications """ @@ -344,12 +342,17 @@ class Dialcentral(object): serviceId = self.NULL_BACKEND loggedIn = False if not force: + with gtk_toolbox.gtk_lock(): + banner = hildonize.show_busy_banner_start(self._window, "Logging In...") try: self.refresh_session() serviceId = self._defaultBackendId loggedIn = True except Exception, e: _moduleLogger.exception('Session refresh failed with the following message "%s"' % str(e)) + finally: + with gtk_toolbox.gtk_lock(): + hildonize.show_busy_banner_end(banner) if not loggedIn: loggedIn, serviceId = self._login_by_user(numOfAttempts) @@ -358,6 +361,8 @@ class Dialcentral(object): self._change_loggedin_status(serviceId) if loggedIn: hildonize.show_information_banner(self._window, "Logged In") + else: + hildonize.show_information_banner(self._window, "Login Failed") except Exception, e: with gtk_toolbox.gtk_lock(): self._errorDisplay.push_exception() @@ -413,8 +418,13 @@ class Dialcentral(object): if not self._phoneBackends[tmpServiceId].get_callback_number(): # subtle reminder to the users to configure things self._notebook.set_current_page(self.ACCOUNT_TAB) - username, password = credentials - loggedIn = self._phoneBackends[tmpServiceId].login(username, password) + banner = hildonize.show_busy_banner_start(self._window, "Logging In...") + try: + username, password = credentials + loggedIn = self._phoneBackends[tmpServiceId].login(username, password) + finally: + with gtk_toolbox.gtk_lock(): + hildonize.show_busy_banner_end(banner) if loggedIn: serviceId = tmpServiceId diff --git a/support/builddeb.py b/support/builddeb.py index 0406427..1098b12 100755 --- a/support/builddeb.py +++ b/support/builddeb.py @@ -26,6 +26,7 @@ __changelog__ = """ * Sped up various login cases * Added descriptions to the callback numbers * Collapsed conversations in the messages tab +* UI Tweak: Added more login status notifications * Bug Fix: Random people were reporting login issues * Bug Fix: Hardened against issues with grabbing possible callback numbers * Debugging: Improved logging output diff --git a/tests/gv_samples/generate_gv_samples.py b/tests/gv_samples/generate_gv_samples.py index ad89a75..8850252 100755 --- a/tests/gv_samples/generate_gv_samples.py +++ b/tests/gv_samples/generate_gv_samples.py @@ -22,14 +22,14 @@ import gv_backend def main(): webpages = [ #("login", gv_backend.GVDialer._loginURL), - #("contacts", gv_backend.GVDialer._contactsURL), - #("voicemail", gv_backend.GVDialer._voicemailURL), - #("sms", gv_backend.GVDialer._smsURL), - #("forward", gv_backend.GVDialer._forwardURL), - #("recent", gv_backend.GVDialer._recentCallsURL), - #("placed", gv_backend.GVDialer._placedCallsURL), - #("recieved", gv_backend.GVDialer._receivedCallsURL), - #("missed", gv_backend.GVDialer._missedCallsURL), + ("contacts", gv_backend.GVDialer._contactsURL), + ("voicemail", gv_backend.GVDialer._voicemailURL), + ("sms", gv_backend.GVDialer._smsURL), + ("forward", gv_backend.GVDialer._forwardURL), + ("recent", gv_backend.GVDialer._recentCallsURL), + ("placed", gv_backend.GVDialer._placedCallsURL), + ("recieved", gv_backend.GVDialer._receivedCallsURL), + ("missed", gv_backend.GVDialer._missedCallsURL), ]