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
5ff6ce2c
Commit
5ff6ce2c
authored
16 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
don't fail when first connection fails and we try to show profile window. see #4717
parent
66aa2b5a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gajim.py
+20
-1
20 additions, 1 deletion
src/gajim.py
with
20 additions
and
1 deletion
src/gajim.py
+
20
−
1
View file @
5ff6ce2c
...
...
@@ -423,6 +423,7 @@ parser = optparser.OptionsParser(config_filename)
import
roster_window
import
profile_window
import
config
from
threading
import
Thread
class
PassphraseRequest
:
...
...
@@ -482,6 +483,22 @@ class PassphraseRequest:
cancel_handler
=
_cancel
)
self
.
dialog_created
=
True
class
ThreadInterface
:
def
__init__
(
self
,
func
,
func_args
,
callback
,
callback_args
):
'''
Call a function in a thread
:param func: the function to call in the thread
:param func_args: list or arguments for this function
:param callback: callback to call once function is finished
:param callback_args: list of arguments for this callback
'''
def
thread_function
(
func
,
func_args
,
callback
,
callback_args
):
output
=
func
(
*
func_args
)
gobject
.
idle_add
(
callback
,
output
,
*
callback_args
)
Thread
(
target
=
thread_function
,
args
=
(
func
,
func_args
,
callback
,
callback_args
)).
start
()
class
Interface
:
################################################################################
...
...
@@ -636,7 +653,8 @@ class Interface:
ctrl
.
parent_win
.
redraw_tab
(
ctrl
)
self
.
roster
.
on_status_changed
(
account
,
status
)
if
account
in
self
.
show_vcard_when_connect
:
if
account
in
self
.
show_vcard_when_connect
and
status
not
in
(
'
offline
'
,
'
error
'
):
self
.
edit_own_details
(
account
)
if
self
.
remote_ctrl
:
self
.
remote_ctrl
.
raise_signal
(
'
AccountPresence
'
,
(
status
,
account
))
...
...
@@ -3063,6 +3081,7 @@ class Interface:
def
__init__
(
self
):
gajim
.
interface
=
self
gajim
.
thread_interface
=
ThreadInterface
# This is the manager and factory of message windows set by the module
self
.
msg_win_mgr
=
None
self
.
jabber_state_images
=
{
'
16
'
:
{},
'
32
'
:
{},
'
opened
'
:
{},
...
...
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