one less blocking dialog
This commit is contained in:
parent
d5a8f75080
commit
150979b3ab
|
@ -644,13 +644,14 @@ class ChangeStatusMessageDialog:
|
|||
msg_name = msg_name.decode('utf-8')
|
||||
|
||||
if msg_name in self.preset_messages_dict:
|
||||
dlg2 = ConfirmationDialog(_('Overwrite Status Message?'),
|
||||
_('This name is already used. Do you want to overwrite this status message?'))
|
||||
resp = dlg2.run()
|
||||
if resp != gtk.RESPONSE_OK:
|
||||
return
|
||||
def on_ok():
|
||||
self.preset_messages_dict[msg_name] = msg_text
|
||||
else:
|
||||
gajim.config.set_per('statusmsg', msg_name, 'message',
|
||||
msg_text_1l)
|
||||
dlg2 = ConfirmationDialog(_('Overwrite Status Message?'),
|
||||
_('This name is already used. Do you want to overwrite this '
|
||||
'status message?'), on_response_ok=on_ok)
|
||||
return
|
||||
self.preset_messages_dict[msg_name] = msg_text
|
||||
iter_ = self.message_liststore.append((msg_name,))
|
||||
gajim.config.add_per('statusmsg', msg_name)
|
||||
|
@ -1207,8 +1208,8 @@ class AspellDictError:
|
|||
|
||||
class ConfirmationDialog(HigDialog):
|
||||
'''HIG compliant confirmation dialog.'''
|
||||
def __init__(self, pritext, sectext='', on_response_ok = None,
|
||||
on_response_cancel = None):
|
||||
def __init__(self, pritext, sectext='', on_response_ok=None,
|
||||
on_response_cancel=None):
|
||||
self.user_response_ok = on_response_ok
|
||||
self.user_response_cancel = on_response_cancel
|
||||
HigDialog.__init__(self, None,
|
||||
|
|
Loading…
Reference in New Issue