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
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor 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
mesonium
gajim
Commits
a75c42f6
Commit
a75c42f6
authored
4 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused code
parent
f8e137fa
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
gajim/common/connection_handlers.py
+0
-16
0 additions, 16 deletions
gajim/common/connection_handlers.py
gajim/common/connection_handlers_events.py
+0
-40
0 additions, 40 deletions
gajim/common/connection_handlers_events.py
gajim/gui_interface.py
+0
-20
0 additions, 20 deletions
gajim/gui_interface.py
with
0 additions
and
76 deletions
gajim/common/connection_handlers.py
+
0
−
16
View file @
a75c42f6
...
@@ -28,12 +28,9 @@
...
@@ -28,12 +28,9 @@
import
operator
import
operator
import
nbxmpp
import
nbxmpp
from
nbxmpp.namespaces
import
Namespace
from
gajim.common
import
app
from
gajim.common
import
app
from
gajim.common.connection_handlers_events
import
StreamReceivedEvent
from
gajim.common.connection_handlers_events
import
PresenceReceivedEvent
from
gajim.common.connection_handlers_events
import
PresenceReceivedEvent
from
gajim.common.connection_handlers_events
import
StreamConflictReceivedEvent
from
gajim.common.connection_handlers_events
import
NotificationEvent
from
gajim.common.connection_handlers_events
import
NotificationEvent
...
@@ -181,17 +178,4 @@ def __init__(self):
...
@@ -181,17 +178,4 @@ def __init__(self):
ConnectionHandlersBase
.
__init__
(
self
)
ConnectionHandlersBase
.
__init__
(
self
)
app
.
nec
.
register_incoming_event
(
PresenceReceivedEvent
)
app
.
nec
.
register_incoming_event
(
PresenceReceivedEvent
)
app
.
nec
.
register_incoming_event
(
StreamConflictReceivedEvent
)
app
.
nec
.
register_incoming_event
(
NotificationEvent
)
app
.
nec
.
register_incoming_event
(
NotificationEvent
)
def
_StreamCB
(
self
,
con
,
obj
):
log
.
debug
(
'
StreamCB
'
)
app
.
nec
.
push_incoming_event
(
StreamReceivedEvent
(
None
,
conn
=
self
,
stanza
=
obj
))
def
_register_handlers
(
self
,
con
,
con_type
):
# try to find another way to register handlers in each class
# that defines handlers
con
.
RegisterHandler
(
'
unknown
'
,
self
.
_StreamCB
,
Namespace
.
XMPP_STREAMS
,
xmlns
=
Namespace
.
STREAMS
)
This diff is collapsed.
Click to expand it.
gajim/common/connection_handlers_events.py
+
0
−
40
View file @
a75c42f6
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
import
logging
import
logging
import
OpenSSL.crypto
from
nbxmpp.namespaces
import
Namespace
from
nbxmpp.namespaces
import
Namespace
from
gajim.common
import
nec
from
gajim.common
import
nec
...
@@ -27,7 +26,6 @@
...
@@ -27,7 +26,6 @@
from
gajim.common
import
app
from
gajim.common
import
app
from
gajim.common
import
i18n
from
gajim.common
import
i18n
from
gajim.common.i18n
import
_
from
gajim.common.i18n
import
_
from
gajim.common.const
import
SSLError
from
gajim.common.jingle_transport
import
JingleTransportSocks5
from
gajim.common.jingle_transport
import
JingleTransportSocks5
from
gajim.common.file_props
import
FilesProp
from
gajim.common.file_props
import
FilesProp
...
@@ -35,18 +33,6 @@
...
@@ -35,18 +33,6 @@
log
=
logging
.
getLogger
(
'
gajim.c.connection_handlers_events
'
)
log
=
logging
.
getLogger
(
'
gajim.c.connection_handlers_events
'
)
class
StreamReceivedEvent
(
nec
.
NetworkIncomingEvent
):
name
=
'
stream-received
'
class
StreamConflictReceivedEvent
(
nec
.
NetworkIncomingEvent
):
name
=
'
stream-conflict-received
'
base_network_events
=
[
'
stream-received
'
]
def
generate
(
self
):
if
self
.
base_event
.
stanza
.
getTag
(
'
conflict
'
):
self
.
conn
=
self
.
base_event
.
conn
return
True
class
PresenceReceivedEvent
(
nec
.
NetworkIncomingEvent
):
class
PresenceReceivedEvent
(
nec
.
NetworkIncomingEvent
):
name
=
'
presence-received
'
name
=
'
presence-received
'
...
@@ -59,32 +45,6 @@ def init(self):
...
@@ -59,32 +45,6 @@ def init(self):
class
MessageSentEvent
(
nec
.
NetworkIncomingEvent
):
class
MessageSentEvent
(
nec
.
NetworkIncomingEvent
):
name
=
'
message-sent
'
name
=
'
message-sent
'
class
NewAccountConnectedEvent
(
nec
.
NetworkIncomingEvent
):
name
=
'
new-account-connected
'
def
generate
(
self
):
try
:
self
.
errnum
=
self
.
conn
.
connection
.
Connection
.
ssl_errnum
except
AttributeError
:
self
.
errnum
=
0
# we don't have an errnum
self
.
ssl_msg
=
''
if
self
.
errnum
>
0
:
self
.
ssl_msg
=
SSLError
.
get
(
self
.
errnum
,
_
(
'
Unknown SSL error: %d
'
)
%
self
.
errnum
)
self
.
ssl_cert
=
''
self
.
ssl_fingerprint_sha1
=
''
self
.
ssl_fingerprint_sha256
=
''
if
self
.
conn
.
connection
.
Connection
.
ssl_certificate
:
cert
=
self
.
conn
.
connection
.
Connection
.
ssl_certificate
self
.
ssl_cert
=
OpenSSL
.
crypto
.
dump_certificate
(
OpenSSL
.
crypto
.
FILETYPE_PEM
,
cert
).
decode
(
'
utf-8
'
)
self
.
ssl_fingerprint_sha1
=
cert
.
digest
(
'
sha1
'
).
decode
(
'
utf-8
'
)
self
.
ssl_fingerprint_sha256
=
cert
.
digest
(
'
sha256
'
).
decode
(
'
utf-8
'
)
return
True
class
NewAccountNotConnectedEvent
(
nec
.
NetworkIncomingEvent
):
name
=
'
new-account-not-connected
'
class
ConnectionLostEvent
(
nec
.
NetworkIncomingEvent
):
class
ConnectionLostEvent
(
nec
.
NetworkIncomingEvent
):
name
=
'
connection-lost
'
name
=
'
connection-lost
'
...
...
This diff is collapsed.
Click to expand it.
gajim/gui_interface.py
+
0
−
20
View file @
a75c42f6
...
@@ -217,26 +217,6 @@ def handle_event_status(self, event):
...
@@ -217,26 +217,6 @@ def handle_event_status(self, event):
self
.
unblock_signed_in_notifications
,
self
.
unblock_signed_in_notifications
,
event
.
account
)
event
.
account
)
@staticmethod
def
handle_gc_error
(
gc_control
,
pritext
,
sectext
):
if
gc_control
and
gc_control
.
autorejoin
is
not
None
:
if
gc_control
.
error_dialog
:
gc_control
.
error_dialog
.
destroy
()
def
on_close
(
dummy
):
gc_control
.
error_dialog
.
destroy
()
gc_control
.
error_dialog
=
None
gc_control
.
error_dialog
=
ErrorDialog
(
pritext
,
sectext
,
on_response_ok
=
on_close
,
on_response_cancel
=
on_close
)
gc_control
.
error_dialog
.
set_modal
(
False
)
if
gc_control
.
parent_win
:
gc_control
.
error_dialog
.
set_transient_for
(
gc_control
.
parent_win
.
window
)
else
:
d
=
ErrorDialog
(
pritext
,
sectext
)
if
gc_control
and
gc_control
.
parent_win
:
d
.
set_transient_for
(
gc_control
.
parent_win
.
window
)
d
.
set_modal
(
False
)
def
handle_event_presence
(
self
,
obj
):
def
handle_event_presence
(
self
,
obj
):
# 'NOTIFY' (account, (jid, status, status message, resource,
# 'NOTIFY' (account, (jid, status, status message, resource,
# priority, timestamp))
# priority, timestamp))
...
...
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