changeset 579491c3b3f8 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=579491c3b3f8
description: Show a confirmation dialog first time we block a contact. Fixes #3646
diffstat:
src/common/config.py | 2 ++
src/roster_window.py | 23 ++++++++++++++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)
diffs (59 lines):
diff -r 6a14b13c195e -r 579491c3b3f8 src/common/config.py
--- a/src/common/config.py Thu Sep 10 22:12:52 2009 +0200
+++ b/src/common/config.py Fri Sep 11 00:01:56 2009 +0200
@@ -249,6 +249,8 @@
'gc_nicknames_colors': [ opt_str, '#a34526:#c000ff:#0012ff:#388a99:#045723:#7c7c7c:#ff8a00:#94452d:#244b5a:#32645a', _('List of colors, separated by ":", that will be used to color nicknames in group chats.'), True ],
'ctrl_tab_go_to_next_composing': [opt_bool, True, _('Ctrl-Tab go to next composing tab when none is unread.')],
'confirm_metacontacts': [ opt_str, '', _('Should we show the confirm metacontacts creation dialog or not? Empty string means we never show the dialog.')],
+ 'confirm_block': [ opt_str, '', _('Should we show the confirm block contact dialog or not? Empty string means we never show the dialog.')],
+ 'confirm_custom_status': [ opt_str, '', _('Should we show the confirm custom status dialog or not? Empty string means we never show the dialog.')],
'enable_negative_priority': [ opt_bool, False, _('If True, you will be able to set a negative priority to your account in account modification window. BE CAREFUL, when you are logged in with a negative priority, you will NOT receive any message from your server.')],
'use_gnomekeyring': [opt_bool, True, _('If True, Gajim will use Gnome Keyring (if available) to store account passwords.')],
'use_kwalletcli': [opt_bool, True, _('If True, Gajim will use KDE Wallet (if kwalletcli is available) to store account passwords.')],
diff -r 6a14b13c195e -r 579491c3b3f8 src/roster_window.py
--- a/src/roster_window.py Thu Sep 10 22:12:52 2009 +0200
+++ b/src/roster_window.py Fri Sep 11 00:01:56 2009 +0200
@@ -2575,7 +2575,24 @@
connection.set_default_list('block')
connection.get_privacy_list('block')
- self.get_status_message('offline', on_continue, show_pep=False)
+ def _block_it(is_checked=None):
+ if is_checked is not None: # dialog has been shown
+ if is_checked: # user does not want to be asked again
+ gajim.config.set('confirm_block', 'no')
+ else:
+ gajim.config.set('confirm_block', 'yes')
+ self.get_status_message('offline', on_continue, show_pep=False)
+
+ confirm_block = gajim.config.get('confirm_block')
+ if confirm_block == 'no':
+ _block_it()
+ return
+ pritext = _('You are about to block a contact. Are you sure you want'
+ ' to continue?')
+ sectext = _('This contact will see you offline and you will not receive '
+ 'messages he will send you.')
+ dlg = dialogs.ConfirmationDialogCheck(pritext, sectext,
+ _('Do _not ask me again'), on_response_ok=_block_it)
def on_unblock(self, widget, list_, group=None):
''' When clicked on the 'unblock' button in context menu. '''
@@ -2828,7 +2845,7 @@
self.remove_groupchat(jid, account)
def on_send_single_message_menuitem_activate(self, widget, account,
- contact = None):
+ contact=None):
if contact is None:
dialogs.SingleMessageWindow(account, action='send')
elif isinstance(contact, list):
@@ -2878,7 +2895,7 @@
break
def on_invite_to_room(self, widget, list_, room_jid, room_account,
- resource = None):
+ resource=None):
''' resource parameter MUST NOT be used if more than one contact in
list '''
for e in list_:
changeset 6a14b13c195e in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=6a14b13c195e
description: show confirmation dialog first time we send custom status. see #3646
diffstat:
src/roster_window.py | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r d2d90181df52 -r 6a14b13c195e src/roster_window.py
--- a/src/roster_window.py Thu Sep 10 18:30:26 2009 +0200
+++ b/src/roster_window.py Thu Sep 10 22:12:52 2009 +0200
@@ -3184,8 +3184,26 @@
jid += '/' + contact.resource
self.send_status(account, show, message, to=jid)
- self.get_status_message(show, on_response, show_pep=False,
- always_ask=True)
+ def send_it(is_checked=None):
+ if is_checked is not None: # dialog has been shown
+ if is_checked: # user does not want to be asked again
+ gajim.config.set('confirm_custom_status', 'no')
+ else:
+ gajim.config.set('confirm_custom_status', 'yes')
+ self.get_status_message(show, on_response, show_pep=False,
+ always_ask=True)
+
+ confirm_custom_status = gajim.config.get('confirm_custom_status')
+ if confirm_custom_status == 'no':
+ send_it()
+ return
+ pritext = _('You are about to send a custom status. Are you sure you want'
+ ' to continue?')
+ sectext = _('This contact will temporarily see you as %(status)s, '
+ 'but only until you change your status. Then he will see your global '
+ 'status.') % {'status': show}
+ dlg = dialogs.ConfirmationDialogCheck(pritext, sectext,
+ _('Do _not ask me again'), on_response_ok=send_it)
def on_status_combobox_changed(self, widget):
'''When we change our status via the combobox'''
changeset d2d90181df52 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=d2d90181df52
description: show notification for bad GPG pass instead of an error dialog
diffstat:
src/common/connection_handlers.py | 4 +---
src/gajim.py | 9 +++++++--
2 files changed, 8 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r fbb0e6a63a64 -r d2d90181df52 src/common/connection_handlers.py
--- a/src/common/connection_handlers.py Thu Sep 10 13:54:44 2009 +0200
+++ b/src/common/connection_handlers.py Thu Sep 10 18:30:26 2009 +0200
@@ -2615,9 +2615,7 @@
if sign_msg and not signed:
signed = self.get_signed_presence(msg)
if signed is None:
- self.dispatch('ERROR', (_('OpenPGP passphrase was not given'),
- #%s is the account name here
- _('You will be connected to %s without OpenPGP.') % self.name))
+ self.dispatch('BAD_PASSPHRASE', ())
self.USE_GPG = False
signed = ''
self.connected = gajim.SHOW_LIST.index(show)
diff -r fbb0e6a63a64 -r d2d90181df52 src/gajim.py
--- a/src/gajim.py Thu Sep 10 13:54:44 2009 +0200
+++ b/src/gajim.py Thu Sep 10 18:30:26 2009 +0200
@@ -1509,10 +1509,15 @@
if use_gpg_agent:
sectext = _('You configured Gajim to use GPG agent, but there is no '
'GPG agent running or it returned a wrong passphrase.\n')
- sectext += _('You are currently connected without your OpenPGP key.')
+ sectext += _('You are currently connected without your OpenPGP key.')
+ dialogs.WarningDialog(_('Your passphrase is incorrect'), sectext)
+ else:
+ path = os.path.join(gajim.DATA_DIR, 'pixmaps', 'warning.png')
+ notify.popup('warning', account, account, 'warning', path,
+ _('OpenGPG Passphrase Incorrect'),
+ _('You are currently connected without your OpenPGP key.'))
keyID = gajim.config.get_per('accounts', account, 'keyid')
self.forget_gpg_passphrase(keyID)
- dialogs.WarningDialog(_('Your passphrase is incorrect'), sectext)
def handle_event_gpg_password_required(self, account, array):
#('GPG_PASSWORD_REQUIRED', account, (callback,))