Added gtkgui_helpers.escape_underscore to not require re module
This commit is contained in:
parent
2da7a542f8
commit
cd1993037a
|
@ -21,7 +21,6 @@
|
||||||
##
|
##
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import time
|
import time
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
|
@ -1037,7 +1036,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
sectext = _('If you close this window, you will be disconnected '
|
sectext = _('If you close this window, you will be disconnected '
|
||||||
'from this room.')
|
'from this room.')
|
||||||
|
|
||||||
escaped_name = re.subn("_", "__", self.name)[0]
|
escaped_name = gtkgui_helpers.escape_underscore(self.name)
|
||||||
dialog = dialogs.ConfirmationDialogCheck(pritext, sectext,
|
dialog = dialogs.ConfirmationDialogCheck(pritext, sectext,
|
||||||
_('Do _not ask me about closing "%s" again' %\
|
_('Do _not ask me about closing "%s" again' %\
|
||||||
escaped_name))
|
escaped_name))
|
||||||
|
|
|
@ -572,3 +572,8 @@ icon=gajim
|
||||||
Description=xmpp
|
Description=xmpp
|
||||||
''' % command)
|
''' % command)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
def escape_underscore(s):
|
||||||
|
'''Escape underlines to prevent them from being interpreted
|
||||||
|
as keyboard accelerators'''
|
||||||
|
return s.replace('_', '__')
|
||||||
|
|
Loading…
Reference in New Issue