Philipp Hörist pushed to branch master at gajim / gajim

Commits:

19 changed files:

Changes:

  • gajim/common/connection.py
    ... ... @@ -678,7 +678,7 @@ class Connection(CommonConnection, ConnectionHandlers):
    678 678
                         if data[4] != '':
    
    679 679
                             helpers.replace_dataform_media(conf, data[4])
    
    680 680
                         if self.new_account_form:
    
    681
    -                        def _on_register_result(result):
    
    681
    +                        def _on_register_result(_nbxmpp_client, result):
    
    682 682
                                 if not nbxmpp.isResultNode(result):
    
    683 683
                                     reason = result.getErrorMsg() or result.getError()
    
    684 684
                                     app.nec.push_incoming_event(NetworkEvent(
    
    ... ... @@ -1362,7 +1362,7 @@ class Connection(CommonConnection, ConnectionHandlers):
    1362 1362
                 msg=msg,
    
    1363 1363
                 initial=initial)
    
    1364 1364
     
    
    1365
    -    def _continue_invisible(self, con, iq_obj, msg, signed, initial):
    
    1365
    +    def _continue_invisible(self, _nbxmpp_client, iq_obj, msg, signed, initial):
    
    1366 1366
             if iq_obj.getType() == 'error': # server doesn't support privacy lists
    
    1367 1367
                 return
    
    1368 1368
             # active the privacy rule
    

  • gajim/common/modules/adhoc_commands.py
    ... ... @@ -383,7 +383,7 @@ class AdHocCommands(BaseModule):
    383 383
             self._con.connection.SendAndCallForResponse(
    
    384 384
                 stanza, self._action_response_received)
    
    385 385
     
    
    386
    -    def _action_response_received(self, stanza):
    
    386
    +    def _action_response_received(self, _nbxmpp_client, stanza):
    
    387 387
             if not nbxmpp.isResultNode(stanza):
    
    388 388
                 self._log.info('Error: %s', stanza.getError())
    
    389 389
     
    
    ... ... @@ -413,7 +413,7 @@ class AdHocCommands(BaseModule):
    413 413
             self._con.connection.SendAndCallForResponse(
    
    414 414
                 stanza, self._cancel_result_received)
    
    415 415
     
    
    416
    -    def _cancel_result_received(self, stanza):
    
    416
    +    def _cancel_result_received(self, _nbxmpp_client, stanza):
    
    417 417
             if not nbxmpp.isResultNode(stanza):
    
    418 418
                 self._log.warning('Error: %s', stanza.getError())
    
    419 419
             else:
    

  • gajim/common/modules/bits_of_binary.py
    ... ... @@ -52,7 +52,7 @@ class BitsOfBinary(BaseModule):
    52 52
             self._con.connection.send(iq)
    
    53 53
             raise nbxmpp.NodeProcessed
    
    54 54
     
    
    55
    -    def _on_bob_received(self, _con, result, cid):
    
    55
    +    def _on_bob_received(self, _nbxmpp_client, result, cid):
    
    56 56
             """
    
    57 57
             Called when we receive BoB data
    
    58 58
             """
    

  • gajim/common/modules/delimiter.py
    ... ... @@ -33,7 +33,7 @@ class Delimiter(BaseModule):
    33 33
             self._con.connection.SendAndCallForResponse(
    
    34 34
                 iq, self._delimiter_received)
    
    35 35
     
    
    36
    -    def _delimiter_received(self, stanza):
    
    36
    +    def _delimiter_received(self, _nbxmpp_client, stanza):
    
    37 37
             if not nbxmpp.isResultNode(stanza):
    
    38 38
                 self._log.info('Request error: %s', stanza.getError())
    
    39 39
             else:
    
    ... ... @@ -56,7 +56,7 @@ class Delimiter(BaseModule):
    56 56
             self._con.connection.SendAndCallForResponse(
    
    57 57
                 iq, self._set_delimiter_response)
    
    58 58
     
    
    59
    -    def _set_delimiter_response(self, stanza):
    
    59
    +    def _set_delimiter_response(self, _nbxmpp_client, stanza):
    
    60 60
             if not nbxmpp.isResultNode(stanza):
    
    61 61
                 self._log.info('Store error: %s', stanza.getError())
    
    62 62
     
    

  • gajim/common/modules/entity_time.py
    ... ... @@ -53,7 +53,7 @@ class EntityTime(BaseModule):
    53 53
     
    
    54 54
             self._con.connection.SendAndCallForResponse(iq, self._result_received)
    
    55 55
     
    
    56
    -    def _result_received(self, stanza):
    
    56
    +    def _result_received(self, _nbxmpp_client, stanza):
    
    57 57
             time_info = None
    
    58 58
             if not nbxmpp.isResultNode(stanza):
    
    59 59
                 self._log.info('Error: %s', stanza.getError())
    

  • gajim/common/modules/gateway.py
    ... ... @@ -35,7 +35,7 @@ class Gateway(BaseModule):
    35 35
                 iq, self._on_unsubscribe_result)
    
    36 36
             self._con.get_module('Roster').del_item(agent)
    
    37 37
     
    
    38
    -    def _on_unsubscribe_result(self, stanza):
    
    38
    +    def _on_unsubscribe_result(self, _nbxmpp_client, stanza):
    
    39 39
             if not nbxmpp.isResultNode(stanza):
    
    40 40
                 self._log.info('Error: %s', stanza.getError())
    
    41 41
                 return
    
    ... ... @@ -69,7 +69,7 @@ class Gateway(BaseModule):
    69 69
                 query.setTagData('prompt', prompt)
    
    70 70
             self._con.connection.SendAndCallForResponse(iq, self._on_prompt_result)
    
    71 71
     
    
    72
    -    def _on_prompt_result(self, stanza):
    
    72
    +    def _on_prompt_result(self, _nbxmpp_client, stanza):
    
    73 73
             jid = str(stanza.getFrom())
    
    74 74
             fjid = stanza.getFrom().getBare()
    
    75 75
             resource = stanza.getFrom().getResource()
    

  • gajim/common/modules/mam.py
    ... ... @@ -297,7 +297,7 @@ class MAM(BaseModule):
    297 297
                 query, self._received_count, {'query_id': query_id})
    
    298 298
             return query_id
    
    299 299
     
    
    300
    -    def _received_count(self, _con, stanza, query_id):
    
    300
    +    def _received_count(self, _nbxmpp_client, stanza, query_id):
    
    301 301
             try:
    
    302 302
                 _, set_ = self._parse_iq(stanza)
    
    303 303
             except InvalidMamIQ:
    
    ... ... @@ -402,7 +402,7 @@ class MAM(BaseModule):
    402 402
                                                'start_date': start_date,
    
    403 403
                                                'groupchat': groupchat})
    
    404 404
     
    
    405
    -    def _result_finished(self, _con, stanza, query_id, start_date, groupchat):
    
    405
    +    def _result_finished(self, _nbxmpp_client, stanza, query_id, start_date, groupchat):
    
    406 406
             try:
    
    407 407
                 fin, set_ = self._parse_iq(stanza)
    
    408 408
             except InvalidMamIQ:
    
    ... ... @@ -458,7 +458,7 @@ class MAM(BaseModule):
    458 458
                                                 'end_date': end_date})
    
    459 459
             return query_id
    
    460 460
     
    
    461
    -    def _intervall_result(self, _con, stanza, query_id,
    
    461
    +    def _intervall_result(self, _nbxmpp_client, stanza, query_id,
    
    462 462
                               start_date, end_date):
    
    463 463
             try:
    
    464 464
                 fin, set_ = self._parse_iq(stanza)
    
    ... ... @@ -539,7 +539,7 @@ class MAM(BaseModule):
    539 539
             self._con.connection.SendAndCallForResponse(
    
    540 540
                 iq, self._preferences_received)
    
    541 541
     
    
    542
    -    def _preferences_received(self, stanza):
    
    542
    +    def _preferences_received(self, _nbxmpp_client, stanza):
    
    543 543
             if not nbxmpp.isResultNode(stanza):
    
    544 544
                 self._log.info('Error: %s', stanza.getError())
    
    545 545
                 app.nec.push_incoming_event(MAMPreferenceError(
    
    ... ... @@ -580,7 +580,7 @@ class MAM(BaseModule):
    580 580
             self._con.connection.SendAndCallForResponse(
    
    581 581
                 iq, self._preferences_saved)
    
    582 582
     
    
    583
    -    def _preferences_saved(self, stanza):
    
    583
    +    def _preferences_saved(self, _nbxmpp_client, stanza):
    
    584 584
             if not nbxmpp.isResultNode(stanza):
    
    585 585
                 self._log.info('Error: %s', stanza.getError())
    
    586 586
                 app.nec.push_incoming_event(MAMPreferenceError(
    

  • gajim/common/modules/metacontacts.py
    ... ... @@ -36,7 +36,7 @@ class MetaContacts(BaseModule):
    36 36
             self._con.connection.SendAndCallForResponse(
    
    37 37
                 iq, self._metacontacts_received)
    
    38 38
     
    
    39
    -    def _metacontacts_received(self, stanza):
    
    39
    +    def _metacontacts_received(self, _nbxmpp_client, stanza):
    
    40 40
             if not nbxmpp.isResultNode(stanza):
    
    41 41
                 self._log.info('Request error: %s', stanza.getError())
    
    42 42
             else:
    
    ... ... @@ -93,7 +93,7 @@ class MetaContacts(BaseModule):
    93 93
             self._con.connection.SendAndCallForResponse(
    
    94 94
                 iq, self._store_response_received)
    
    95 95
     
    
    96
    -    def _store_response_received(self, stanza):
    
    96
    +    def _store_response_received(self, _nbxmpp_client, stanza):
    
    97 97
             if not nbxmpp.isResultNode(stanza):
    
    98 98
                 self._log.info('Store error: %s', stanza.getError())
    
    99 99
     
    

  • gajim/common/modules/ping.py
    ... ... @@ -62,7 +62,9 @@ class Ping(BaseModule):
    62 62
             self._con.connection.SendAndCallForResponse(self._get_ping_iq(to),
    
    63 63
                                                         self._keepalive_received)
    
    64 64
     
    
    65
    -    def _keepalive_received(self, _stanza: nbxmpp.Iq) -> None:
    
    65
    +    def _keepalive_received(self,
    
    66
    +                            _nbxmpp_client: Any,
    
    67
    +                            _stanza: nbxmpp.Iq) -> None:
    
    66 68
             self._log.info('Received keepalive')
    
    67 69
             self.remove_timeout()
    
    68 70
     
    
    ... ... @@ -91,7 +93,7 @@ class Ping(BaseModule):
    91 93
                 PingSentEvent(None, conn=self._con, contact=contact))
    
    92 94
     
    
    93 95
         def _pong_received(self,
    
    94
    -                       _con: ConnectionT,
    
    96
    +                       _nbxmpp_client: Any,
    
    95 97
                            stanza: nbxmpp.Iq,
    
    96 98
                            ping_time: int,
    
    97 99
                            contact: ContactsT) -> None:
    

  • gajim/common/modules/privacylists.py
    ... ... @@ -76,7 +76,7 @@ class PrivacyLists(BaseModule):
    76 76
             self._con.connection.SendAndCallForResponse(
    
    77 77
                 iq, self._privacy_lists_received, {'callback': callback})
    
    78 78
     
    
    79
    -    def _privacy_lists_received(self, _con, stanza, callback):
    
    79
    +    def _privacy_lists_received(self, _nbxmpp_client, stanza, callback):
    
    80 80
             lists = []
    
    81 81
             new_default = None
    
    82 82
             result = nbxmpp.isResultNode(stanza)
    
    ... ... @@ -118,7 +118,7 @@ class PrivacyLists(BaseModule):
    118 118
             self._con.connection.SendAndCallForResponse(
    
    119 119
                 iq, self._privacy_list_received)
    
    120 120
     
    
    121
    -    def _privacy_list_received(self, stanza):
    
    121
    +    def _privacy_list_received(self, _nbxmpp_client, stanza):
    
    122 122
             if not nbxmpp.isResultNode(stanza):
    
    123 123
                 self._log.warning('List not available: %s', stanza.getError())
    
    124 124
                 return
    
    ... ... @@ -152,7 +152,7 @@ class PrivacyLists(BaseModule):
    152 152
         def del_privacy_list(self, name):
    
    153 153
             self._log.info('Remove list: %s', name)
    
    154 154
     
    
    155
    -        def _del_privacy_list_result(stanza):
    
    155
    +        def _del_privacy_list_result(_nbxmpp_client, stanza):
    
    156 156
                 if not nbxmpp.isResultNode(stanza):
    
    157 157
                     self._log.warning('List deletion failed: %s', stanza.getError())
    
    158 158
                     app.nec.push_incoming_event(InformationEvent(
    
    ... ... @@ -235,7 +235,7 @@ class PrivacyLists(BaseModule):
    235 235
             self._con.connection.SendAndCallForResponse(
    
    236 236
                 iq, self._default_result_handler, {})
    
    237 237
     
    
    238
    -    def _default_result_handler(self, _con, stanza):
    
    238
    +    def _default_result_handler(self, _nbxmpp_client, stanza):
    
    239 239
             if not nbxmpp.isResultNode(stanza):
    
    240 240
                 self._log.warning('Operation failed: %s', stanza.getError())
    
    241 241
     
    

  • gajim/common/modules/pubsub.py
    ... ... @@ -164,7 +164,7 @@ class PubSub(BaseModule):
    164 164
             pubsub = query.addChild('pubsub', namespace=nbxmpp.NS_PUBSUB_OWNER)
    
    165 165
             pubsub.addChild('delete', {'node': node})
    
    166 166
     
    
    167
    -        def response(_con, resp, jid, node):
    
    167
    +        def response(_nbxmpp_client, resp, jid, node):
    
    168 168
                 if resp.getType() == 'result' and on_ok:
    
    169 169
                     on_ok(jid, node)
    
    170 170
                 elif on_fail:
    
    ... ... @@ -218,7 +218,7 @@ class PubSub(BaseModule):
    218 218
             self._con.connection.SendAndCallForResponse(
    
    219 219
                 query, self._received_pb_configuration, {'node': node})
    
    220 220
     
    
    221
    -    def _received_pb_configuration(self, _con, stanza, node):
    
    221
    +    def _received_pb_configuration(self, _nbxmpp_client, stanza, node):
    
    222 222
             if not nbxmpp.isResultNode(stanza):
    
    223 223
                 self._log.warning('Error: %s', stanza.getError())
    
    224 224
                 return
    

  • gajim/common/modules/register.py
    ... ... @@ -46,7 +46,8 @@ class Register(BaseModule):
    46 46
                 iq, self._change_password_response, {'success_cb': weak_success_cb,
    
    47 47
                                                      'error_cb': weak_error_cb})
    
    48 48
     
    
    49
    -    def _change_password_response(self, _con, stanza, success_cb, error_cb):
    
    49
    +    def _change_password_response(self, _nbxmpp_client, stanza,
    
    50
    +                                  success_cb, error_cb):
    
    50 51
             if not nbxmpp.isResultNode(stanza):
    
    51 52
                 error = stanza.getErrorMsg()
    
    52 53
                 self._log.info('Error: %s', error)
    
    ... ... @@ -81,7 +82,7 @@ class Register(BaseModule):
    81 82
             self.agent_registrations[agent] = {'roster_push': False,
    
    82 83
                                                'sub_received': False}
    
    83 84
     
    
    84
    -    def _register_agent_response(self, _con, stanza, agent,
    
    85
    +    def _register_agent_response(self, _nbxmpp_client, stanza, agent,
    
    85 86
                                      success_cb, error_cb):
    
    86 87
             if not nbxmpp.isResultNode(stanza):
    
    87 88
                 error = stanza.getErrorMsg()
    
    ... ... @@ -114,7 +115,8 @@ class Register(BaseModule):
    114 115
                 iq, self._register_info_response, {'success_cb': weak_success_cb,
    
    115 116
                                                    'error_cb': weak_error_cb})
    
    116 117
     
    
    117
    -    def _register_info_response(self, _con, stanza, success_cb, error_cb):
    
    118
    +    def _register_info_response(self, _nbxmpp_client, stanza,
    
    119
    +                                success_cb, error_cb):
    
    118 120
             if not nbxmpp.isResultNode(stanza):
    
    119 121
                 error = stanza.getErrorMsg()
    
    120 122
                 self._log.info('Error: %s', error)
    

  • gajim/common/modules/roster.py
    ... ... @@ -84,7 +84,7 @@ class Roster(BaseModule):
    84 84
             self._con.connection.SendAndCallForResponse(
    
    85 85
                 iq, self._roster_received)
    
    86 86
     
    
    87
    -    def _roster_received(self, stanza):
    
    87
    +    def _roster_received(self, _nbxmpp_client, stanza):
    
    88 88
             if not nbxmpp.isResultNode(stanza):
    
    89 89
                 self._log.warning('Unable to retrive roster: %s', stanza.getError())
    
    90 90
             else:
    

  • gajim/common/modules/search.py
    ... ... @@ -30,7 +30,7 @@ class Search(BaseModule):
    30 30
             iq = nbxmpp.Iq(typ='get', to=jid, queryNS=nbxmpp.NS_SEARCH)
    
    31 31
             self._con.connection.SendAndCallForResponse(iq, self._fields_received)
    
    32 32
     
    
    33
    -    def _fields_received(self, stanza):
    
    33
    +    def _fields_received(self, _nbxmpp_client, stanza):
    
    34 34
             data = None
    
    35 35
             is_dataform = False
    
    36 36
     
    
    ... ... @@ -67,7 +67,7 @@ class Search(BaseModule):
    67 67
     
    
    68 68
             self._con.connection.SendAndCallForResponse(iq, self._received_result)
    
    69 69
     
    
    70
    -    def _received_result(self, stanza):
    
    70
    +    def _received_result(self, _nbxmpp_client, stanza):
    
    71 71
             data = None
    
    72 72
             is_dataform = False
    
    73 73
     
    

  • gajim/common/modules/security_labels.py
    ... ... @@ -45,7 +45,7 @@ class SecLabels(BaseModule):
    45 45
             self._con.connection.SendAndCallForResponse(
    
    46 46
                 iq, self._catalog_received)
    
    47 47
     
    
    48
    -    def _catalog_received(self, stanza):
    
    48
    +    def _catalog_received(self, _nbxmpp_client, stanza):
    
    49 49
             if not nbxmpp.isResultNode(stanza):
    
    50 50
                 self._log.info('Error: %s', stanza.getError())
    
    51 51
                 return
    

  • gajim/common/modules/vcard_temp.py
    ... ... @@ -135,13 +135,13 @@ class VCardTemp(BaseModule):
    135 135
                 iq, self._upload_room_avatar_result)
    
    136 136
     
    
    137 137
         @staticmethod
    
    138
    -    def _upload_room_avatar_result(stanza):
    
    138
    +    def _upload_room_avatar_result(_nbxmpp_client, stanza):
    
    139 139
             if not nbxmpp.isResultNode(stanza):
    
    140 140
                 reason = stanza.getErrorMsg() or stanza.getError()
    
    141 141
                 app.nec.push_incoming_event(InformationEvent(
    
    142 142
                     None, dialog_name='avatar-upload-error', args=reason))
    
    143 143
     
    
    144
    -    def _avatar_publish_result(self, _con, stanza, sha):
    
    144
    +    def _avatar_publish_result(self, _nbxmpp_client, stanza, sha):
    
    145 145
             if stanza.getType() == 'result':
    
    146 146
                 current_sha = app.config.get_per(
    
    147 147
                     'accounts', self._account, 'avatar_sha')
    
    ... ... @@ -185,7 +185,7 @@ class VCardTemp(BaseModule):
    185 185
     
    
    186 186
             return avatar_sha, photo_decoded
    
    187 187
     
    
    188
    -    def _parse_vcard(self, _con, stanza, callback, expected_sha):
    
    188
    +    def _parse_vcard(self, _nbxmpp_client, stanza, callback, expected_sha):
    
    189 189
             frm_jid = stanza.getFrom()
    
    190 190
             room = False
    
    191 191
             if frm_jid is None:
    

  • gajim/common/proxy65_manager.py
    ... ... @@ -156,7 +156,7 @@ class ProxyResolver:
    156 156
             else:
    
    157 157
                 self.state = S_INITIAL
    
    158 158
     
    
    159
    -    def _result_received(self, data):
    
    159
    +    def _result_received(self, _nbxmpp_client, data):
    
    160 160
             self.disconnect(self.active_connection)
    
    161 161
             if data.getType() == 'result':
    
    162 162
                 self.keep_conf()
    

  • gajim/gtk/discovery.py
    ... ... @@ -2079,7 +2079,7 @@ class DiscussionGroupsBrowser(AgentBrowser):
    2079 2079
             con.get_module('PubSub').send_pb_unsubscribe(
    
    2080 2080
                 self.jid, node, self._on_pep_unsubscribe, groupnode=node)
    
    2081 2081
     
    
    2082
    -    def _on_pep_subscriptions(self, conn, request):
    
    2082
    +    def _on_pep_subscriptions(self, _nbxmpp_client, request):
    
    2083 2083
             """
    
    2084 2084
             We got the subscribed groups list stanza. Now, if we already have items
    
    2085 2085
             on the list, we should actualize them
    
    ... ... @@ -2108,7 +2108,7 @@ class DiscussionGroupsBrowser(AgentBrowser):
    2108 2108
             # we now know subscriptions, update button states
    
    2109 2109
             self.update_actions()
    
    2110 2110
     
    
    2111
    -    def _on_pep_subscribe(self, conn, request, groupnode):
    
    2111
    +    def _on_pep_subscribe(self, _nbxmpp_client, request, groupnode):
    
    2112 2112
             """
    
    2113 2113
             We have just subscribed to a node. Update UI
    
    2114 2114
             """
    
    ... ... @@ -2122,7 +2122,7 @@ class DiscussionGroupsBrowser(AgentBrowser):
    2122 2122
     
    
    2123 2123
             self.update_actions()
    
    2124 2124
     
    
    2125
    -    def _on_pep_unsubscribe(self, conn, request, groupnode):
    
    2125
    +    def _on_pep_unsubscribe(self, _nbxmpp_client, request, groupnode):
    
    2126 2126
             """
    
    2127 2127
             We have just unsubscribed from a node. Update UI
    
    2128 2128
             """
    

  • gajim/gtk/server_info.py
    ... ... @@ -219,7 +219,7 @@ class ServerInfo(Gtk.ApplicationWindow, EventHelper):
    219 219
             open_uri(label.get_text(), account=self.account)
    
    220 220
             return Gdk.EVENT_STOP
    
    221 221
     
    
    222
    -    def _on_last_activity(self, stanza):
    
    222
    +    def _on_last_activity(self, _nbxmpp_client, stanza):
    
    223 223
             if self._destroyed:
    
    224 224
                 # Window got closed in the meantime
    
    225 225
                 return