Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gajim-plugins
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
Evert Mouw
gajim-plugins
Commits
6a4d2082
Commit
6a4d2082
authored
7 years ago
by
Dicson
Committed by
Philipp Hörist
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[nicknames] Fix lost gc_refer_to_nick_char
parent
230b5b41
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clickable_nicknames/clickable_nicknames.py
+8
-11
8 additions, 11 deletions
clickable_nicknames/clickable_nicknames.py
with
8 additions
and
11 deletions
clickable_nicknames/clickable_nicknames.py
+
8
−
11
View file @
6a4d2082
...
...
@@ -14,7 +14,7 @@ class ClickableNicknames(GajimPlugin):
def
init
(
self
):
self
.
description
=
_
(
'
Clickable nicknames
'
'
in the conversation textview.
'
)
self
.
config_dialog
=
None
# ClickableNicknamesPluginConfigDialog(self)
self
.
config_dialog
=
None
self
.
gui_extension_points
=
{
'
chat_control_base
'
:
(
self
.
connect_with_chat_control
,
self
.
disconnect_from_chat_control
)}
...
...
@@ -127,19 +127,16 @@ class Base(object):
return
message_buffer
=
self
.
chat_control
.
msg_textview
.
get_buffer
()
if
message_buffer
.
get_char_count
()
<
1
:
nick
=
nick
+
app
.
config
.
get
(
'
gc_refer_to_nick_char
'
)
else
:
start
,
end
=
message_buffer
.
get_bounds
()
if
message_buffer
.
get_text
(
start
,
end
,
True
)[
-
1
]
!=
'
'
:
nick
=
'
'
+
nick
nick
+=
'
'
# delete PLACEHOLDER
start_iter
=
message_buffer
.
get_start_iter
()
end_iter
=
message_buffer
.
get_end_iter
()
start
,
end
=
message_buffer
.
get_bounds
()
placeholder
=
self
.
chat_control
.
msg_textview
.
PLACEHOLDER
if
message_buffer
.
get_text
(
start_iter
,
end_iter
,
False
)
==
placeholder
:
text
=
message_buffer
.
get_text
(
start
,
end
,
False
)
if
text
==
placeholder
or
len
(
text
)
==
0
:
message_buffer
.
set_text
(
''
,
-
1
)
nick
=
nick
+
app
.
config
.
get
(
'
gc_refer_to_nick_char
'
)
elif
len
(
text
)
>
0
and
text
[
-
1
]
!=
'
'
:
nick
=
'
'
+
nick
nick
+=
'
'
message_buffer
.
insert_at_cursor
(
nick
)
self
.
chat_control
.
msg_textview
.
grab_focus
()
...
...
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