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 re
|
||||
import time
|
||||
import gtk
|
||||
import gtk.glade
|
||||
|
@ -1037,7 +1036,7 @@ class GroupchatControl(ChatControlBase):
|
|||
sectext = _('If you close this window, you will be disconnected '
|
||||
'from this room.')
|
||||
|
||||
escaped_name = re.subn("_", "__", self.name)[0]
|
||||
escaped_name = gtkgui_helpers.escape_underscore(self.name)
|
||||
dialog = dialogs.ConfirmationDialogCheck(pritext, sectext,
|
||||
_('Do _not ask me about closing "%s" again' %\
|
||||
escaped_name))
|
||||
|
|
|
@ -572,3 +572,8 @@ icon=gajim
|
|||
Description=xmpp
|
||||
''' % command)
|
||||
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