Philipp Hörist pushed to branch gajim_1.1 at gajim / gajim
Commits:
383e220e by Philipp Hörist at 2018-10-26T15:17:56Z
Dont use deprecated const
- - - - -
cfd24b6d by Philipp Hörist at 2018-10-26T15:17:57Z
Move dbus modules into own folder
- light refactor of the screensaver module
- - - - -
b80afa71 by Philipp Hörist at 2018-10-26T15:17:57Z
Fix imports
- - - - -
bc97f6a9 by Philipp Hörist at 2018-10-26T15:17:57Z
Guard GeoClue import
- So we dont have to check on module import if GeoClue is installed
- - - - -
7bb4d07d by Philipp Hörist at 2018-10-26T15:17:57Z
Fix import
- - - - -
698ae2a3 by Matthew W. S. Bell at 2018-10-26T15:17:57Z
Obtain sleep inhibitor again after every sleep
- There is a PrepareForSleep signal before and after every sleep event.
The expectation is that before sleep, gajim cleans up and then releases
the sleep inhibitor. Accordingly, we must reacquire the inhibitor after
sleeping, which can helpfully be done with the other signal.
- Moved module to the dbus folder
- Embed logic in a LogindListener object so we can import the module
without listening to dbus
- - - - -
10 changed files:
- + gajim/common/dbus/__init__.py
- gajim/common/location_listener.py → gajim/common/dbus/location.py
- + gajim/common/dbus/logind.py
- gajim/music_track_listener.py → gajim/common/dbus/music_track.py
- + gajim/common/dbus/screensaver.py
- gajim/gui_interface.py
- − gajim/logind_listener.py
- gajim/message_textview.py
- gajim/roster_window.py
- − gajim/screensaver_listener.py
Changes:
=====================================
gajim/common/dbus/__init__.py
=====================================
=====================================
gajim/common/location_listener.py → gajim/common/dbus/location.py
=====================================
@@ -14,17 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
-from datetime import datetime
import logging
+from datetime import datetime
+
+from gi.repository import GLib
from gajim.common import app
-import gi
-gi.require_version('Geoclue', '2.0')
-from gi.repository import Geoclue
-from gi.repository import GLib
+if app.is_installed('GEOCLUE'):
+ from gi.repository import Geoclue
-log = logging.getLogger('gajim.c.location_listener')
+log = logging.getLogger('gajim.c.dbus.location')
class LocationListener:
@@ -102,5 +102,9 @@ class LocationListener:
def enable():
+ if not app.is_installed('GEOCLUE'):
+ log.warning('GeoClue not installed')
+ return
+
listener = LocationListener.get()
listener.start()
=====================================
gajim/common/dbus/logind.py
=====================================
@@ -0,0 +1,135 @@
+# Copyright (C) 2014 Kamil Paral <kamil.paral AT gmail.com>
+#
+# This file is part of Gajim.
+#
+# Gajim is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; version 3 only.
+#
+# Gajim is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
+
+'''
+Watch for system sleep using systemd-logind.
+Documentation: http://www.freedesktop.org/wiki/Software/systemd/inhibit
+'''
+
+import os
+import logging
+
+from gi.repository import Gio
+from gi.repository import GLib
+
+from gajim.common import app
+from gajim.common.i18n import _
+
+log = logging.getLogger('gajim.c.dbus.logind')
+
+
+class LogindListener:
+ _instance = None
+
+ @classmethod
+ def get(cls):
+ if cls._instance is None:
+ cls._instance = cls()
+ return cls._instance
+
+ def __init__(self):
+ # file descriptor object of the inhibitor
+ self._inhibit_fd = None
+
+ Gio.bus_watch_name(
+ Gio.BusType.SYSTEM,
+ 'org.freedesktop.login1',
+ Gio.BusNameWatcherFlags.NONE,
+ self._on_appear_logind,
+ self._on_vanish_logind)
+
+ def _on_prepare_for_sleep(self, connection, _sender_name, _object_path,
+ interface_name, signal_name, parameters,
+ *_user_data):
+ '''Signal handler for PrepareForSleep event'''
+ log.debug('Received signal %s.%s%s', interface_name, signal_name, parameters)
+
+ before = parameters[0] # Signal is either before or after sleep occurs
+ if before:
+ warn = self._inhibit_fd is None
+ log.log(
+ logging.WARNING if warn else logging.INFO,
+ 'Preparing for sleep by disconnecting from network%s',
+ ', without holding a sleep inhibitor' if warn else '')
+
+ for name, conn in app.connections.items():
+ if app.account_is_connected(name):
+ conn.old_show = app.SHOW_LIST[conn.connected]
+ st = conn.status
+ conn.change_status('offline', _('Machine is going to sleep'))
+ conn.status = st
+ conn.time_to_reconnect = 5
+
+ self._disinhibit_sleep()
+ else:
+ self._inhibit_sleep(connection)
+ for conn in app.connections.values():
+ if conn.connected <= 0 and conn.time_to_reconnect:
+ conn.reconnect()
+
+ def _inhibit_sleep(self, connection):
+ '''Obtain a sleep delay inhibitor from logind'''
+ if self._inhibit_fd is not None:
+ # Something is wrong, we have an inhibitor fd, and we are asking for
+ # yet another one.
+ log.warning('Trying to obtain a sleep inhibitor '
+ 'while already holding one.')
+
+ ret, ret_fdlist = connection.call_with_unix_fd_list_sync(
+ 'org.freedesktop.login1',
+ '/org/freedesktop/login1',
+ 'org.freedesktop.login1.Manager',
+ 'Inhibit',
+ GLib.Variant('(ssss)', (
+ 'sleep', 'org.gajim.Gajim', _('Disconnect from the network'),
+ 'delay' # Inhibitor will delay but not block sleep
+ )),
+ GLib.VariantType.new('(h)'),
+ Gio.DBusCallFlags.NONE, -1, None, None)
+
+ log.info('Inhibit sleep')
+ self._inhibit_fd = ret_fdlist.get(ret.unpack()[0])
+
+ def _disinhibit_sleep(self):
+ '''Relinquish our sleep delay inhibitor'''
+ if self._inhibit_fd is not None:
+ os.close(self._inhibit_fd)
+ self._inhibit_fd = None
+ log.info('Disinhibit sleep')
+
+ def _on_appear_logind(self, connection, name, name_owner, *_user_data):
+ '''Use signal and locks provided by org.freedesktop.login1'''
+ log.info('Name %s appeared, owned by %s', name, name_owner)
+
+ connection.signal_subscribe(
+ 'org.freedesktop.login1',
+ 'org.freedesktop.login1.Manager',
+ 'PrepareForSleep',
+ '/org/freedesktop/login1',
+ None,
+ Gio.DBusSignalFlags.NONE,
+ self._on_prepare_for_sleep,
+ None)
+ self._inhibit_sleep(connection)
+
+ def _on_vanish_logind(self, _connection, name, *_user_data):
+ '''Release remaining resources related to org.freedesktop.login1'''
+ log.info('Name %s vanished', name)
+ self._disinhibit_sleep()
+
+
+def enable():
+ LogindListener.get()
=====================================
gajim/music_track_listener.py → gajim/common/dbus/music_track.py
=====================================
@@ -24,7 +24,7 @@ import logging
from gi.repository import GObject
from gi.repository import Gio, GLib
-log = logging.getLogger('gajim.music_track_listener')
+log = logging.getLogger('gajim.c.dbus.music_track')
MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.'
=====================================
gajim/common/dbus/screensaver.py
=====================================
@@ -0,0 +1,103 @@
+# Copyright (C) 2018 André Apitzsch <git AT apitzsch.eu>
+#
+# This file is part of Gajim.
+#
+# Gajim is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; version 3 only.
+#
+# Gajim is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
+
+import logging
+
+from gi.repository import Gio
+
+from gajim.common import app
+
+log = logging.getLogger('gajim.c.dbus.screensaver')
+
+
+class ScreensaverListener:
+ _instance = None
+
+ @classmethod
+ def get(cls):
+ if cls._instance is None:
+ cls._instance = cls()
+ return cls._instance
+
+ def __init__(self):
+ Gio.bus_watch_name(
+ Gio.BusType.SESSION,
+ 'org.gnome.ScreenSaver',
+ Gio.BusNameWatcherFlags.NONE,
+ self._appeared,
+ None)
+
+ @staticmethod
+ def _signal_received(_connection, _sender_name, _object_path,
+ interface_name, _signal_name, parameters, *_user_data):
+ '''Signal handler for screensaver active change'''
+
+ log.info('Signal received: %s - %s', interface_name, parameters)
+
+ roster = app.interface.roster
+
+ if not parameters[0]:
+ for account in app.connections:
+ if app.account_is_connected(account) and \
+ app.sleeper_state[account] == 'autoaway-forced':
+ # We came back online after screensaver
+ # autoaway
+ roster.send_status(account, 'online',
+ app.status_before_autoaway[account])
+ app.status_before_autoaway[account] = ''
+ app.sleeper_state[account] = 'online'
+ return
+ if not app.config.get('autoaway'):
+ # Don't go auto away if user disabled the option
+ return
+ for account in app.connections:
+ if account not in app.sleeper_state or not app.sleeper_state[account]:
+ continue
+ if app.sleeper_state[account] == 'online':
+ if not app.account_is_connected(account):
+ continue
+ # we save our online status
+ app.status_before_autoaway[account] = \
+ app.connections[account].status
+ # we go away (no auto status) [we pass True to auto param]
+ auto_message = app.config.get('autoaway_message')
+ if not auto_message:
+ auto_message = app.connections[account].status
+ else:
+ auto_message = auto_message.replace('$S', '%(status)s')
+ auto_message = auto_message.replace('$T', '%(time)s')
+ auto_message = auto_message % {
+ 'status': app.status_before_autoaway[account],
+ 'time': app.config.get('autoxatime')}
+ roster.send_status(account, 'away', auto_message, auto=True)
+ app.sleeper_state[account] = 'autoaway-forced'
+
+ def _appeared(self, connection, name, _name_owner, *_user_data):
+ '''Set up a listener for screensaver signals'''
+ log.info('%s appeared', name)
+ connection.signal_subscribe(
+ 'org.gnome.ScreenSaver',
+ 'org.gnome.ScreenSaver',
+ 'ActiveChanged',
+ '/org/gnome/ScreenSaver',
+ None,
+ Gio.DBusSignalFlags.NONE,
+ self._signal_received,
+ None)
+
+
+def enable():
+ ScreensaverListener.get()
=====================================
gajim/gui_interface.py
=====================================
@@ -56,11 +56,10 @@ except Exception:
from gajim.common import app
from gajim.common import events
-
-from gajim.music_track_listener import MusicTrackListener
-
-if app.is_installed('GEOCLUE'):
- from gajim.common import location_listener
+from gajim.common.dbus import screensaver
+from gajim.common.dbus import location
+from gajim.common.dbus import music_track
+from gajim.common.dbus import logind
from gajim import gtkgui_helpers
from gajim import gui_menu_builder
@@ -1118,7 +1117,7 @@ class Interface:
# enable location listener
if (pep_supported and app.is_installed('GEOCLUE') and
app.config.get_per('accounts', account, 'publish_location')):
- location_listener.enable()
+ location.enable()
@staticmethod
def show_httpupload_progress(file):
@@ -2083,14 +2082,14 @@ class Interface:
def enable_music_listener(self):
- listener = MusicTrackListener.get()
+ listener = music_track.MusicTrackListener.get()
if not self.music_track_changed_signal:
self.music_track_changed_signal = listener.connect(
'music-track-changed', self.music_track_changed)
listener.start()
def disable_music_listener(self):
- listener = MusicTrackListener.get()
+ listener = music_track.MusicTrackListener.get()
listener.disconnect(self.music_track_changed_signal)
self.music_track_changed_signal = None
listener.stop()
@@ -2725,8 +2724,8 @@ class Interface:
# Handle screensaver
if sys.platform == 'linux':
- from gajim import logind_listener # pylint: disable=unused-variable
- from gajim import screensaver_listener # pylint: disable=unused-variable
+ logind.enable()
+ screensaver.enable()
self.show_vcard_when_connect = []
=====================================
gajim/logind_listener.py deleted
=====================================
@@ -1,116 +0,0 @@
-# Copyright (C) 2014 Kamil Paral <kamil.paral AT gmail.com>
-#
-# This file is part of Gajim.
-#
-# Gajim is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published
-# by the Free Software Foundation; version 3 only.
-#
-# Gajim is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
-
-'''
-Watch for system suspend using systemd-logind.
-Documentation: http://www.freedesktop.org/wiki/Software/systemd/inhibit
-'''
-
-import os
-import logging
-
-from gi.repository import Gio, GLib
-
-from gajim.common import app
-from gajim.common.i18n import _
-
-log = logging.getLogger('gajim.logind_listener')
-
-# file descriptor of the inhibitor; negative number means we don't
-# hold any (yet)
-fd = None
-
-
-def signal_received(connection, sender_name, object_path,
- interface_name, signal_name, parameters, *user_data):
- '''Signal handler for suspend event'''
-
- global fd
-
- log.info('Signal received: %s - %s', interface_name, parameters)
-
- # signal is sent right before (with the parameter True) and after
- # (with the parameter False) the system goes down for suspend/hibernate
- if not parameters[0]:
- return
-
- # we're going for suspend, let's disconnect
- log.debug('System suspend detected, disconnecting from network…')
- for name, conn in app.connections.items():
- if app.account_is_connected(name):
- conn.old_show = app.SHOW_LIST[conn.connected]
- st = conn.status
- conn.change_status('offline', _('Machine is going to sleep'))
- conn.status = st
- conn.time_to_reconnect = 5
-
- # close the file descriptor and let the computer suspend
- if fd is not None:
- os.close(fd)
- fd = None
- else:
- # something is wrong, the system is suspending but we don't have
- # a lock file
- log.warning("System suspend detected, but we don't seem to be holding "
- "a file descriptor for sleep inhibitor")
-
-
-def get_inhibitor(connection):
- '''Ask for a suspend delay inhibitor'''
-
- global fd
-
- if fd is not None:
- # something is wrong, we haven't closed the previous file descriptor
- # and we ask for yet another one
- log.warning('We are about to ask for a sleep inhibitor, but we seem '
- 'to be holding one already')
-
- ret = connection.call_with_unix_fd_list_sync(
- 'org.freedesktop.login1',
- '/org/freedesktop/login1',
- 'org.freedesktop.login1.Manager',
- 'Inhibit',
- GLib.Variant('(ssss)', ('sleep', 'org.gajim.Gajim',
- _('Disconnect from the network'), 'delay')),
- GLib.VariantType.new('(h)'),
- Gio.DBusCallFlags.NONE, -1, None, None)
-
- fd = ret.out_fd_list.get(0)
-
-
-def appeared(connection, name, name_owner, *user_data):
- '''Set up a listener for suspend signals'''
- log.info('%s appeared', name)
- if name == 'org.freedesktop.login1':
- connection.signal_subscribe(
- 'org.freedesktop.login1',
- 'org.freedesktop.login1.Manager',
- 'PrepareForSleep',
- '/org/freedesktop/login1',
- None,
- Gio.DBusSignalFlags.NONE,
- signal_received,
- None)
- get_inhibitor(connection)
-
-
-Gio.bus_watch_name(
- Gio.BusType.SYSTEM,
- 'org.freedesktop.login1',
- Gio.BusNameWatcherFlags.NONE,
- appeared,
- None)
=====================================
gajim/message_textview.py
=====================================
@@ -38,7 +38,7 @@ class MessageTextView(Gtk.TextView):
chat/groupchat windows
"""
__gsignals__ = {
- 'text-changed': (GObject.SIGNAL_RUN_LAST, None, (Gtk.TextBuffer,))
+ 'text-changed': (GObject.SignalFlags.RUN_LAST, None, (Gtk.TextBuffer,))
}
UNDO_LIMIT = 20
=====================================
gajim/roster_window.py
=====================================
@@ -61,8 +61,8 @@ from gajim.common.exceptions import GajimGeneralException
from gajim.common import i18n
from gajim.common.i18n import _
from gajim.common.const import PEPEventType, AvatarSize, StyleAttr
-if app.is_installed('GEOCLUE'):
- from gajim.common import location_listener
+from gajim.common.dbus import location
+
from gajim.common import ged
from gajim.message_window import MessageWindowMgr
@@ -3659,7 +3659,7 @@ class RosterWindow:
active = widget.get_active()
app.config.set_per('accounts', account, 'publish_location', active)
if active:
- location_listener.enable()
+ location.enable()
else:
app.connections[account].get_module('UserLocation').send(None)
=====================================
gajim/screensaver_listener.py deleted
=====================================
@@ -1,90 +0,0 @@
-# Copyright (C) 2018 André Apitzsch <git AT apitzsch.eu>
-#
-# This file is part of Gajim.
-#
-# Gajim is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published
-# by the Free Software Foundation; version 3 only.
-#
-# Gajim is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
-
-import logging
-
-from gi.repository import Gio
-
-from gajim.common import app
-
-log = logging.getLogger('gajim.screensaver_listener')
-
-
-def signal_received(connection, sender_name, object_path,
- interface_name, signal_name, parameters, *user_data):
- '''Signal handler for screensaver active change'''
-
- log.info('Signal received: %s - %s', interface_name, parameters)
-
- roster = app.interface.roster
-
- if not parameters[0]:
- for account in app.connections:
- if app.account_is_connected(account) and \
- app.sleeper_state[account] == 'autoaway-forced':
- # We came back online after screensaver
- # autoaway
- roster.send_status(account, 'online',
- app.status_before_autoaway[account])
- app.status_before_autoaway[account] = ''
- app.sleeper_state[account] = 'online'
- return
- if not app.config.get('autoaway'):
- # Don't go auto away if user disabled the option
- return
- for account in app.connections:
- if account not in app.sleeper_state or not app.sleeper_state[account]:
- continue
- if app.sleeper_state[account] == 'online':
- if not app.account_is_connected(account):
- continue
- # we save our online status
- app.status_before_autoaway[account] = \
- app.connections[account].status
- # we go away (no auto status) [we pass True to auto param]
- auto_message = app.config.get('autoaway_message')
- if not auto_message:
- auto_message = app.connections[account].status
- else:
- auto_message = auto_message.replace('$S', '%(status)s')
- auto_message = auto_message.replace('$T', '%(time)s')
- auto_message = auto_message % {
- 'status': app.status_before_autoaway[account],
- 'time': app.config.get('autoxatime')}
- roster.send_status(account, 'away', auto_message, auto=True)
- app.sleeper_state[account] = 'autoaway-forced'
-
-
-def appeared(connection, name, name_owner, *user_data):
- '''Set up a listener for screensaver signals'''
- log.info('%s appeared', name)
- connection.signal_subscribe(
- 'org.gnome.ScreenSaver',
- 'org.gnome.ScreenSaver',
- 'ActiveChanged',
- '/org/gnome/ScreenSaver',
- None,
- Gio.DBusSignalFlags.NONE,
- signal_received,
- None)
-
-
-Gio.bus_watch_name(
- Gio.BusType.SESSION,
- 'org.gnome.ScreenSaver',
- Gio.BusNameWatcherFlags.NONE,
- appeared,
- None)
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/a7624b564f2c8503b4580d0085c50cff2…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/a7624b564f2c8503b4580d0085c50cff2…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
2a62209e by Matthew W. S. Bell at 2018-10-26T10:57:13Z
Obtain sleep inhibitor again after every sleep
- There is a PrepareForSleep signal before and after every sleep event.
The expectation is that before sleep, gajim cleans up and then releases
the sleep inhibitor. Accordingly, we must reacquire the inhibitor after
sleeping, which can helpfully be done with the other signal.
- Moved module to the dbus folder
- Embed logic in a LogindListener object so we can import the module
without listening to dbus
- - - - -
3 changed files:
- + gajim/common/dbus/logind.py
- gajim/gui_interface.py
- − gajim/logind_listener.py
Changes:
=====================================
gajim/common/dbus/logind.py
=====================================
@@ -0,0 +1,135 @@
+# Copyright (C) 2014 Kamil Paral <kamil.paral AT gmail.com>
+#
+# This file is part of Gajim.
+#
+# Gajim is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; version 3 only.
+#
+# Gajim is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
+
+'''
+Watch for system sleep using systemd-logind.
+Documentation: http://www.freedesktop.org/wiki/Software/systemd/inhibit
+'''
+
+import os
+import logging
+
+from gi.repository import Gio
+from gi.repository import GLib
+
+from gajim.common import app
+from gajim.common.i18n import _
+
+log = logging.getLogger('gajim.c.dbus.logind')
+
+
+class LogindListener:
+ _instance = None
+
+ @classmethod
+ def get(cls):
+ if cls._instance is None:
+ cls._instance = cls()
+ return cls._instance
+
+ def __init__(self):
+ # file descriptor object of the inhibitor
+ self._inhibit_fd = None
+
+ Gio.bus_watch_name(
+ Gio.BusType.SYSTEM,
+ 'org.freedesktop.login1',
+ Gio.BusNameWatcherFlags.NONE,
+ self._on_appear_logind,
+ self._on_vanish_logind)
+
+ def _on_prepare_for_sleep(self, connection, _sender_name, _object_path,
+ interface_name, signal_name, parameters,
+ *_user_data):
+ '''Signal handler for PrepareForSleep event'''
+ log.debug('Received signal %s.%s%s', interface_name, signal_name, parameters)
+
+ before = parameters[0] # Signal is either before or after sleep occurs
+ if before:
+ warn = self._inhibit_fd is None
+ log.log(
+ logging.WARNING if warn else logging.INFO,
+ 'Preparing for sleep by disconnecting from network%s',
+ ', without holding a sleep inhibitor' if warn else '')
+
+ for name, conn in app.connections.items():
+ if app.account_is_connected(name):
+ conn.old_show = app.SHOW_LIST[conn.connected]
+ st = conn.status
+ conn.change_status('offline', _('Machine is going to sleep'))
+ conn.status = st
+ conn.time_to_reconnect = 5
+
+ self._disinhibit_sleep()
+ else:
+ self._inhibit_sleep(connection)
+ for conn in app.connections.values():
+ if conn.connected <= 0 and conn.time_to_reconnect:
+ conn.reconnect()
+
+ def _inhibit_sleep(self, connection):
+ '''Obtain a sleep delay inhibitor from logind'''
+ if self._inhibit_fd is not None:
+ # Something is wrong, we have an inhibitor fd, and we are asking for
+ # yet another one.
+ log.warning('Trying to obtain a sleep inhibitor '
+ 'while already holding one.')
+
+ ret, ret_fdlist = connection.call_with_unix_fd_list_sync(
+ 'org.freedesktop.login1',
+ '/org/freedesktop/login1',
+ 'org.freedesktop.login1.Manager',
+ 'Inhibit',
+ GLib.Variant('(ssss)', (
+ 'sleep', 'org.gajim.Gajim', _('Disconnect from the network'),
+ 'delay' # Inhibitor will delay but not block sleep
+ )),
+ GLib.VariantType.new('(h)'),
+ Gio.DBusCallFlags.NONE, -1, None, None)
+
+ log.info('Inhibit sleep')
+ self._inhibit_fd = ret_fdlist.get(ret.unpack()[0])
+
+ def _disinhibit_sleep(self):
+ '''Relinquish our sleep delay inhibitor'''
+ if self._inhibit_fd is not None:
+ os.close(self._inhibit_fd)
+ self._inhibit_fd = None
+ log.info('Disinhibit sleep')
+
+ def _on_appear_logind(self, connection, name, name_owner, *_user_data):
+ '''Use signal and locks provided by org.freedesktop.login1'''
+ log.info('Name %s appeared, owned by %s', name, name_owner)
+
+ connection.signal_subscribe(
+ 'org.freedesktop.login1',
+ 'org.freedesktop.login1.Manager',
+ 'PrepareForSleep',
+ '/org/freedesktop/login1',
+ None,
+ Gio.DBusSignalFlags.NONE,
+ self._on_prepare_for_sleep,
+ None)
+ self._inhibit_sleep(connection)
+
+ def _on_vanish_logind(self, _connection, name, *_user_data):
+ '''Release remaining resources related to org.freedesktop.login1'''
+ log.info('Name %s vanished', name)
+ self._disinhibit_sleep()
+
+
+def enable():
+ LogindListener.get()
=====================================
gajim/gui_interface.py
=====================================
@@ -59,6 +59,7 @@ from gajim.common import events
from gajim.common.dbus import screensaver
from gajim.common.dbus import location
from gajim.common.dbus import music_track
+from gajim.common.dbus import logind
from gajim import gtkgui_helpers
from gajim import gui_menu_builder
@@ -2723,7 +2724,7 @@ class Interface:
# Handle screensaver
if sys.platform == 'linux':
- from gajim import logind_listener # pylint: disable=unused-variable
+ logind.enable()
screensaver.enable()
self.show_vcard_when_connect = []
=====================================
gajim/logind_listener.py deleted
=====================================
@@ -1,116 +0,0 @@
-# Copyright (C) 2014 Kamil Paral <kamil.paral AT gmail.com>
-#
-# This file is part of Gajim.
-#
-# Gajim is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published
-# by the Free Software Foundation; version 3 only.
-#
-# Gajim is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
-
-'''
-Watch for system suspend using systemd-logind.
-Documentation: http://www.freedesktop.org/wiki/Software/systemd/inhibit
-'''
-
-import os
-import logging
-
-from gi.repository import Gio, GLib
-
-from gajim.common import app
-from gajim.common.i18n import _
-
-log = logging.getLogger('gajim.logind_listener')
-
-# file descriptor of the inhibitor; negative number means we don't
-# hold any (yet)
-fd = None
-
-
-def signal_received(connection, sender_name, object_path,
- interface_name, signal_name, parameters, *user_data):
- '''Signal handler for suspend event'''
-
- global fd
-
- log.info('Signal received: %s - %s', interface_name, parameters)
-
- # signal is sent right before (with the parameter True) and after
- # (with the parameter False) the system goes down for suspend/hibernate
- if not parameters[0]:
- return
-
- # we're going for suspend, let's disconnect
- log.debug('System suspend detected, disconnecting from network…')
- for name, conn in app.connections.items():
- if app.account_is_connected(name):
- conn.old_show = app.SHOW_LIST[conn.connected]
- st = conn.status
- conn.change_status('offline', _('Machine is going to sleep'))
- conn.status = st
- conn.time_to_reconnect = 5
-
- # close the file descriptor and let the computer suspend
- if fd is not None:
- os.close(fd)
- fd = None
- else:
- # something is wrong, the system is suspending but we don't have
- # a lock file
- log.warning("System suspend detected, but we don't seem to be holding "
- "a file descriptor for sleep inhibitor")
-
-
-def get_inhibitor(connection):
- '''Ask for a suspend delay inhibitor'''
-
- global fd
-
- if fd is not None:
- # something is wrong, we haven't closed the previous file descriptor
- # and we ask for yet another one
- log.warning('We are about to ask for a sleep inhibitor, but we seem '
- 'to be holding one already')
-
- ret = connection.call_with_unix_fd_list_sync(
- 'org.freedesktop.login1',
- '/org/freedesktop/login1',
- 'org.freedesktop.login1.Manager',
- 'Inhibit',
- GLib.Variant('(ssss)', ('sleep', 'org.gajim.Gajim',
- _('Disconnect from the network'), 'delay')),
- GLib.VariantType.new('(h)'),
- Gio.DBusCallFlags.NONE, -1, None, None)
-
- fd = ret.out_fd_list.get(0)
-
-
-def appeared(connection, name, name_owner, *user_data):
- '''Set up a listener for suspend signals'''
- log.info('%s appeared', name)
- if name == 'org.freedesktop.login1':
- connection.signal_subscribe(
- 'org.freedesktop.login1',
- 'org.freedesktop.login1.Manager',
- 'PrepareForSleep',
- '/org/freedesktop/login1',
- None,
- Gio.DBusSignalFlags.NONE,
- signal_received,
- None)
- get_inhibitor(connection)
-
-
-Gio.bus_watch_name(
- Gio.BusType.SYSTEM,
- 'org.freedesktop.login1',
- Gio.BusNameWatcherFlags.NONE,
- appeared,
- None)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2a62209e1e5e0dff020d3cf94e82f811f6…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/2a62209e1e5e0dff020d3cf94e82f811f6…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
54fe4dac by Philipp Hörist at 2018-10-25T23:49:15Z
Fix import
- - - - -
1 changed file:
- gajim/common/dbus/location.py
Changes:
=====================================
gajim/common/dbus/location.py
=====================================
@@ -21,6 +21,8 @@ from gi.repository import GLib
from gajim.common import app
+if app.is_installed('GEOCLUE'):
+ from gi.repository import Geoclue
log = logging.getLogger('gajim.c.dbus.location')
@@ -104,6 +106,5 @@ def enable():
log.warning('GeoClue not installed')
return
- from gi.repository import Geoclue
listener = LocationListener.get()
listener.start()
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/54fe4dacf2b5b51cd402e2ad607f8f9f30…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/54fe4dacf2b5b51cd402e2ad607f8f9f30…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
e5beff26 by Philipp Hörist at 2018-10-25T23:45:43Z
Guard GeoClue import
- So we dont have to check on module import if GeoClue is installed
- - - - -
1 changed file:
- gajim/common/dbus/location.py
Changes:
=====================================
gajim/common/dbus/location.py
=====================================
@@ -14,15 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
-from datetime import datetime
import logging
+from datetime import datetime
+
+from gi.repository import GLib
from gajim.common import app
-import gi
-gi.require_version('Geoclue', '2.0')
-from gi.repository import Geoclue
-from gi.repository import GLib
log = logging.getLogger('gajim.c.dbus.location')
@@ -102,5 +100,10 @@ class LocationListener:
def enable():
+ if not app.is_installed('GEOCLUE'):
+ log.warning('GeoClue not installed')
+ return
+
+ from gi.repository import Geoclue
listener = LocationListener.get()
listener.start()
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/e5beff266a2324542a5df3dcb76cb4f865…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/e5beff266a2324542a5df3dcb76cb4f865…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
df7f0324 by Philipp Hörist at 2018-10-25T23:19:47Z
Move dbus modules into own folder
- light refactor of the screensaver module
- - - - -
7 changed files:
- + gajim/common/dbus/__init__.py
- gajim/common/location_listener.py → gajim/common/dbus/location.py
- gajim/music_track_listener.py → gajim/common/dbus/music_track.py
- + gajim/common/dbus/screensaver.py
- gajim/gui_interface.py
- gajim/roster_window.py
- − gajim/screensaver_listener.py
Changes:
=====================================
gajim/common/dbus/__init__.py
=====================================
=====================================
gajim/common/location_listener.py → gajim/common/dbus/location.py
=====================================
@@ -24,7 +24,7 @@ gi.require_version('Geoclue', '2.0')
from gi.repository import Geoclue
from gi.repository import GLib
-log = logging.getLogger('gajim.c.location_listener')
+log = logging.getLogger('gajim.c.dbus.location')
class LocationListener:
=====================================
gajim/music_track_listener.py → gajim/common/dbus/music_track.py
=====================================
@@ -24,7 +24,7 @@ import logging
from gi.repository import GObject
from gi.repository import Gio, GLib
-log = logging.getLogger('gajim.music_track_listener')
+log = logging.getLogger('gajim.c.dbus.music_track')
MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.'
=====================================
gajim/common/dbus/screensaver.py
=====================================
@@ -0,0 +1,103 @@
+# Copyright (C) 2018 André Apitzsch <git AT apitzsch.eu>
+#
+# This file is part of Gajim.
+#
+# Gajim is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; version 3 only.
+#
+# Gajim is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
+
+import logging
+
+from gi.repository import Gio
+
+from gajim.common import app
+
+log = logging.getLogger('gajim.c.dbus.screensaver')
+
+
+class ScreensaverListener:
+ _instance = None
+
+ @classmethod
+ def get(cls):
+ if cls._instance is None:
+ cls._instance = cls()
+ return cls._instance
+
+ def __init__(self):
+ Gio.bus_watch_name(
+ Gio.BusType.SESSION,
+ 'org.gnome.ScreenSaver',
+ Gio.BusNameWatcherFlags.NONE,
+ self._appeared,
+ None)
+
+ @staticmethod
+ def _signal_received(_connection, _sender_name, _object_path,
+ interface_name, _signal_name, parameters, *_user_data):
+ '''Signal handler for screensaver active change'''
+
+ log.info('Signal received: %s - %s', interface_name, parameters)
+
+ roster = app.interface.roster
+
+ if not parameters[0]:
+ for account in app.connections:
+ if app.account_is_connected(account) and \
+ app.sleeper_state[account] == 'autoaway-forced':
+ # We came back online after screensaver
+ # autoaway
+ roster.send_status(account, 'online',
+ app.status_before_autoaway[account])
+ app.status_before_autoaway[account] = ''
+ app.sleeper_state[account] = 'online'
+ return
+ if not app.config.get('autoaway'):
+ # Don't go auto away if user disabled the option
+ return
+ for account in app.connections:
+ if account not in app.sleeper_state or not app.sleeper_state[account]:
+ continue
+ if app.sleeper_state[account] == 'online':
+ if not app.account_is_connected(account):
+ continue
+ # we save our online status
+ app.status_before_autoaway[account] = \
+ app.connections[account].status
+ # we go away (no auto status) [we pass True to auto param]
+ auto_message = app.config.get('autoaway_message')
+ if not auto_message:
+ auto_message = app.connections[account].status
+ else:
+ auto_message = auto_message.replace('$S', '%(status)s')
+ auto_message = auto_message.replace('$T', '%(time)s')
+ auto_message = auto_message % {
+ 'status': app.status_before_autoaway[account],
+ 'time': app.config.get('autoxatime')}
+ roster.send_status(account, 'away', auto_message, auto=True)
+ app.sleeper_state[account] = 'autoaway-forced'
+
+ def _appeared(self, connection, name, _name_owner, *_user_data):
+ '''Set up a listener for screensaver signals'''
+ log.info('%s appeared', name)
+ connection.signal_subscribe(
+ 'org.gnome.ScreenSaver',
+ 'org.gnome.ScreenSaver',
+ 'ActiveChanged',
+ '/org/gnome/ScreenSaver',
+ None,
+ Gio.DBusSignalFlags.NONE,
+ self._signal_received,
+ None)
+
+
+def enable():
+ ScreensaverListener.get()
=====================================
gajim/gui_interface.py
=====================================
@@ -56,11 +56,7 @@ except Exception:
from gajim.common import app
from gajim.common import events
-
-from gajim.music_track_listener import MusicTrackListener
-
-if app.is_installed('GEOCLUE'):
- from gajim.common import location_listener
+from gajim.common import dbus
from gajim import gtkgui_helpers
from gajim import gui_menu_builder
@@ -1118,7 +1114,7 @@ class Interface:
# enable location listener
if (pep_supported and app.is_installed('GEOCLUE') and
app.config.get_per('accounts', account, 'publish_location')):
- location_listener.enable()
+ dbus.location.enable()
@staticmethod
def show_httpupload_progress(file):
@@ -2083,14 +2079,14 @@ class Interface:
def enable_music_listener(self):
- listener = MusicTrackListener.get()
+ listener = dbus.music_track.MusicTrackListener.get()
if not self.music_track_changed_signal:
self.music_track_changed_signal = listener.connect(
'music-track-changed', self.music_track_changed)
listener.start()
def disable_music_listener(self):
- listener = MusicTrackListener.get()
+ listener = dbus.music_track.MusicTrackListener.get()
listener.disconnect(self.music_track_changed_signal)
self.music_track_changed_signal = None
listener.stop()
@@ -2726,7 +2722,7 @@ class Interface:
# Handle screensaver
if sys.platform == 'linux':
from gajim import logind_listener # pylint: disable=unused-variable
- from gajim import screensaver_listener # pylint: disable=unused-variable
+ dbus.screensaver.enable()
self.show_vcard_when_connect = []
=====================================
gajim/roster_window.py
=====================================
@@ -62,7 +62,7 @@ from gajim.common import i18n
from gajim.common.i18n import _
from gajim.common.const import PEPEventType, AvatarSize, StyleAttr
if app.is_installed('GEOCLUE'):
- from gajim.common import location_listener
+ from gajim.common import dbus
from gajim.common import ged
from gajim.message_window import MessageWindowMgr
@@ -3659,7 +3659,7 @@ class RosterWindow:
active = widget.get_active()
app.config.set_per('accounts', account, 'publish_location', active)
if active:
- location_listener.enable()
+ dbus.location.enable()
else:
app.connections[account].get_module('UserLocation').send(None)
=====================================
gajim/screensaver_listener.py deleted
=====================================
@@ -1,90 +0,0 @@
-# Copyright (C) 2018 André Apitzsch <git AT apitzsch.eu>
-#
-# This file is part of Gajim.
-#
-# Gajim is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published
-# by the Free Software Foundation; version 3 only.
-#
-# Gajim is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
-
-import logging
-
-from gi.repository import Gio
-
-from gajim.common import app
-
-log = logging.getLogger('gajim.screensaver_listener')
-
-
-def signal_received(connection, sender_name, object_path,
- interface_name, signal_name, parameters, *user_data):
- '''Signal handler for screensaver active change'''
-
- log.info('Signal received: %s - %s', interface_name, parameters)
-
- roster = app.interface.roster
-
- if not parameters[0]:
- for account in app.connections:
- if app.account_is_connected(account) and \
- app.sleeper_state[account] == 'autoaway-forced':
- # We came back online after screensaver
- # autoaway
- roster.send_status(account, 'online',
- app.status_before_autoaway[account])
- app.status_before_autoaway[account] = ''
- app.sleeper_state[account] = 'online'
- return
- if not app.config.get('autoaway'):
- # Don't go auto away if user disabled the option
- return
- for account in app.connections:
- if account not in app.sleeper_state or not app.sleeper_state[account]:
- continue
- if app.sleeper_state[account] == 'online':
- if not app.account_is_connected(account):
- continue
- # we save our online status
- app.status_before_autoaway[account] = \
- app.connections[account].status
- # we go away (no auto status) [we pass True to auto param]
- auto_message = app.config.get('autoaway_message')
- if not auto_message:
- auto_message = app.connections[account].status
- else:
- auto_message = auto_message.replace('$S', '%(status)s')
- auto_message = auto_message.replace('$T', '%(time)s')
- auto_message = auto_message % {
- 'status': app.status_before_autoaway[account],
- 'time': app.config.get('autoxatime')}
- roster.send_status(account, 'away', auto_message, auto=True)
- app.sleeper_state[account] = 'autoaway-forced'
-
-
-def appeared(connection, name, name_owner, *user_data):
- '''Set up a listener for screensaver signals'''
- log.info('%s appeared', name)
- connection.signal_subscribe(
- 'org.gnome.ScreenSaver',
- 'org.gnome.ScreenSaver',
- 'ActiveChanged',
- '/org/gnome/ScreenSaver',
- None,
- Gio.DBusSignalFlags.NONE,
- signal_received,
- None)
-
-
-Gio.bus_watch_name(
- Gio.BusType.SESSION,
- 'org.gnome.ScreenSaver',
- Gio.BusNameWatcherFlags.NONE,
- appeared,
- None)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/df7f0324a33dcb76d64da728efc708048b…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/df7f0324a33dcb76d64da728efc708048b…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
d98ba45f by Philipp Hörist at 2018-10-25T22:47:36Z
Dont use deprecated const
- - - - -
1 changed file:
- gajim/message_textview.py
Changes:
=====================================
gajim/message_textview.py
=====================================
@@ -38,7 +38,7 @@ class MessageTextView(Gtk.TextView):
chat/groupchat windows
"""
__gsignals__ = {
- 'text-changed': (GObject.SIGNAL_RUN_LAST, None, (Gtk.TextBuffer,))
+ 'text-changed': (GObject.SignalFlags.RUN_LAST, None, (Gtk.TextBuffer,))
}
UNDO_LIMIT = 20
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/d98ba45f973a12c90829c8897a7a49a45e…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/d98ba45f973a12c90829c8897a7a49a45e…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch gajim_1.1 at gajim / gajim
Commits:
9f2a0ae7 by Daniel Brötzmann at 2018-10-25T22:23:13Z
Update feature list in appdata.xml
- - - - -
a7624b56 by Philipp Hörist at 2018-10-25T22:23:13Z
Fix error when plugin cant be loaded
Fixes #9403
- - - - -
3 changed files:
- .gitlab-ci.yml
- data/org.gajim.Gajim.appdata.xml.in
- gajim/plugins/pluginmanager.py
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -24,6 +24,11 @@ run-pylint:
- pylint --version
- scripts/dev/pylint-ci.sh --jobs=2 gajim
+run-appdata:
+ stage: test
+ script:
+ - appstream-util validate data/org.gajim.Gajim.appdata.xml.in
+
run-build:
stage: build
script:
=====================================
data/org.gajim.Gajim.appdata.xml.in
=====================================
@@ -7,32 +7,37 @@
<metadata_license>CC-BY-SA-3.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>Gajim</name>
- <summary>A GTK+ Jabber client</summary>
+ <summary>A GTK+ XMPP client</summary>
<description>
- <p>Gajim is a chat client to be used with Jabber.org, Live Journal Talk,
- Nimbuzz, Ovi, Talkonaut, and thousands of other services
- run by companies and ISPs, and volunteers around the world.
+ <p>Gajim aims to be an easy to use and fully-featured XMPP client.
+ With Gajim you can chat through various XMPP services of your choice
+ (e.g. Jabber.org) as well as transports (e.g. Facebook, IRC).
</p>
- <p>If you have a few accounts on different servers, if you want to be in
- contact with your friends and family all the time, then Gajim is for you.
+ <p>Just chat with your friends or family, easily share pictures and
+ thoughts or discuss the news with your groups.
+ </p>
+ <p>Gajim integrates well with your other devices: just chat and see what's
+ been said on your mobile device.
</p>
<p>Features:</p>
<ul>
- <li>Tabbed chat window and single window modes</li>
- <li>Group chat support (with Multi-User Chat protocol), invitation, chat to group chat transformation</li>
- <li>Emojis, avatars, PEP (user activity, mood and tune)</li>
- <li>Audio / video conferences</li>
- <li>File transfer, room bookmarks</li>
- <li>Metacontacts support</li>
- <li>Trayicon, speller, extended chat history functionalities</li>
- <li>TLS, GPG and End-To-End encryption support</li>
- <li>Transport registration support</li>
- <li>Service discovery including nodes, user search</li>
- <li>Wikipedia, dictionary and search engine lookup</li>
- <li>Multiple accounts support</li>
- <li>XML console interface</li>
- <li>Link local (bonjour / zeroconf), BOSH</li>
- <li>Other features via plugins </li>
+ <li>Never miss a message, keep all your chat clients synchronized</li>
+ <li>Invite friends to group chats or join one</li>
+ <li>Easily send pictures, videos or other files to friends and groups</li>
+ <li>Chat securely with End-to-End encryption via OMEMO or PGP</li>
+ <li>Use your favorite emoticons, set your own profile picture</li>
+ <li>Keep and manage all your chat history</li>
+ <li>Organize your chats with tabs</li>
+ <li>Automatic spell-checking for your messages</li>
+ <li>Connect to other Messengers via Transports (Facebook, IRC, ...)</li>
+ <li>Lookup things on Wikipedia, dictionaries or other search engines directly from the chat window</li>
+ <li>Set your activity, tune, and mood to show your friends how you are feeling</li>
+ <li>Support for multiple accounts</li>
+ <li>Group multiple contacts from one friend to a single Meta-Contact</li>
+ <li>XML console to see what's happening on the protocol layer</li>
+ <li>Serverless messaging (Bonjour/Zeroconf), BOSH</li>
+ <li>Support for service discovery including nodes and search for users</li>
+ <li>Even more features via plugins</li>
</ul>
</description>
<categories>
@@ -43,7 +48,7 @@
</categories>
<screenshots>
<screenshot type="default">
- <image>https://gajim.org/imgs/gajim_roster.png</image>
+ <image>https://gajim.org/imgs/gajim_single_window_mode.png</image>
<caption>Roster, list of contacts</caption>
</screenshot>
<screenshot>
@@ -69,7 +74,7 @@
<url type="homepage">https://gajim.org/</url>
<url type="bugtracker">https://dev.gajim.org/gajim/gajim</url>
<url type="faq">https://dev.gajim.org/gajim/gajim/wikis/help/gajimfaq</url>
- <url type="help">https://dev.gajim.org/gajim/gajim/wikis/help/home</url>
+ <url type="help">https://dev.gajim.org/gajim/gajim/wikis/help/Help</url>
<url type="donation">https://gajim.org/dev.php#donate</url>
<url type="translate">https://dev.gajim.org/gajim/gajim/wikis/development/DevTranslate</url>
<translation type="gettext">gajim</translation>
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -163,6 +163,8 @@ class PluginManager(metaclass=Singleton):
if activate:
pc = self.scan_dir_for_plugins(dst_dir, scan_dirs=True,
package=True)
+ if not pc:
+ continue
self.add_plugin(pc[0])
plugin = self.plugins[-1]
self.activate_plugin(plugin)
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/4a812dce670022cdda0fdcaa9796d5a90…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/4a812dce670022cdda0fdcaa9796d5a90…
You're receiving this email because of your account on dev.gajim.org.