changeset e65971276cf2 in /home/hg/repos/gajim
author: Denis Fomin <fominde(a)gmail.com>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=e65971276cf2
description: Disable emoticons if emoticons.py is corrupted. Fixes #7414. Fixes #7513
diffstat:
src/gui_interface.py | 25 ++++++++++++++++++-------
1 файлов изменено, 18 вставок(+), 7 удалений(-)
различия (50 строк):
diff -r 67a5b3059a0f -r e65971276cf2 src/gui_interface.py
--- a/src/gui_interface.py Sat Oct 19 12:32:01 2013 +0400
+++ b/src/gui_interface.py Sat Oct 19 14:06:06 2013 +0400
@@ -1955,13 +1955,16 @@
self.emoticons = dict()
self.emoticons_animations = dict()
- sys.path.append(path)
+ sys.path.insert(0, path)
import emoticons
- if need_reload:
- # we need to reload else that doesn't work when changing emoticon
- # set
- reload(emoticons)
- emots = emoticons.emoticons
+ try:
+ if need_reload:
+ # we need to reload else that doesn't work when changing emoticon
+ # set
+ reload(emoticons)
+ emots = emoticons.emoticons
+ except Exception, e:
+ return True
for emot_filename in emots:
emot_file = os.path.join(path, emot_filename)
if not self.image_is_ok(emot_file):
@@ -2002,7 +2005,14 @@
transient_for=transient_for)
gajim.config.set('emoticons_theme', '')
return
- self._init_emoticons(path, need_reload)
+ if self._init_emoticons(path, need_reload):
+ dialogs.WarningDialog(_('Emoticons disabled'),
+ _('Your configured emoticons theme cannot been loaded. You '
+ 'maybe need to update the format of emoticons.py file. See '
+ 'http://trac.gajim.org/wiki/Emoticons for more details.'),
+ transient_for=transient_for)
+ gajim.config.set('emoticons_theme', '')
+ return
if len(self.emoticons) == 0:
# maybe old format of emoticons file, try to convert it
try:
@@ -2025,6 +2035,7 @@
'maybe need to update the format of emoticons.py file. See '
'http://trac.gajim.org/wiki/Emoticons for more details.'),
transient_for=transient_for)
+ gajim.config.set('emoticons_theme', '')
if self.emoticons_menu:
self.emoticons_menu.destroy()
self.emoticons_menu = self.prepare_emoticons_menu()
changeset 67a5b3059a0f in /home/hg/repos/gajim
author: Denis Fomin <fominde(a)gmail.com>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=67a5b3059a0f
description: Set transient_for for 'Emoticons disabled' warning dialog. See #7185
diffstat:
src/gui_interface.py | 10 ++++++++--
1 файлов изменено, 8 вставок(+), 2 удалений(-)
различия (34 строк):
diff -r 08695479a11e -r 67a5b3059a0f src/gui_interface.py
--- a/src/gui_interface.py Wed Oct 16 00:05:16 2013 +0400
+++ b/src/gui_interface.py Sat Oct 19 12:32:01 2013 +0400
@@ -1986,6 +1986,10 @@
if not emot_theme:
return
+ transient_for = None
+ if 'preferences' in gajim.interface.instances:
+ transient_for = gajim.interface.instances['preferences'].window
+
path = os.path.join(gajim.DATA_DIR, 'emoticons', emot_theme)
if not os.path.exists(path):
# It's maybe a user theme
@@ -1994,7 +1998,8 @@
# theme doesn't exist, disable emoticons
dialogs.WarningDialog(_('Emoticons disabled'),
_('Your configured emoticons theme has not been found, so '
- 'emoticons have been disabled.'))
+ 'emoticons have been disabled.'),
+ transient_for=transient_for)
gajim.config.set('emoticons_theme', '')
return
self._init_emoticons(path, need_reload)
@@ -2018,7 +2023,8 @@
dialogs.WarningDialog(_('Emoticons disabled'),
_('Your configured emoticons theme cannot been loaded. You '
'maybe need to update the format of emoticons.py file. See '
- 'http://trac.gajim.org/wiki/Emoticons for more details.'))
+ 'http://trac.gajim.org/wiki/Emoticons for more details.'),
+ transient_for=transient_for)
if self.emoticons_menu:
self.emoticons_menu.destroy()
self.emoticons_menu = self.prepare_emoticons_menu()
changeset 934baf987fc6 in /home/hg/repos/gajim
author: Denis Fomin <fominde(a)gmail.com>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=934baf987fc6
description: Set gajim-remote to not active by default. Fixes #7454
diffstat:
src/common/config.py | 2 +-
1 файлов изменено, 1 вставок(+), 1 удалений(-)
различия (12 строк):
diff -r f57508eee203 -r 934baf987fc6 src/common/config.py
--- a/src/common/config.py Tue Oct 15 09:59:05 2013 +0400
+++ b/src/common/config.py Tue Oct 15 23:56:20 2013 +0400
@@ -191,7 +191,7 @@
'dictionary_url': [opt_str, 'WIKTIONARY', _("Either custom url with %s in it where %s is the word/phrase or 'WIKTIONARY' which means use wiktionary.")],
'always_english_wikipedia': [opt_bool, False],
'always_english_wiktionary': [opt_bool, True],
- 'remote_control': [opt_bool, True, _('If checked, Gajim can be controlled remotely using gajim-remote.'), True],
+ 'remote_control': [opt_bool, False, _('If checked, Gajim can be controlled remotely using gajim-remote.'), True],
'networkmanager_support': [opt_bool, True, _('If True, listen to D-Bus signals from NetworkManager and change the status of accounts (provided they do not have listen_to_network_manager set to False and they sync with global status) based upon the status of the network connection.'), True],
'outgoing_chat_state_notifications': [opt_str, 'all', _('Sent chat state notifications. Can be one of all, composing_only, disabled.')],
'displayed_chat_state_notifications': [opt_str, 'all', _('Displayed chat state notifications in chat windows. Can be one of all, composing_only, disabled.')],