Daniel Brötzmann pushed to branch master at gajim / gajim

Commits:

3 changed files:

Changes:

  • gajim/gtk/controls/groupchat.py
    ... ... @@ -683,7 +683,8 @@ def _on_roster_row_activated(self, _roster, nick):
    683 683
                 app.window.add_chat(self.account,
    
    684 684
                                     participant.real_jid.bare,
    
    685 685
                                     'contact',
    
    686
    -                                select=True)
    
    686
    +                                select=True,
    
    687
    +                                workspace='current')
    
    687 688
             else:
    
    688 689
                 contact = self.contact.get_resource(nick)
    
    689 690
                 app.window.add_private_chat(self.account, contact.jid, select=True)
    

  • gajim/gtk/main.py
    ... ... @@ -450,10 +450,15 @@ def _add_chat(self,
    450 450
             account, jid, type_, select = param.unpack()
    
    451 451
             self.add_chat(account, JID.from_string(jid), type_, select)
    
    452 452
     
    
    453
    -    def add_chat(self, account: str, jid: JID, type_: str,
    
    454
    -                 select: bool = False) -> None:
    
    455
    -        workspace_id = self.get_active_workspace()
    
    456
    -        if workspace_id is None:
    
    453
    +    def add_chat(self,
    
    454
    +                 account: str,
    
    455
    +                 jid: JID,
    
    456
    +                 type_: str,
    
    457
    +                 select: bool = False,
    
    458
    +                 workspace: str = 'default') -> None:
    
    459
    +        if workspace == 'current':
    
    460
    +            workspace_id = self.get_active_workspace()
    
    461
    +        else:
    
    457 462
                 workspace_id = self._workspace_side_bar.get_first_workspace()
    
    458 463
             self._chat_page.add_chat_for_workspace(workspace_id,
    
    459 464
                                                    account,
    

  • gajim/gtk/start_chat.py
    ... ... @@ -338,7 +338,12 @@ def _start_new_chat(self, row):
    338 338
                 self._disco_muc(row.account, jid, request_vcard=row.new)
    
    339 339
     
    
    340 340
             else:
    
    341
    -            app.window.add_chat(row.account, jid, 'contact', select=True)
    
    341
    +            app.window.add_chat(
    
    342
    +                row.account,
    
    343
    +                jid,
    
    344
    +                'contact',
    
    345
    +                select=True,
    
    346
    +                workspace='current')
    
    342 347
                 self.ready_to_destroy = True
    
    343 348
                 self.destroy()
    
    344 349