dont send just \n
This commit is contained in:
parent
365c7f68ad
commit
2cc9a0aa5c
|
@ -338,13 +338,13 @@ class Groupchat_window(chat.Chat):
|
|||
message_buffer = widget.get_buffer()
|
||||
start_iter = message_buffer.get_start_iter()
|
||||
end_iter = message_buffer.get_end_iter()
|
||||
txt = message_buffer.get_text(start_iter, end_iter, 0)
|
||||
if txt != '':
|
||||
if txt == '/clear':
|
||||
message = message_buffer.get_text(start_iter, end_iter, 0)
|
||||
if message != '' or message != '\n':
|
||||
if message == '/clear':
|
||||
self.on_clear(None, conversation_textview) # clear conversation
|
||||
self.on_clear(None, widget) # clear message textview too
|
||||
return True
|
||||
gajim.connections[self.account].send_gc_message(room_jid, txt)
|
||||
gajim.connections[self.account].send_gc_message(room_jid, message)
|
||||
message_buffer.set_text('', -1)
|
||||
widget.grab_focus()
|
||||
return True
|
||||
|
|
|
@ -84,7 +84,7 @@ class Tabbed_chat_window(chat.Chat):
|
|||
self.xmls[jid].get_widget('gpg_togglebutton').set_sensitive(True)
|
||||
|
||||
nontabbed_status_image = self.xmls[jid].get_widget(
|
||||
'nontabbed_status_image')
|
||||
'nontabbed_status_image')
|
||||
if len(self.xmls) > 1:
|
||||
nontabbed_status_image.hide()
|
||||
else:
|
||||
|
@ -107,7 +107,7 @@ class Tabbed_chat_window(chat.Chat):
|
|||
state_images = self.plugin.roster.get_appropriate_state_images(jid)
|
||||
image = state_images[show]
|
||||
non_tabbed_status_image = self.xmls[jid].get_widget(
|
||||
'nontabbed_status_image')
|
||||
'nontabbed_status_image')
|
||||
if keyID:
|
||||
self.xmls[jid].get_widget('gpg_togglebutton').set_sensitive(True)
|
||||
else:
|
||||
|
@ -234,7 +234,7 @@ class Tabbed_chat_window(chat.Chat):
|
|||
start_iter = message_buffer.get_start_iter()
|
||||
end_iter = message_buffer.get_end_iter()
|
||||
message = message_buffer.get_text(start_iter, end_iter, 0)
|
||||
if message != '':
|
||||
if message != '' or message != '\n':
|
||||
if message == '/clear':
|
||||
self.on_clear(None, conversation_textview) # clear conversation
|
||||
self.on_clear(None, widget) # clear message textview too
|
||||
|
|
Loading…
Reference in New Issue