Fixing a bug with choosing when to mark the dial button sensitive
authorepage <eopage@byu.net>
Fri, 16 Oct 2009 11:25:08 +0000 (11:25 +0000)
committerepage <eopage@byu.net>
Fri, 16 Oct 2009 11:25:08 +0000 (11:25 +0000)
git-svn-id: file:///svnroot/gc-dialer/trunk@536 c39d3808-3fe2-4d86-a59f-b7f623ee9f21

src/gv_views.py

index 271f6b6..c5635fd 100644 (file)
@@ -407,13 +407,17 @@ class SmsEntryDialog(object):
 
        def _update_letter_count(self, *args):
                entryLength = self._smsEntry.get_buffer().get_char_count()
+
                charsLeft = self.MAX_CHAR - entryLength
                self._letterCountLabel.set_text(str(charsLeft))
                if charsLeft < 0 or charsLeft == self.MAX_CHAR:
                        self._smsButton.set_sensitive(False)
-                       self._dialButton.set_sensitive(True)
                else:
                        self._smsButton.set_sensitive(True)
+
+               if entryLength == 0:
+                       self._dialButton.set_sensitive(True)
+               else:
                        self._dialButton.set_sensitive(False)
 
        def _request_number(self):