Philipp Hörist pushed to branch gajim_1.0 at gajim / gajim
Commits: 8e479697 by Markus Wintermann at 2018-05-19T09:45:59+02:00 Select account in account list if edited
Before: After a rightclick -> "Modify Account" on an account in the roster the preferences of the account are shown but the account is not selected in the account list. After: account will be selected in the account list too - - - - - 0fdb4791 by Philipp Hörist at 2018-05-19T09:46:30+02:00 Set no-store hint on groupchat chatstates
- - - - - 6b804159 by Philipp Hörist at 2018-05-19T09:47:01+02:00 Dont show OOB uri if message body is the same
if oob uri == body there is no need to show the uri below the message
- - - - - 71648f92 by Philipp Hörist at 2018-05-19T09:47:19+02:00 Bring control to front when notification is clicked
if autopopup_chat_opened is activated no control is found because the event that triggered the notification is already deleted when the notification is clicked by the user. So instead of searching for the event, search for the control with jid/account.
Fixes #9124
- - - - - 56067cfd by Philipp Hörist at 2018-05-19T09:49:14+02:00 Init Roster after stream management resume
nbxmpp deletes the roster object on disconnect. Init the roster from db again on resume.
Fixes #8296
- - - - - c0c6380c by Philipp Hörist at 2018-05-19T09:49:26+02:00 Add pybonjour to deps on Windows
Fixes #9125
- - - - - 22871918 by Philipp Hörist at 2018-05-19T09:51:17+02:00 Fix Windows build
- - - - -
7 changed files:
- appveyor.yml - gajim/accounts_window.py - gajim/common/connection.py - gajim/common/connection_handlers.py - gajim/conversation_textview.py - gajim/gui_interface.py - win/_base.sh
Changes:
===================================== appveyor.yml ===================================== --- a/appveyor.yml +++ b/appveyor.yml @@ -18,7 +18,7 @@ clone_depth: 1 # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
build_script: - - C:\msys64\usr\bin\pacman -Syuu --needed --noconfirm --ask=127 + - C:\msys64\usr\bin\pacman -Syu --needed --noconfirm --ask=20 - ps: | $env:TIME_STRING=(get-date -UFormat "%Y-%m-%d").ToString() $env:BUILDROOT="C:\msys64\home\appveyor\gajim\win_build_root"
===================================== gajim/accounts_window.py ===================================== --- a/gajim/accounts_window.py +++ b/gajim/accounts_window.py @@ -234,6 +234,7 @@ class AccountsWindow(Gtk.ApplicationWindow): def select_account(self, account): for row in self.account_list.get_children(): if row.get_child().account == account: + self.account_list.select_row(row) self.account_list.emit('row-activated', row) break
===================================== gajim/common/connection.py ===================================== --- a/gajim/common/connection.py +++ b/gajim/common/connection.py @@ -1852,6 +1852,8 @@ class Connection(CommonConnection, ConnectionHandlers): our_server = app.config.get_per('accounts', self.name, 'hostname') self.discoverInfo(our_jid, id_prefix='Gajim_') self.discoverInfo(our_server, id_prefix='Gajim_') + else: + self.request_roster(resume=True)
self.sm.resuming = False # back to previous state # Discover Stun server(s) @@ -2550,16 +2552,25 @@ class Connection(CommonConnection, ConnectionHandlers): iq3.addChild(name='meta', attrs=dict_) self.connection.send(iq)
- def request_roster(self): + def request_roster(self, resume=False): version = None features = self.connection.Dispatcher.Stream.features - if features and features.getTag('ver', - namespace=nbxmpp.NS_ROSTER_VER): - version = app.config.get_per('accounts', self.name, - 'roster_version') + if features and features.getTag('ver', namespace=nbxmpp.NS_ROSTER_VER): + version = app.config.get_per( + 'accounts', self.name, 'roster_version') + + iq_id = self.connection.initRoster(version=version, + request=not resume) + if resume: + self._init_roster_from_db() + else: + self.awaiting_answers[iq_id] = (ROSTER_ARRIVED, )
- iq_id = self.connection.initRoster(version=version) - self.awaiting_answers[iq_id] = (ROSTER_ARRIVED, ) + def _init_roster_from_db(self): + account_jid = app.get_jid_from_account(self.name) + roster_data = app.logger.get_roster(account_jid) + roster = self.connection.getRoster(force=True) + roster.setRaw(roster_data)
def send_agent_status(self, agent, ptype): if not app.account_is_connected(self.name): @@ -2683,6 +2694,8 @@ class Connection(CommonConnection, ConnectionHandlers):
if obj.chatstate: msg_iq.setTag(obj.chatstate, namespace=nbxmpp.NS_CHATSTATES) + if not obj.message: + msg_iq.setTag('no-store', namespace=nbxmpp.NS_MSG_HINTS) if obj.label is not None: msg_iq.addChild(node=obj.label)
===================================== gajim/common/connection_handlers.py ===================================== --- a/gajim/common/connection_handlers.py +++ b/gajim/common/connection_handlers.py @@ -1497,10 +1497,7 @@ ConnectionHTTPUpload): elif self.awaiting_answers[id_][0] == ROSTER_ARRIVED: if iq_obj.getType() == 'result': if not iq_obj.getTag('query'): - account_jid = app.get_jid_from_account(self.name) - roster_data = app.logger.get_roster(account_jid) - roster = self.connection.getRoster(force=True) - roster.setRaw(roster_data) + self._init_roster_from_db() self._getRoster() elif iq_obj.getType() == 'error': self.roster_supported = False
===================================== gajim/conversation_textview.py ===================================== --- a/gajim/conversation_textview.py +++ b/gajim/conversation_textview.py @@ -842,10 +842,9 @@ class ConversationTextview(GObject.GObject): except KeyError: pass else: - oob_desc = additional_data['gajim'].get('oob_desc', None) - if oob_desc is None: - oob_desc = _('URL:') - otext += '\n{} {}'.format(oob_desc, oob_url) + oob_desc = additional_data['gajim'].get('oob_desc', 'URL:') + if oob_url != otext: + otext += '\n{} {}'.format(oob_desc, oob_url)
# basic: links + mail + formatting is always checked (we like that) if app.config.get('emoticons_theme') and graphics:
===================================== gajim/gui_interface.py ===================================== --- a/gajim/gui_interface.py +++ b/gajim/gui_interface.py @@ -1708,7 +1708,15 @@ class Interface: if not event: event = app.events.get_first_event(account, jid, type_) if not event: - return + # If autopopup_chat_opened = True, then we send out + # notifications even if a control is open. This means the + # event is already deleted (because its printed to the + # control) when the notification is clicked. So try to + # get a control from account/jid + ctrl = self.msg_win_mgr.get_control(fjid, account) + if ctrl is None: + return + w = ctrl.parent_win
if type_ == 'printed_chat': ctrl = event.control
===================================== win/_base.sh ===================================== --- a/win/_base.sh +++ b/win/_base.sh @@ -80,28 +80,27 @@ function install_deps { mingw-w64-"${ARCH}"-goocanvas \ mingw-w64-"${ARCH}"-gspell \ mingw-w64-"${ARCH}"-hunspell \ - mingw-w64-"${ARCH}"-"${PYTHON_ID}"-setuptools - - build_pip install setuptools_scm + mingw-w64-"${ARCH}"-"${PYTHON_ID}"-setuptools \ + mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pillow \ + mingw-w64-"${ARCH}"-"${PYTHON_ID}"-setuptools-scm \ + mingw-w64-"${ARCH}"-"${PYTHON_ID}"-cryptography \ + mingw-w64-"${ARCH}"-"${PYTHON_ID}"-pyopenssl \ + mingw-w64-"${ARCH}"-"${PYTHON_ID}"-docutils \ + mingw-w64-"${ARCH}"-"${PYTHON_ID}"-certifi \ + mingw-w64-"${ARCH}"-"${PYTHON_ID}"-six
PIP_REQUIREMENTS="\ pyasn1 -certifi git+https://dev.gajim.org/gajim/python-nbxmpp.git git+https://github.com/dlitz/pycrypto.git -cryptography -pyopenssl +git+https://dev.gajim.org/lovetox/pybonjour-python3.git +keyring python-gnupg -docutils +python-axolotl qrcode -keyring -pillow==4.3.0 -six "
- build_pip install --no-binary ":all:" \ - --force-reinstall $(echo "$PIP_REQUIREMENTS" | tr ["\n"] [" "]) - build_pip install python-axolotl + build_pip install $(echo "$PIP_REQUIREMENTS" | tr ["\n"] [" "])
# remove the large png icons, they should be used rarely and svg works fine rm -Rf "${MINGW_ROOT}/share/icons/Adwaita/512x512"
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/f99ec91fc29c7ae822856b318537e565ef...
--- View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/f99ec91fc29c7ae822856b318537e565ef... You're receiving this email because of your account on dev.gajim.org.