diff browser_side/richtext.py @ 319:462a0a8894e3

browser_side: display the good text for microblog button regarding the context: "Send message" or "Update"
author souliane <souliane@mailoo.org>
date Fri, 03 Jan 2014 16:06:00 +0100
parents 05e264e96a1c
children 0b7934e75e76
line wrap: on
line diff
--- a/browser_side/richtext.py	Fri Jan 03 14:19:01 2014 +0100
+++ b/browser_side/richtext.py	Fri Jan 03 16:06:00 2014 +0100
@@ -94,7 +94,7 @@
             if not self.no_sync_unibox:
                 self.command.add(Button("Back to quick box", listener=self.closeAndSave))
             self.command.add(Button("Update" if self.update_msg else "Send message",
-                                    listener=self.__close if self.update_msg else self.sendMessage))
+                                    listener=self.__close if (self.update_msg or self.no_recipient) else self.sendMessage))
             self.getFlexCellFormatter().setColSpan(offset1 + offset2 + 1, 0, 2)
             self.setWidget(offset1 + offset2 + 1, 0, self.command)
 
@@ -256,7 +256,7 @@
 
     def cancelWithoutSaving(self):
         """Ask for confirmation before closing the dialog."""
-        if self.update_msg and self.textarea.getText() == self.original_text:
+        if self.textarea.getText() == self.original_text:
             self.__close(CANCEL)
             return