Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
196
Issues
196
List
Boards
Labels
Service Desk
Milestones
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim
Commits
fdfb0864
Commit
fdfb0864
authored
May 16, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PluginManager: Remove obsolete check on handler registration
parent
fbd65d79
Pipeline
#5647
passed with stages
in 2 minutes and 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
gajim/common/client.py
gajim/common/client.py
+0
-2
gajim/plugins/pluginmanager.py
gajim/plugins/pluginmanager.py
+4
-12
No files found.
gajim/common/client.py
View file @
fdfb0864
...
...
@@ -57,7 +57,6 @@ def __init__(self, account):
self
.
password
=
None
self
.
_priority
=
0
self
.
handlers_registered
=
False
self
.
_connect_machine_calls
=
0
self
.
avatar_conversion
=
False
self
.
addressing_supported
=
False
...
...
@@ -175,7 +174,6 @@ def _create_client(self):
for
handler
in
modules
.
get_handlers
(
self
):
self
.
_client
.
register_handler
(
handler
)
self
.
handlers_registered
=
True
def
process_ssl_errors
(
self
):
if
not
self
.
_ssl_errors
:
...
...
gajim/plugins/pluginmanager.py
View file @
fdfb0864
...
...
@@ -406,13 +406,8 @@ def _register_modules_with_handlers(self, plugin):
instance
,
name
=
module
.
get_instance
(
con
)
modules
.
register_single_module
(
con
,
instance
,
name
)
# If handlers have been registered, register the
# plugin handlers. Otherwise this will be done
# automatically on connecting
# in connection_handlers._register_handlers()
if
con
.
handlers_registered
:
for
handler
in
instance
.
handlers
:
con
.
connection
.
register_handler
(
handler
)
for
handler
in
instance
.
handlers
:
con
.
connection
.
register_handler
(
handler
)
def
_unregister_modules_with_handlers
(
self
,
plugin
):
if
not
hasattr
(
plugin
,
'modules'
):
...
...
@@ -422,11 +417,8 @@ def _unregister_modules_with_handlers(self, plugin):
instance
=
con
.
get_module
(
module
.
name
)
modules
.
unregister_single_module
(
con
,
module
.
name
)
# Account is still connected and handlers are registered
# So just unregister the plugin handlers
if
con
.
handlers_registered
:
for
handler
in
instance
.
handlers
:
con
.
connection
.
unregister_handler
(
handler
)
for
handler
in
instance
.
handlers
:
con
.
connection
.
unregister_handler
(
handler
)
def
activate_plugin
(
self
,
plugin
):
'''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment