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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Peter Shkenev
gajim
Commits
73a4bf97
Commit
73a4bf97
authored
19 years ago
by
nkour
Browse files
Options
Downloads
Patches
Plain Diff
fix jep0070 accidental reversion
parent
8e7ad660
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/chat.py
+3
-8
3 additions, 8 deletions
src/chat.py
src/gajim.py
+2
-1
2 additions, 1 deletion
src/gajim.py
src/tabbed_chat_window.py
+7
-0
7 additions, 0 deletions
src/tabbed_chat_window.py
with
12 additions
and
9 deletions
src/chat.py
+
3
−
8
View file @
73a4bf97
...
...
@@ -62,6 +62,7 @@ def __init__(self, plugin, account, widget_name):
self
.
names
=
{}
# what is printed in the tab (eg. user.name)
self
.
childs
=
{}
# holds the contents for every tab (VBox)
self
.
popup_is_shown
=
False
# is a context menu shown or not?
self
.
how_many_switch_to
=
0
# how many switch to menuitems we have added
# the following vars are used to keep history of user's messages
self
.
sent_history
=
{}
...
...
@@ -233,14 +234,7 @@ def remove_possible_switch_to_menuitems(self, menu):
childs
[
5
].
set_no_show_all
(
True
)
for
child
in
childs
[
6
:]:
# start looping after Add to roster
grandchilds
=
child
.
get_children
()
# check because seperator menuitem doesn't have childs
if
len
(
grandchilds
):
accel_label
=
grandchilds
[
0
]
if
accel_label
.
get_text
().
startswith
(
_
(
'
Switch to
'
)):
menu
.
remove
(
child
)
else
:
# remove the seperator
menu
.
remove
(
child
)
menu
.
remove
(
child
)
return
menu
...
...
@@ -285,6 +279,7 @@ def popup_menu(self, event):
item
.
connect
(
'
activate
'
,
lambda
obj
,
jid
:
self
.
set_active_tab
(
jid
),
jid
)
menu
.
append
(
item
)
self
.
how_many_switch_to
+=
1
# show the menu
menu
.
popup
(
None
,
None
,
None
,
event
.
button
,
event
.
time
)
...
...
This diff is collapsed.
Click to expand it.
src/gajim.py
+
2
−
1
View file @
73a4bf97
...
...
@@ -202,7 +202,7 @@ def handle_event_information(self, unused, data):
def
handle_event_http_auth
(
self
,
account
,
data
):
#('HTTP_AUTH', account, (method, url, iq_obj))
dialog
=
dialogs
.
ConfirmationDialog
(
_
(
'
HTTP (%s) Authorization for %s
'
)
\
%
(
array
[
0
],
array
[
1
]),
_
(
'
Do you accept this request?
'
))
%
(
data
[
0
],
data
[
1
]),
_
(
'
Do you accept this request?
'
))
if
dialog
.
get_response
()
==
gtk
.
RESPONSE_OK
:
answer
=
'
yes
'
else
:
...
...
@@ -999,6 +999,7 @@ def register_handlers(self, con):
self
.
handle_event_file_send_error
)
con
.
register_handler
(
'
STANZA_ARRIVED
'
,
self
.
handle_event_stanza_arrived
)
con
.
register_handler
(
'
STANZA_SENT
'
,
self
.
handle_event_stanza_sent
)
con
.
register_handler
(
'
HTTP_AUTH
'
,
self
.
handle_event_http_auth
)
def
process_connections
(
self
):
try
:
...
...
This diff is collapsed.
Click to expand it.
src/tabbed_chat_window.py
+
7
−
0
View file @
73a4bf97
...
...
@@ -389,6 +389,9 @@ def check_for_possible_paused_chatstate(self, jid):
in the last 5 seconds?
if yes we go active for mouse, composing for kbd
if no we go paused if we were previously composing
'''
if
jid
not
in
self
.
xmls
:
# the tab with jid is no longer open. stop timer
return
False
# stop looping
current_state
=
self
.
chatstates
[
jid
]
if
current_state
is
False
:
# jid doesn't support chatstates
return
False
# stop looping
...
...
@@ -412,6 +415,10 @@ def check_for_possible_inactive_chatstate(self, jid):
in the last 30 seconds?
if yes we go active
if no we go inactive
'''
if
jid
not
in
self
.
xmls
:
# the tab with jid is no longer open. stop timer
return
False
# stop looping
current_state
=
self
.
chatstates
[
jid
]
if
current_state
is
False
:
# jid doesn't support chatstates
return
False
# stop looping
...
...
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