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
Erik Huelsmann
gajim
Commits
f094f65b
Commit
f094f65b
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
send gone chatstate to every tab when closing a window with many tabs
parent
b8de6a02
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/chat.py
+7
-3
7 additions, 3 deletions
src/chat.py
src/tabbed_chat_window.py
+3
-3
3 additions, 3 deletions
src/tabbed_chat_window.py
with
10 additions
and
6 deletions
src/chat.py
+
7
−
3
View file @
f094f65b
...
...
@@ -141,13 +141,17 @@ class Chat:
def
on_window_destroy
(
self
,
widget
,
kind
):
#kind is 'chats' or 'gc'
#clean self.plugin.windows[self.account][kind]
for
jid
in
self
.
xmls
:
windows
=
self
.
plugin
.
windows
[
self
.
account
][
kind
]
if
kind
==
'
chats
'
:
# send 'gone' chatstate to every tabbed chat tab
windows
[
jid
].
send_chatstate
(
'
gone
'
)
if
self
.
plugin
.
systray_enabled
and
self
.
nb_unread
[
jid
]
>
0
:
self
.
plugin
.
systray
.
remove_jid
(
jid
,
self
.
account
)
del
self
.
plugin
.
windows
[
self
.
account
][
kind
]
[
jid
]
del
windows
[
jid
]
if
self
.
print_time_timeout_id
.
has_key
(
jid
):
gobject
.
source_remove
(
self
.
print_time_timeout_id
[
jid
])
if
self
.
plugin
.
windows
[
self
.
account
][
kind
]
.
has_key
(
'
tabbed
'
):
del
self
.
plugin
.
windows
[
self
.
account
][
kind
]
[
'
tabbed
'
]
if
windows
.
has_key
(
'
tabbed
'
):
del
windows
[
'
tabbed
'
]
def
get_active_jid
(
self
):
notebook
=
self
.
notebook
...
...
This diff is collapsed.
Click to expand it.
src/tabbed_chat_window.py
+
3
−
3
View file @
f094f65b
...
...
@@ -209,8 +209,6 @@ class TabbedChatWindow(chat.Chat):
gajim
.
config
.
set
(
'
chat-height
'
,
height
)
def
on_tabbed_chat_window_destroy
(
self
,
widget
):
# on window destroy, send 'gone' chatstate
self
.
send_chatstate
(
'
gone
'
)
# FIXME: loop to each tab and send that
#clean self.plugin.windows[self.account]['chats']
chat
.
Chat
.
on_window_destroy
(
self
,
widget
,
'
chats
'
)
...
...
@@ -360,8 +358,10 @@ class TabbedChatWindow(chat.Chat):
self
.
send_chatstate
(
'
composing
'
)
def
send_chatstate
(
self
,
state
):
'''
sends our chatstate to the current tab
'''
# please read jep-85 to get an idea of this
# we keep track of jep85 support by the peer by three extra states: None, -1 and 'ask'
# we keep track of jep85 support by the peer by three extra states:
# None, -1 and 'ask'
# None if no info about peer
# -1 if peer does not support jep85
# 'ask' if we sent 'active' chatstate and are waiting for reply
...
...
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