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

Commits:

2 changed files:

Changes:

  • gajim/common/modules/roster.py
    ... ... @@ -50,15 +50,16 @@ def load_roster(self):
    50 50
                 self.set_raw(data)
    
    51 51
                 for jid, item in self._data.items():
    
    52 52
                     self._log.debug('%s: %s', jid, item)
    
    53
    -                app.nec.push_incoming_event(NetworkEvent(
    
    54
    -                    'roster-info',
    
    55
    -                    conn=self._con,
    
    53
    +                contact = app.contacts.create_contact(
    
    56 54
                         jid=jid,
    
    57
    -                    nickname=item['name'],
    
    55
    +                    account=self._account,
    
    56
    +                    name=item['name'],
    
    57
    +                    groups=item['groups'],
    
    58
    +                    show='offline',
    
    58 59
                         sub=item['subscription'],
    
    59 60
                         ask=item['ask'],
    
    60
    -                    groups=item['groups'],
    
    61
    -                    avatar_sha=item['avatar_sha']))
    
    61
    +                    avatar_sha=item['avatar_sha'])
    
    62
    +                app.contacts.add_contact(self._account, contact)
    
    62 63
             else:
    
    63 64
                 self._log.info('Database empty, reset roster version')
    
    64 65
                 app.settings.set_account_setting(
    

  • gajim/gui_interface.py
    ... ... @@ -1116,7 +1116,7 @@ def create_core_handlers_list(self):
    1116 1116
                 'password-required': [self.handle_event_password_required],
    
    1117 1117
                 'plain-connection': [self.handle_event_plain_connection],
    
    1118 1118
                 'presence-received': [self.handle_event_presence],
    
    1119
    -            'roster-info': [self.handle_event_roster_info],
    
    1119
    +            # 'roster-info': [self.handle_event_roster_info],
    
    1120 1120
                 'roster-item-exchange-received': \
    
    1121 1121
                     [self.handle_event_roster_item_exchange],
    
    1122 1122
                 'signed-in': [self.handle_event_signed_in],
    
    ... ... @@ -1789,7 +1789,8 @@ def autoconnect(self):
    1789 1789
                         account, 'last_status_msg')
    
    1790 1790
                     status_message = helpers.from_one_line(status_message)
    
    1791 1791
     
    
    1792
    -            self.roster.send_status(account, status, status_message)
    
    1792
    +            app.connections[account].change_status(status, status_message)
    
    1793
    +            # self.roster.send_status(account, status, status_message)
    
    1793 1794
     
    
    1794 1795
         def change_status(self, status=None):
    
    1795 1796
             # status=None means we want to change the message only
    
    ... ... @@ -2077,7 +2078,7 @@ def run(self, application):
    2077 2078
             if app.settings.get('trayicon') != 'never':
    
    2078 2079
                 self.show_systray()
    
    2079 2080
     
    
    2080
    -        self.roster = roster_window.RosterWindow(application)
    
    2081
    +        # self.roster = roster_window.RosterWindow(application)
    
    2081 2082
             # if self.msg_win_mgr.mode == \
    
    2082 2083
             # MessageWindowMgr.ONE_MSG_WINDOW_ALWAYS_WITH_ROSTER:
    
    2083 2084
             #     self.msg_win_mgr.create_window(None, None, None)
    
    ... ... @@ -2087,10 +2088,10 @@ def run(self, application):
    2087 2088
             app.plugin_manager = plugins.PluginManager()
    
    2088 2089
             app.plugin_manager.init_plugins()
    
    2089 2090
     
    
    2090
    -        self.roster._before_fill()
    
    2091
    +        # self.roster._before_fill()
    
    2091 2092
             for account in app.connections:
    
    2092 2093
                 app.connections[account].get_module('Roster').load_roster()
    
    2093
    -        self.roster._after_fill()
    
    2094
    +        # self.roster._after_fill()
    
    2094 2095
     
    
    2095 2096
             # get instances for windows/dialogs that will show_all()/hide()
    
    2096 2097
             self.instances['file_transfers'] = FileTransfersWindow()