From dca6e4e9d15fb20836dc1b7b4e6ee95d87b191c0 Mon Sep 17 00:00:00 2001 From: Denis Fomin <fominde@gmail.com> Date: Sat, 19 Oct 2013 12:32:01 +0400 Subject: [PATCH] Set transient_for for 'Emoticons disabled' warning dialog. See #7185 --- src/gui_interface.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui_interface.py b/src/gui_interface.py index 79263ae5da..db623df20b 100644 --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -1986,6 +1986,10 @@ class Interface: 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 @@ class Interface: # 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 @@ class Interface: 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() -- GitLab