Philipp Hörist pushed to branch gajim_1.0 at gajim / gajim
Commits:
191a5772 by Philipp Hörist at 2018-03-17T14:16:59+01:00
Handle connection lost notification click
Fixes #8823
- - - - -
c3896630 by Philipp Hörist at 2018-03-17T14:17:08+01:00
Fix deleting an account that was never connected
Fixes #8951
- - - - -
4fec13b7 by Philipp Hörist at 2018-03-17T14:17:19+01:00
Catch all exceptions when testing Farstream
- - - - -
3 changed files:
- gajim/common/app.py
- gajim/common/logger.py
- gajim/gui_interface.py
Changes:
=====================================
gajim/common/app.py
=====================================
--- a/gajim/common/app.py
+++ b/gajim/common/app.py
@@ -228,7 +228,8 @@ try:
session = conference.new_session(Farstream.MediaType.AUDIO)
del session
del conference
- except GLib.GError:
+ except Exception as e:
+ glog.info(e)
HAVE_FARSTREAM = False
except (ImportError, ValueError):
=====================================
gajim/common/logger.py
=====================================
--- a/gajim/common/logger.py
+++ b/gajim/common/logger.py
@@ -1104,8 +1104,12 @@ class Logger:
:param account_jid: The jid of the account
"""
-
- jid_id = self.get_jid_id(account_jid)
+ try:
+ jid_id = self.get_jid_id(account_jid)
+ except ValueError:
+ # This happens if the JID never made it to the Database
+ # because the account was never connected
+ return
sql = '''
DELETE FROM roster_entry WHERE account_jid_id = {jid_id};
=====================================
gajim/gui_interface.py
=====================================
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -227,7 +227,7 @@ class Interface:
path = gtkgui_helpers.get_icon_path('gajim-connection_lost', 48)
account = obj.conn.name
notify.popup(_('Connection Failed'), account, account,
- '', path, obj.title, obj.msg)
+ 'connection-lost', path, obj.title, obj.msg)
@staticmethod
def unblock_signed_in_notifications(account):
@@ -1685,6 +1685,10 @@ class Interface:
resource = app.get_resource_from_jid(fjid)
jid = app.get_jid_without_resource(fjid)
+ if type_ == 'connection-lost':
+ app.interface.roster.window.present()
+ return
+
if type_ in ('printed_gc_msg', 'printed_marked_gc_msg', 'gc_msg'):
w = self.msg_win_mgr.get_window(jid, account)
if jid in self.minimized_controls[account]:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/245e478ea6245848a419e68b637893b8851067e2...4fec13b76da57d1441472f247ccc84e65abb692b
---
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/245e478ea6245848a419e68b637893b8851067e2...4fec13b76da57d1441472f247ccc84e65abb692b
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits