diff frontends/src/primitivus/primitivus @ 507:f98bef71a918

frontends, core, plugin XEP-0045: leave implementation + better nick change - memory: individual entity cache can be deleted - plugin XEP-0045: nick change are now detected and userChangedNick signal is sent instead of joined/left - plugin XEP-0045: leave implementation - frontends: userChangedNick signal management - Primitivus: an alert is shown in notification bar in case of error in sendMessage
author Goffi <goffi@goffi.org>
date Fri, 28 Sep 2012 00:26:24 +0200
parents 10119c2a9d33
children 886754295efe
line wrap: on
line diff
--- a/frontends/src/primitivus/primitivus	Thu Sep 27 00:54:42 2012 +0200
+++ b/frontends/src/primitivus/primitivus	Fri Sep 28 00:26:24 2012 +0200
@@ -70,7 +70,7 @@
         urwid.connect_signal(self.notBar.progress,'click',lambda x:self.addWindow(self.progress_wid))
         self.__saved_overlay = None
 
-        self.notify = Notify()
+        self.x_notify = Notify()
     
     def debug(self):
         """convenient method to reset screen and launch p(u)db"""
@@ -299,10 +299,13 @@
         contact = self.contact_list.getContact() ###Based on the fact that there is currently only one contact selectableat once
         if contact:
             chat = self.chat_wins[contact]
-            self.bridge.sendMessage(contact,
+            try:
+                self.bridge.sendMessage(contact,
                                     editBar.get_edit_text(),
                                     mess_type = "groupchat" if chat.type == 'group' else "chat",
                                     profile_key=self.profile)
+            except:
+                self.notify(_("Error while sending message"))
             editBar.set_edit_text('')
 
     def newMessage(self, from_jid, msg, type, to_jid, profile):