Philipp Hörist pushed to branch master at gajim / gajim
Commits:
8a62517d by Philipp Hörist at 2018-01-17T18:21:26+01:00
Raise build timeout
- - - - -
1 changed file:
- appveyor.yml
Changes:
=====================================
appveyor.yml
=====================================
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -26,7 +26,7 @@ install:
- cmd: '%MSYS% C:/msys64/home/appveyor/gajim/win/build.sh'
# Ugly workaround, because i found no way to tell when mingw32.exe returns
- - cmd: timeout 900
+ - cmd: timeout 1100
# Push Installer Exe
- ps: $env:TIME_STRING=(get-date -UFormat "%Y-%m-%d").ToString()
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/8a62517d9a35eafc5e5494e4e2c46665a8…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/8a62517d9a35eafc5e5494e4e2c46665a8…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
7943120b by André Apitzsch at 2018-01-13T22:50:38+01:00
Use setuptools' automatic script creation
- - - - -
a01bbb51 by Yann Leboulanger at 2018-01-15T10:02:52+01:00
Merge branch 'script' into 'master'
Use setuptools' automatic script creation
See merge request gajim/gajim!188
- - - - -
8 changed files:
- gajim/gajim.py
- gajim/gajim_remote.py
- gajim/history_manager.py
- launch.py
- − scripts/gajim
- − scripts/gajim-history-manager
- − scripts/gajim-remote
- setup.py
Changes:
=====================================
gajim/gajim.py
=====================================
--- a/gajim/gajim.py
+++ b/gajim/gajim.py
@@ -437,6 +437,14 @@ class GajimApplication(Gtk.Application):
self.lookup_action(account + action_name).set_enabled(True)
-if __name__ == '__main__':
+def main():
+ if sys.platform != 'win32':
+ if os.geteuid() == 0:
+ sys.exit("You must not launch gajim as root, it is insecure.")
+
appli = GajimApplication()
appli.run(sys.argv)
+
+
+if __name__ == '__main__':
+ main()
=====================================
gajim/gajim_remote.py
=====================================
--- a/gajim/gajim_remote.py
+++ b/gajim/gajim_remote.py
@@ -27,6 +27,7 @@
# gajim-remote help will show you the D-BUS API of Gajim
+import os
import sys
import locale
import urllib
@@ -500,5 +501,13 @@ class GajimRemote:
raise exceptions.ServiceNotAvailable
return None
-if __name__ == '__main__':
+
+def main():
+ if os.geteuid() == 0:
+ sys.exit("You must not launch gajim as root, it is insecure.")
+
GajimRemote()
+
+
+if __name__ == '__main__':
+ main()
=====================================
gajim/history_manager.py
=====================================
--- a/gajim/history_manager.py
+++ b/gajim/history_manager.py
@@ -30,7 +30,6 @@
import os
import sys
-import signal
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
@@ -668,7 +667,15 @@ class HistoryManager:
path = self.logs_liststore.get_path(iter_)
self.logs_listview.scroll_to_cell(path)
-if __name__ == '__main__':
- signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application
+
+def main():
+ if sys.platform != 'win32':
+ if os.geteuid() == 0:
+ sys.exit("You must not launch gajim as root, it is insecure.")
+
HistoryManager()
Gtk.main()
+
+
+if __name__ == '__main__':
+ main()
=====================================
launch.py
=====================================
--- a/launch.py
+++ b/launch.py
@@ -1,12 +1,4 @@
#!/usr/bin/env python3
-import os
-import sys
-
-if sys.platform != 'win32':
- if os.geteuid() == 0:
- sys.exit("You must not launch gajim as root, it is insecure.")
-
-import gajim.gajim as g
-
-g.GajimApplication().run(sys.argv)
+from gajim import gajim
+gajim.main()
=====================================
scripts/gajim deleted
=====================================
--- a/scripts/gajim
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python3
-##
-## Copyright (C) 2005 Yann Le Boulanger <asterix AT lagaule.org>
-## Copyright (C) 2006 Dimitur Kirov <dkirov AT gmail.com>
-## Stefan Bethge <stefan AT lanpartei.de>
-## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
-##
-## 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 os
-import sys
-
-if sys.platform != 'win32':
- if os.geteuid() == 0:
- sys.exit("You must not launch gajim as root, it is insecure.")
-
-import gajim.gajim as g
-
-g.GajimApplication().run(sys.argv)
=====================================
scripts/gajim-history-manager deleted
=====================================
--- a/scripts/gajim-history-manager
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python3
-##
-## Copyright (C) 2005 Yann Le Boulanger <asterix AT lagaule.org>
-## Copyright (C) 2006 Dimitur Kirov <dkirov AT gmail.com>
-## Stefan Bethge <stefan AT lanpartei.de>
-## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
-##
-## 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 os
-import sys
-
-if sys.platform != 'win32':
- if os.geteuid() == 0:
- sys.exit("You must not launch gajim as root, it is insecure.")
-
-import gi
-gi.require_version('Gtk', '3.0')
-from gi.repository import Gtk
-import gajim.history_manager as g
-
-g.HistoryManager()
-Gtk.main()
=====================================
scripts/gajim-remote deleted
=====================================
--- a/scripts/gajim-remote
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python3
-##
-## Copyright (C) 2005 Yann Le Boulanger <asterix AT lagaule.org>
-## Copyright (C) 2006 Dimitur Kirov <dkirov AT gmail.com>
-## Stefan Bethge <stefan AT lanpartei.de>
-## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org>
-##
-## 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 os
-import sys
-
-if os.geteuid() == 0:
- sys.exit("You must not launch gajim as root, it is insecure.")
-
-import gajim.gajim_remote as g
-
-g.GajimRemote()
=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -261,10 +261,15 @@ setup(
'test_nogui': test_nogui,
'update_po': update_po,
},
- scripts=[
- 'scripts/gajim',
- 'scripts/gajim-history-manager',
- 'scripts/gajim-remote'],
+ entry_points={
+ 'console_scripts': [
+ 'gajim-remote = gajim.gajim_remote:main',
+ ],
+ 'gui_scripts': [
+ 'gajim = gajim.gajim:main',
+ 'gajim-history-manager = gajim.history_manager:main',
+ ]
+ },
packages=find_packages(exclude=["gajim.dev", "test*"]),
package_data={'gajim': package_data},
data_files=data_files,
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/b84cd5b6cf451584f57ce9e7375d35de6…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/b84cd5b6cf451584f57ce9e7375d35de6…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / python-nbxmpp
Commits:
c228396b by Yann Leboulanger at 2018-01-11T16:32:27+01:00
add missing function (removed in cbc2bae8). Fixes #47
- - - - -
1 changed file:
- nbxmpp/protocol.py
Changes:
=====================================
nbxmpp/protocol.py
=====================================
--- a/nbxmpp/protocol.py
+++ b/nbxmpp/protocol.py
@@ -1400,6 +1400,10 @@ class Hashes(Node):
hash_ = hl.hexdigest()
return hash_
+ def addHash(self, hash_, algo):
+ self.setAttr('algo', algo)
+ self.setData(hash_)
+
class Hashes2(Node):
"""
Hash elements for various XEPs as defined in XEP-300
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/c228396b3c64360dead579df26…
---
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/c228396b3c64360dead579df26…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
aa6e9e70 by Yann Leboulanger at 2018-01-09T10:31:50+01:00
improve string and add comment for translators
- - - - -
2 changed files:
- gajim/dialogs.py
- gajim/roster_window.py
Changes:
=====================================
gajim/dialogs.py
=====================================
--- a/gajim/dialogs.py
+++ b/gajim/dialogs.py
@@ -1487,7 +1487,7 @@ class FileChooserDialog(Gtk.FileChooserDialog):
class AspellDictError:
def __init__(self, lang):
ErrorDialog(
- _('Dictionary for lang "%s" not available') % lang,
+ _('Dictionary for language "%s" not available') % lang,
_('You have to install the dictionary "%s" to use spellchecking, '
'or choose another language by setting the speller_language '
'option.\n\n'
=====================================
gajim/roster_window.py
=====================================
--- a/gajim/roster_window.py
+++ b/gajim/roster_window.py
@@ -4535,6 +4535,7 @@ class RosterWindow:
# c_dest is None if jid_dest doesn't belong to account
return
menu = Gtk.Menu()
+ #from and to are the names of contacts
item = Gtk.MenuItem.new_with_label(_('Send %(from)s to %(to)s') % {
'from': c_source.get_shown_name(), 'to': c_dest.get_shown_name()})
item.set_use_underline(False)
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/aa6e9e7084a81d4263e12c378ab1fae6ce…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/aa6e9e7084a81d4263e12c378ab1fae6ce…
You're receiving this email because of your account on dev.gajim.org.
Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
e89e7c31 by André Apitzsch at 2018-01-05T23:33:37+01:00
Port screensaver listening to GTK dbus
- - - - -
54146ba6 by Yann Leboulanger at 2018-01-08T15:27:34+01:00
Merge branch 'screensaver' into 'master'
Port screensaver listening to GTK dbus
Closes #8836
See merge request gajim/gajim!183
- - - - -
2 changed files:
- gajim/gui_interface.py
- + gajim/screensaver_listener.py
Changes:
=====================================
gajim/gui_interface.py
=====================================
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -54,10 +54,6 @@ except:
from gajim.common import app
from gajim.common import events
-from gajim.common import dbus_support
-if dbus_support.supported:
- import dbus
-
from gajim.music_track_listener import MusicTrackListener
if app.HAVE_GEOCLUE:
@@ -2828,56 +2824,9 @@ class Interface:
from gajim import logind_listener
- # Handle gnome screensaver
- if dbus_support.supported:
- def gnome_screensaver_ActiveChanged_cb(active):
- if not active:
- for account in app.connections:
- if app.account_is_connected(account) and \
- app.sleeper_state[account] == 'autoaway-forced':
- # We came back online ofter gnome-screensaver
- # autoaway
- self.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 out 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')}
- self.roster.send_status(account, 'away', auto_message,
- auto=True)
- app.sleeper_state[account] = 'autoaway-forced'
-
- try:
- bus = dbus.SessionBus()
- bus.add_signal_receiver(gnome_screensaver_ActiveChanged_cb,
- 'ActiveChanged', 'org.gnome.ScreenSaver')
- except Exception:
- pass
+ # Handle screensaver
+ if sys.platform == 'linux':
+ from gajim import screensaver_listener
self.show_vcard_when_connect = []
=====================================
gajim/screensaver_listener.py
=====================================
--- /dev/null
+++ b/gajim/screensaver_listener.py
@@ -0,0 +1,94 @@
+# -*- coding: utf-8 -*-
+## gajim/screensaver_listener.py
+##
+## 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, GLib
+
+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/07e251831e6a66f7c39131576cc3935f3…
---
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/07e251831e6a66f7c39131576cc3935f3…
You're receiving this email because of your account on dev.gajim.org.