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
eta
gajim
Commits
e76ac7f4
Commit
e76ac7f4
authored
19 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
introduce get_full_jid for MessageControl. Fix TB when removing a tab with a resource. see #1697
parent
01a99ee7
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/message_control.py
+5
-0
5 additions, 0 deletions
src/message_control.py
src/message_window.py
+3
-4
3 additions, 4 deletions
src/message_window.py
with
8 additions
and
4 deletions
src/message_control.py
+
5
−
0
View file @
e76ac7f4
...
...
@@ -59,6 +59,11 @@ class MessageControl:
# Autoconnect glade signals
self
.
xml
.
signal_autoconnect
(
self
)
def
get_full_jid
(
self
):
fjid
=
self
.
contact
.
jid
if
self
.
resource
:
fjid
+=
'
/
'
+
self
.
resource
def
set_control_active
(
self
,
state
):
'''
Called when the control becomes active (state is True)
or inactive (state is False)
'''
...
...
This diff is collapsed.
Click to expand it.
src/message_window.py
+
3
−
4
View file @
e76ac7f4
...
...
@@ -139,9 +139,7 @@ class MessageWindow:
def
new_tab
(
self
,
control
):
if
not
self
.
_controls
.
has_key
(
control
.
account
):
self
.
_controls
[
control
.
account
]
=
{}
fjid
=
control
.
contact
.
jid
if
control
.
resource
:
fjid
+=
'
/
'
+
control
.
resource
fjid
=
control
.
get_full_jid
()
self
.
_controls
[
control
.
account
][
fjid
]
=
control
if
self
.
get_num_controls
()
>
1
:
...
...
@@ -268,7 +266,8 @@ class MessageWindow:
self
.
disconnect_tab_dnd
(
ctrl
.
widget
)
self
.
notebook
.
remove_page
(
self
.
notebook
.
page_num
(
ctrl
.
widget
))
del
self
.
_controls
[
ctrl
.
account
][
ctrl
.
contact
.
jid
]
fjid
=
control
.
get_full_jid
()
del
self
.
_controls
[
ctrl
.
account
][
fjid
]
if
len
(
self
.
_controls
[
ctrl
.
account
])
==
0
:
del
self
.
_controls
[
ctrl
.
account
]
...
...
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