Bump to 1.2.19
authorEd Page <eopage@byu.net>
Tue, 18 Jan 2011 12:36:47 +0000 (06:36 -0600)
committerEd Page <eopage@byu.net>
Tue, 18 Jan 2011 12:36:47 +0000 (06:36 -0600)
src/constants.py
src/dialogs.py
src/session.py
support/builddeb.py
www/dialcentral.deb

index f3dcc09..73d9b06 100644 (file)
@@ -2,7 +2,7 @@ import os
 
 __pretty_app_name__ = "DialCentral"
 __app_name__ = "dialcentral"
-__version__ = "1.2.18"
+__version__ = "1.2.19"
 __build__ = 0
 __app_magic__ = 0xdeadbeef
 _data_path_ = os.path.join(os.path.expanduser("~"), ".%s" % __app_name__)
index d197436..4fafc78 100644 (file)
@@ -456,11 +456,13 @@ class SMSEntryWindow(object):
                self._scrollTimer.timeout.connect(self._on_delayed_scroll_to_bottom)
 
                self._window.show()
+               self._smsEntry.setPlainText(self._session.draft.message)
                self._update_letter_count()
                self._update_target_fields()
 
        def close(self):
                try:
+                       self._session.draft = unicode(self._smsEntry.toPlainText())
                        self._window.destroy()
                except RuntimeError:
                        _moduleLogger.exception("Oh well")
@@ -624,11 +626,14 @@ class SMSEntryWindow(object):
        def _on_sms_clicked(self, arg):
                with qui_utils.notify_error(self._app.errorLog):
                        message = unicode(self._smsEntry.toPlainText())
-                       self._session.draft.send(message)
+                       self._session.draft = message
+                       self._session.draft.send()
 
        @misc_utils.log_exception(_moduleLogger)
        def _on_call_clicked(self, arg):
                with qui_utils.notify_error(self._app.errorLog):
+                       message = unicode(self._smsEntry.toPlainText())
+                       self._session.draft = message
                        self._session.draft.call()
 
        @QtCore.pyqtSlot()
@@ -726,7 +731,7 @@ class SMSEntryWindow(object):
        @misc_utils.log_exception(_moduleLogger)
        def _on_close_window(self, checked = True):
                with qui_utils.notify_error(self._app.errorLog):
-                       self._window.hide()
+                       self._window.close()
 
 
 def _get_contact_numbers(session, contactId, numberDescription):
index 345fdc5..c002945 100644 (file)
@@ -53,15 +53,18 @@ class Draft(QtCore.QObject):
                self._pool = pool
                self._backend = backend
                self._busyReason = None
+               self._message = ""
 
-       def send(self, text):
+       def send(self):
                assert 0 < len(self._contacts), "No contacts selected"
+               assert 0 < len(self._message), "No message to send"
                numbers = [misc_utils.make_ugly(contact.selectedNumber) for contact in self._contacts.itervalues()]
                le = concurrent.AsyncLinearExecution(self._pool, self._send)
-               le.start(numbers, text)
+               le.start(numbers, self._message)
 
        def call(self):
                assert len(self._contacts) == 1, "Must select 1 and only 1 contact"
+               assert len(self._message) == 0, "Cannot send message with call"
                (contact, ) = self._contacts.itervalues()
                number = misc_utils.make_ugly(contact.selectedNumber)
                le = concurrent.AsyncLinearExecution(self._pool, self._call)
@@ -71,6 +74,16 @@ class Draft(QtCore.QObject):
                le = concurrent.AsyncLinearExecution(self._pool, self._cancel)
                le.start()
 
+       def _get_message(self):
+               return self._message
+
+       def _set_message(self, message):
+               if self._busyReason is not None:
+                       raise RuntimeError("Please wait for %r" % self._busyReason)
+               self._message = message
+
+       message = property(_get_message, _set_message)
+
        def add_contact(self, contactId, title, description, numbersWithDescriptions):
                if self._busyReason is not None:
                        raise RuntimeError("Please wait for %r" % self._busyReason)
@@ -122,6 +135,7 @@ class Draft(QtCore.QObject):
        def _clear(self):
                oldContacts = self._contacts
                self._contacts = {}
+               self._message = ""
                if oldContacts:
                        self.recipientsChanged.emit()
 
index e0b7b60..4a784cd 100755 (executable)
@@ -30,7 +30,7 @@ __email__ = "eopage@byu.net"
 __version__ = constants.__version__
 __build__ = constants.__build__
 __changelog__ = """
-* Temporarilly removing the spurious redraw change until bugs get fixed
+* Doing something I dislike, stop caching the SMS window, to work around Maemo 5 Qt redraw issues with hidden stacked windows
 """.strip()
 
 
index 697e7d5..39db3d6 100644 (file)
Binary files a/www/dialcentral.deb and b/www/dialcentral.deb differ