Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Weblate
gajim
Commits
cd199303
Commit
cd199303
authored
19 years ago
by
nicfit
Browse files
Options
Downloads
Patches
Plain Diff
Added gtkgui_helpers.escape_underscore to not require re module
parent
2da7a542
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/groupchat_control.py
+1
-2
1 addition, 2 deletions
src/groupchat_control.py
src/gtkgui_helpers.py
+5
-0
5 additions, 0 deletions
src/gtkgui_helpers.py
with
6 additions
and
2 deletions
src/groupchat_control.py
+
1
−
2
View file @
cd199303
...
...
@@ -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
))
...
...
This diff is collapsed.
Click to expand it.
src/gtkgui_helpers.py
+
5
−
0
View file @
cd199303
...
...
@@ -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
(
'
_
'
,
'
__
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment