fix jep0070 accidental reversion
This commit is contained in:
parent
8e7ad66056
commit
73a4bf97e8
11
src/chat.py
11
src/chat.py
|
@ -62,6 +62,7 @@ class Chat:
|
|||
self.names = {} # what is printed in the tab (eg. user.name)
|
||||
self.childs = {} # holds the contents for every tab (VBox)
|
||||
self.popup_is_shown = False # is a context menu shown or not?
|
||||
self.how_many_switch_to = 0 # how many switch to menuitems we have added
|
||||
|
||||
# the following vars are used to keep history of user's messages
|
||||
self.sent_history = {}
|
||||
|
@ -233,14 +234,7 @@ class Chat:
|
|||
childs[5].set_no_show_all(True)
|
||||
|
||||
for child in childs[6:]: # start looping after Add to roster
|
||||
grandchilds = child.get_children()
|
||||
# check because seperator menuitem doesn't have childs
|
||||
if len(grandchilds):
|
||||
accel_label = grandchilds[0]
|
||||
if accel_label.get_text().startswith(_('Switch to')):
|
||||
menu.remove(child)
|
||||
else: # remove the seperator
|
||||
menu.remove(child)
|
||||
menu.remove(child)
|
||||
|
||||
return menu
|
||||
|
||||
|
@ -285,6 +279,7 @@ class Chat:
|
|||
item.connect('activate', lambda obj, jid:self.set_active_tab(
|
||||
jid), jid)
|
||||
menu.append(item)
|
||||
self.how_many_switch_to += 1
|
||||
|
||||
# show the menu
|
||||
menu.popup(None, None, None, event.button, event.time)
|
||||
|
|
|
@ -202,7 +202,7 @@ class Interface:
|
|||
def handle_event_http_auth(self, account, data):
|
||||
#('HTTP_AUTH', account, (method, url, iq_obj))
|
||||
dialog = dialogs.ConfirmationDialog(_('HTTP (%s) Authorization for %s') \
|
||||
% (array[0], array[1]), _('Do you accept this request?'))
|
||||
% (data[0], data[1]), _('Do you accept this request?'))
|
||||
if dialog.get_response() == gtk.RESPONSE_OK:
|
||||
answer = 'yes'
|
||||
else:
|
||||
|
@ -999,6 +999,7 @@ class Interface:
|
|||
self.handle_event_file_send_error)
|
||||
con.register_handler('STANZA_ARRIVED', self.handle_event_stanza_arrived)
|
||||
con.register_handler('STANZA_SENT', self.handle_event_stanza_sent)
|
||||
con.register_handler('HTTP_AUTH', self.handle_event_http_auth)
|
||||
|
||||
def process_connections(self):
|
||||
try:
|
||||
|
|
|
@ -389,6 +389,9 @@ class TabbedChatWindow(chat.Chat):
|
|||
in the last 5 seconds?
|
||||
if yes we go active for mouse, composing for kbd
|
||||
if no we go paused if we were previously composing '''
|
||||
if jid not in self.xmls:
|
||||
# the tab with jid is no longer open. stop timer
|
||||
return False # stop looping
|
||||
current_state = self.chatstates[jid]
|
||||
if current_state is False: # jid doesn't support chatstates
|
||||
return False # stop looping
|
||||
|
@ -412,6 +415,10 @@ class TabbedChatWindow(chat.Chat):
|
|||
in the last 30 seconds?
|
||||
if yes we go active
|
||||
if no we go inactive '''
|
||||
if jid not in self.xmls:
|
||||
# the tab with jid is no longer open. stop timer
|
||||
return False # stop looping
|
||||
|
||||
current_state = self.chatstates[jid]
|
||||
if current_state is False: # jid doesn't support chatstates
|
||||
return False # stop looping
|
||||
|
|
Loading…
Reference in New Issue