Philipp Hörist pushed to branch gajim_1.0 at gajim / gajim

Commits:

7 changed files:

Changes:

  • appveyor.yml
    ... ... @@ -18,7 +18,7 @@ clone_depth: 1
    18 18
     #   - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
    
    19 19
     
    
    20 20
     build_script:
    
    21
    -  - C:\msys64\usr\bin\pacman -Syuu --needed --noconfirm --ask=127
    
    21
    +  - C:\msys64\usr\bin\pacman -Syu --needed --noconfirm --ask=20
    
    22 22
       - ps: |
    
    23 23
             $env:TIME_STRING=(get-date -UFormat "%Y-%m-%d").ToString()
    
    24 24
             $env:BUILDROOT="C:\msys64\home\appveyor\gajim\win\_build_root"
    

  • gajim/accounts_window.py
    ... ... @@ -234,6 +234,7 @@ class AccountsWindow(Gtk.ApplicationWindow):
    234 234
         def select_account(self, account):
    
    235 235
             for row in self.account_list.get_children():
    
    236 236
                 if row.get_child().account == account:
    
    237
    +                self.account_list.select_row(row)
    
    237 238
                     self.account_list.emit('row-activated', row)
    
    238 239
                     break
    
    239 240
     
    

  • gajim/common/connection.py
    ... ... @@ -1852,6 +1852,8 @@ class Connection(CommonConnection, ConnectionHandlers):
    1852 1852
                 our_server = app.config.get_per('accounts', self.name, 'hostname')
    
    1853 1853
                 self.discoverInfo(our_jid, id_prefix='Gajim_')
    
    1854 1854
                 self.discoverInfo(our_server, id_prefix='Gajim_')
    
    1855
    +        else:
    
    1856
    +            self.request_roster(resume=True)
    
    1855 1857
     
    
    1856 1858
             self.sm.resuming = False # back to previous state
    
    1857 1859
             # Discover Stun server(s)
    
    ... ... @@ -2550,16 +2552,25 @@ class Connection(CommonConnection, ConnectionHandlers):
    2550 2552
                     iq3.addChild(name='meta', attrs=dict_)
    
    2551 2553
             self.connection.send(iq)
    
    2552 2554
     
    
    2553
    -    def request_roster(self):
    
    2555
    +    def request_roster(self, resume=False):
    
    2554 2556
             version = None
    
    2555 2557
             features = self.connection.Dispatcher.Stream.features
    
    2556
    -        if features and features.getTag('ver',
    
    2557
    -        namespace=nbxmpp.NS_ROSTER_VER):
    
    2558
    -            version = app.config.get_per('accounts', self.name,
    
    2559
    -                'roster_version')
    
    2558
    +        if features and features.getTag('ver', namespace=nbxmpp.NS_ROSTER_VER):
    
    2559
    +            version = app.config.get_per(
    
    2560
    +                'accounts', self.name, 'roster_version')
    
    2561
    +
    
    2562
    +        iq_id = self.connection.initRoster(version=version,
    
    2563
    +                                           request=not resume)
    
    2564
    +        if resume:
    
    2565
    +            self._init_roster_from_db()
    
    2566
    +        else:
    
    2567
    +            self.awaiting_answers[iq_id] = (ROSTER_ARRIVED, )
    
    2560 2568
     
    
    2561
    -        iq_id = self.connection.initRoster(version=version)
    
    2562
    -        self.awaiting_answers[iq_id] = (ROSTER_ARRIVED, )
    
    2569
    +    def _init_roster_from_db(self):
    
    2570
    +        account_jid = app.get_jid_from_account(self.name)
    
    2571
    +        roster_data = app.logger.get_roster(account_jid)
    
    2572
    +        roster = self.connection.getRoster(force=True)
    
    2573
    +        roster.setRaw(roster_data)
    
    2563 2574
     
    
    2564 2575
         def send_agent_status(self, agent, ptype):
    
    2565 2576
             if not app.account_is_connected(self.name):
    
    ... ... @@ -2683,6 +2694,8 @@ class Connection(CommonConnection, ConnectionHandlers):
    2683 2694
     
    
    2684 2695
             if obj.chatstate:
    
    2685 2696
                 msg_iq.setTag(obj.chatstate, namespace=nbxmpp.NS_CHATSTATES)
    
    2697
    +            if not obj.message:
    
    2698
    +                msg_iq.setTag('no-store', namespace=nbxmpp.NS_MSG_HINTS)
    
    2686 2699
             if obj.label is not None:
    
    2687 2700
                 msg_iq.addChild(node=obj.label)
    
    2688 2701
     
    

  • gajim/common/connection_handlers.py
    ... ... @@ -1497,10 +1497,7 @@ ConnectionHTTPUpload):
    1497 1497
             elif self.awaiting_answers[id_][0] == ROSTER_ARRIVED:
    
    1498 1498
                 if iq_obj.getType() == 'result':
    
    1499 1499
                     if not iq_obj.getTag('query'):
    
    1500
    -                    account_jid = app.get_jid_from_account(self.name)
    
    1501
    -                    roster_data = app.logger.get_roster(account_jid)
    
    1502
    -                    roster = self.connection.getRoster(force=True)
    
    1503
    -                    roster.setRaw(roster_data)
    
    1500
    +                    self._init_roster_from_db()
    
    1504 1501
                     self._getRoster()
    
    1505 1502
                 elif iq_obj.getType() == 'error':
    
    1506 1503
                     self.roster_supported = False
    

  • gajim/conversation_textview.py
    ... ... @@ -842,10 +842,9 @@ class ConversationTextview(GObject.GObject):
    842 842
             except KeyError:
    
    843 843
                 pass
    
    844 844
             else:
    
    845
    -            oob_desc = additional_data['gajim'].get('oob_desc', None)
    
    846
    -            if oob_desc is None:
    
    847
    -                oob_desc = _('URL:')
    
    848
    -            otext += '\n{} {}'.format(oob_desc, oob_url)
    
    845
    +            oob_desc = additional_data['gajim'].get('oob_desc', 'URL:')
    
    846
    +            if oob_url != otext:
    
    847
    +                otext += '\n{} {}'.format(oob_desc, oob_url)
    
    849 848
     
    
    850 849
             # basic: links + mail + formatting is always checked (we like that)
    
    851 850
             if app.config.get('emoticons_theme') and graphics:
    

  • gajim/gui_interface.py
    ... ... @@ -1708,7 +1708,15 @@ class Interface:
    1708 1708
                     if not event:
    
    1709 1709
                         event = app.events.get_first_event(account, jid, type_)
    
    1710 1710
                     if not event:
    
    1711
    -                    return
    
    1711
    +                    # If autopopup_chat_opened = True, then we send out
    
    1712
    +                    # notifications even if a control is open. This means the
    
    1713
    +                    # event is already deleted (because its printed to the
    
    1714
    +                    # control) when the notification is clicked. So try to
    
    1715
    +                    # get a control from account/jid
    
    1716
    +                    ctrl = self.msg_win_mgr.get_control(fjid, account)
    
    1717
    +                    if ctrl is None:
    
    1718
    +                        return
    
    1719
    +                    w = ctrl.parent_win
    
    1712 1720
     
    
    1713 1721
                 if type_ == 'printed_chat':
    
    1714 1722
                     ctrl = event.control
    

  • win/_base.sh
    ... ... @@ -80,28 +80,27 @@ function install_deps {
    80 80
             mingw-w64-"${ARCH}"-goocanvas \
    
    81 81
             mingw-w64-"${ARCH}"-gspell \
    
    82 82
             mingw-w64-"${ARCH}"-hunspell \
    
    83
    -        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-setuptools
    
    84
    -
    
    85
    -    build_pip install setuptools_scm
    
    83
    +        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-setuptools \
    
    84
    +        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pillow \
    
    85
    +        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-setuptools-scm \
    
    86
    +        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-cryptography \
    
    87
    +        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pyopenssl \
    
    88
    +        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-docutils \
    
    89
    +        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-certifi \
    
    90
    +        mingw-w64-"${ARCH}"-"${PYTHON_ID}"-six
    
    86 91
     
    
    87 92
         PIP_REQUIREMENTS="\
    
    88 93
     pyasn1
    
    89
    -certifi
    
    90 94
     git+https://dev.gajim.org/gajim/python-nbxmpp.git
    
    91 95
     git+https://github.com/dlitz/pycrypto.git
    
    92
    -cryptography
    
    93
    -pyopenssl
    
    96
    +git+https://dev.gajim.org/lovetox/pybonjour-python3.git
    
    97
    +keyring
    
    94 98
     python-gnupg
    
    95
    -docutils
    
    99
    +python-axolotl
    
    96 100
     qrcode
    
    97
    -keyring
    
    98
    -pillow==4.3.0
    
    99
    -six
    
    100 101
     "
    
    101 102
     
    
    102
    -    build_pip install --no-binary ":all:" \
    
    103
    -        --force-reinstall $(echo "$PIP_REQUIREMENTS" | tr ["\\n"] [" "])
    
    104
    -    build_pip install python-axolotl
    
    103
    +    build_pip install $(echo "$PIP_REQUIREMENTS" | tr ["\\n"] [" "])
    
    105 104
     
    
    106 105
         # remove the large png icons, they should be used rarely and svg works fine
    
    107 106
         rm -Rf "${MINGW_ROOT}/share/icons/Adwaita/512x512"