Skip to content
Snippets Groups Projects
Commit cd199303 authored by nicfit's avatar nicfit
Browse files

Added gtkgui_helpers.escape_underscore to not require re module

parent 2da7a542
No related branches found
No related tags found
No related merge requests found
......@@ -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('_', '__')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment