roster.get_status_message don't take pep_dict anymore.

This commit is contained in:
Yann Leboulanger 2009-05-01 10:03:38 +00:00
parent 1c1d6b6c26
commit ef281d8608
2 changed files with 5 additions and 8 deletions

View File

@ -3021,11 +3021,7 @@ class Interface:
self.roster.send_status(a, show, message) self.roster.send_status(a, show, message)
self.roster.send_pep(a, pep_dict) self.roster.send_pep(a, pep_dict)
for show in shows: for show in shows:
if len(shows[show]) == 1: message = self.roster.get_status_message(show, on_message)
pep_dict = helpers.get_pep_dict(shows[show][0])
else:
pep_dict = helpers.get_global_pep()
message = self.roster.get_status_message(show, pep_dict, on_message)
return False return False
def show_systray(self): def show_systray(self):

View File

@ -2099,16 +2099,17 @@ class RosterWindow:
always_ask always_ask
show_pep can be False to hide pep things from status message or True show_pep can be False to hide pep things from status message or True
''' '''
empty_pep = {'activity': '', 'subactivity': '', 'activity_text': '',
'mood': '', 'mood_text': ''}
if show in gajim.config.get_per('defaultstatusmsg'): if show in gajim.config.get_per('defaultstatusmsg'):
if gajim.config.get_per('defaultstatusmsg', show, 'enabled'): if gajim.config.get_per('defaultstatusmsg', show, 'enabled'):
on_response(gajim.config.get_per('defaultstatusmsg', show, on_response(gajim.config.get_per('defaultstatusmsg', show,
'message'), None) 'message'), empty_pep)
return return
if not always_ask and ((show == 'online' and not gajim.config.get( if not always_ask and ((show == 'online' and not gajim.config.get(
'ask_online_status')) or (show in ('offline', 'invisible') and not \ 'ask_online_status')) or (show in ('offline', 'invisible') and not \
gajim.config.get('ask_offline_status'))): gajim.config.get('ask_offline_status'))):
on_response('', {'activity': '', 'subactivity': '', on_response('', empty_pep)
'activity_text': '', 'mood': '', 'mood_text': ''})
return return
dlg = dialogs.ChangeStatusMessageDialog(on_response, show, show_pep) dlg = dialogs.ChangeStatusMessageDialog(on_response, show, show_pep)