Philipp Hörist pushed to branch master at gajim / gajim
Commits:
5776d3de by Philipp Hörist at 2019-01-06T10:23:30Z
Chatstates: Add more log output
- - - - -
1 changed file:
- gajim/common/modules/chatstates.py
Changes:
=====================================
gajim/common/modules/chatstates.py
=====================================
@@ -301,12 +301,15 @@ class Chatstate:
# which are not allowed to see our status
if not contact.is_pm_contact:
if contact and contact.sub in ('to', 'none'):
+ log.info('Contact not subscribed: %s', contact.jid)
return
if contact.show == 'offline':
+ log.info('Contact offline: %s', contact.jid)
return
if not contact.supports(nbxmpp.NS_CHATSTATES):
+ log.info('Chatstates not supported: %s', contact.jid)
return
if state in (State.ACTIVE, State.COMPOSING):
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/5776d3de4824cd74c1b9be7bc41277ae66…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/5776d3de4824cd74c1b9be7bc41277ae66…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
a64d986c by Philipp Hörist at 2019-01-06T01:15:17Z
Fix pylint error
- - - - -
6a958c57 by Philipp Hörist at 2019-01-06T10:10:07Z
Pass contact instead of string
Fixes #9529
- - - - -
1 changed file:
- gajim/common/modules/chatstates.py
Changes:
=====================================
gajim/common/modules/chatstates.py
=====================================
@@ -237,7 +237,7 @@ class Chatstate:
if not contact.supports(nbxmpp.NS_CHATSTATES):
return None
- self.set_active(contact.jid)
+ self.set_active(contact)
return 'active'
@ensure_enabled
@@ -355,8 +355,7 @@ class Chatstate:
if contact.is_groupchat():
return app.config.get_per(
'rooms', contact.jid, 'send_chatstate', 'composing_only')
- else:
- return app.config.get('outgoing_chat_state_notifications')
+ return app.config.get('outgoing_chat_state_notifications')
def remove_delay_timeout(self, contact):
timeout = self._delay_timeout_ids.get(contact.jid)
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/eb99291d44626eb3dfbdb6ebd72f70652…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/eb99291d44626eb3dfbdb6ebd72f70652…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
eebccaf0 by Philipp Hörist at 2019-01-05T23:05:12Z
Remove unused import
- - - - -
1 changed file:
- gajim/gtk/bookmarks.py
Changes:
=====================================
gajim/gtk/bookmarks.py
=====================================
@@ -19,7 +19,6 @@ from gi.repository import Gdk
from gajim.common import app
from gajim.common import helpers
-from gajim.common.i18n import Q_
from gajim.common.i18n import _
from gajim import gui_menu_builder
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/eebccaf07d2d9709875b0530605d8b3a28…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/eebccaf07d2d9709875b0530605d8b3a28…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
4c17b55a by Philipp Hörist at 2019-01-05T19:17:20Z
Fix pylint error
- - - - -
1 changed file:
- gajim/groupchat_control.py
Changes:
=====================================
gajim/groupchat_control.py
=====================================
@@ -431,7 +431,7 @@ class GroupchatControl(ChatControlBase):
def update_actions(self):
if self.parent_win is None:
return
- win = self.parent_win.window
+
contact = app.contacts.get_gc_contact(
self.account, self.room_jid, self.nick)
con = app.connections[self.account]
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4c17b55a91cca31e4b5ec5c3c070652da6…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/4c17b55a91cca31e4b5ec5c3c070652da6…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
633795b7 by Philipp Hörist at 2019-01-05T18:17:34Z
Dont fail on users leaving a group chat
Fixes #9527
- - - - -
19c45510 by Philipp Hörist at 2019-01-05T18:17:34Z
MUC: Fix printing status/show
- rename config values to something more appropriate
- - - - -
4 changed files:
- gajim/common/config.py
- gajim/common/modules/muc.py
- gajim/groupchat_control.py
- gajim/gtk/preferences.py
Changes:
=====================================
gajim/common/config.py
=====================================
@@ -235,8 +235,8 @@ class Config:
'show_location_in_roster': [opt_bool, True, '', True],
'avatar_position_in_roster': [opt_str, 'right', _('Define the position of the avatar in roster. Can be left or right'), True],
'print_status_in_chats': [opt_bool, False, _('If False, Gajim will no longer print status line in chats when a contact changes their status and/or their status message.')],
- 'print_join_leave_in_mucs': [opt_bool, False, _('Default Setting: Show a status message for every join or leave in a group chat')],
- 'print_status_in_mucs': [opt_bool, False, _('Default Setting: Show a status message for all status (away, dnd, etc.) changes of users in a group chat')],
+ 'print_join_left_default': [opt_bool, False, _('Default Setting: Show a status message for every join or leave in a group chat')],
+ 'print_status_muc_default': [opt_bool, False, _('Default Setting: Show a status message for all status (away, dnd, etc.) changes of users in a group chat')],
'log_contact_status_changes': [opt_bool, False],
'log_xhtml_messages': [opt_bool, False, _('Log XHTML messages instead of plain text messages.')],
'restored_messages_small': [opt_bool, True, _('If true, restored messages will use a smaller font than the default one.')],
=====================================
gajim/common/modules/muc.py
=====================================
@@ -226,10 +226,16 @@ class MUC:
# handled by the opened ChatControl
break
- # We remove the contact from the MUC, but there could be
- # a PrivateChatControl open, so we update the contacts presence
- contact.presence = properties.type
- app.contacts.remove_gc_contact(self._account, contact)
+ if contact is None:
+ # If contact is None, its probably that a user left from a not
+ # insync MUC, can happen on older servers
+ log.warning('Unknown contact left groupchat: %s',
+ properties.jid)
+ else:
+ # We remove the contact from the MUC, but there could be
+ # a PrivateChatControl open, so we update the contacts presence
+ contact.presence = properties.type
+ app.contacts.remove_gc_contact(self._account, contact)
log.info('User %s left', properties.jid)
self._raise_muc_event('muc-user-left', properties)
raise nbxmpp.NodeProcessed
=====================================
gajim/groupchat_control.py
=====================================
@@ -397,7 +397,7 @@ class GroupchatControl(ChatControlBase):
act.connect('change-state', self._on_notify_on_all_messages)
self.parent_win.window.add_action(act)
- status_default = app.config.get('print_status_in_mucs')
+ status_default = app.config.get('print_status_muc_default')
value = app.config.get_per('rooms', self.contact.jid,
'print_status', status_default)
@@ -407,7 +407,7 @@ class GroupchatControl(ChatControlBase):
act.connect('change-state', self._on_print_status)
self.parent_win.window.add_action(act)
- join_default = app.config.get('print_join_leave_in_mucs')
+ join_default = app.config.get('print_join_left_default')
value = app.config.get_per('rooms', self.contact.jid,
'print_join_left', join_default)
@@ -2008,8 +2008,9 @@ class GroupchatControl(ChatControlBase):
#Group Chat: We have been removed from the room
message = _('{nick} has been removed from the room{by}{reason}')
+ join_default = app.config.get('print_join_left_default')
print_join_left = app.config.get_per(
- 'rooms', self.room_jid, 'print_join_left')
+ 'rooms', self.room_jid, 'print_join_left', join_default)
if StatusCode.REMOVED_ERROR in status_codes:
# Handle 333 before 307, some MUCs add both
@@ -2060,8 +2061,9 @@ class GroupchatControl(ChatControlBase):
return
nick = event.properties.muc_nickname
+ join_default = app.config.get('print_join_left_default')
print_join_left = app.config.get_per(
- 'rooms', self.room_jid, 'print_join_left')
+ 'rooms', self.room_jid, 'print_join_left', join_default)
self.add_contact_to_roster(nick)
=====================================
gajim/gtk/preferences.py
=====================================
@@ -161,10 +161,10 @@ class Preferences(Gtk.ApplicationWindow):
self._ui.sync_threshold_combobox.set_id_column(0)
self._ui.sync_threshold_combobox.set_active_id(str(public_threshold))
- st = app.config.get('print_join_leave_in_mucs')
+ st = app.config.get('print_join_left_default')
self._ui.join_leave_checkbutton.set_active(st)
- st = app.config.get('print_status_in_mucs')
+ st = app.config.get('print_status_muc_default')
self._ui.status_change_checkbutton.set_active(st)
# Displayed chat state notifications
@@ -620,10 +620,10 @@ class Preferences(Gtk.ApplicationWindow):
app.config.set('public_room_sync_threshold', int(active))
def _on_join_leave_toggled(self, widget):
- self.on_checkbutton_toggled(widget, 'print_join_leave_in_mucs')
+ self.on_checkbutton_toggled(widget, 'print_join_left_default')
def _on_status_change_toggled(self, widget):
- self.on_checkbutton_toggled(widget, 'print_status_in_mucs')
+ self.on_checkbutton_toggled(widget, 'print_status_muc_default')
def on_show_chatstate_in_tabs_toggled(self, widget):
self.on_checkbutton_toggled(widget, 'show_chatstate_in_tabs')
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/a91f5f2c4914b597c9833894c8a31c6ba…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/a91f5f2c4914b597c9833894c8a31c6ba…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
a91f5f2c by Sebastiaan Lokhorst at 2019-01-05T17:37:09Z
Fix Bonjour (pybonjour) on macOS
- - - - -
2 changed files:
- README.md
- gajim/common/app.py
Changes:
=====================================
README.md
=====================================
@@ -17,7 +17,7 @@
- python3-pil (pillow) for support of webp avatars
- python3-gnupg to enable GPG encryption
-- For zeroconf (bonjour) you need python3-dbus
+- For zeroconf you need python3-dbus on Linux or [pybonjour](https://dev.gajim.org/lovetox/pybonjour-python3) on Windows/macOS
- gir1.2-gspell-1 and hunspell-LANG where lang is your locale eg. en, fr etc
- gir1.2-secret-1 for GNOME Keyring or KDE support as password storage
- D-Bus running to have gajim-remote working
=====================================
gajim/common/app.py
=====================================
@@ -220,12 +220,14 @@ def detect_dependencies():
# ZEROCONF
try:
- if os.name == 'nt':
- import pybonjour # pylint: disable=unused-variable
- _dependencies['PYBONJOUR'] = True
- else:
- import dbus # pylint: disable=unused-variable
- _dependencies['PYTHON-DBUS'] = True
+ import pybonjour # pylint: disable=unused-variable
+ _dependencies['PYBONJOUR'] = True
+ except Exception:
+ pass
+
+ try:
+ import dbus # pylint: disable=unused-variable
+ _dependencies['PYTHON-DBUS'] = True
except Exception:
pass
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/a91f5f2c4914b597c9833894c8a31c6ba0…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/a91f5f2c4914b597c9833894c8a31c6ba0…
You're receiving this email because of your account on dev.gajim.org.