Commit 1645d774 authored by librebob's avatar librebob

Remove Notify2 and python-dbus, Use QtDbus

parent da5241d5
......@@ -7,7 +7,7 @@ pkgdesc="A libre replacement for Steam"
arch=(any)
url="https://gitlab.com/librebob/athenaeum"
license=('GPL-3.0-or-later')
depends=('flatpak' 'python' 'pyqt5-common' 'python-pyqt5' 'python-sip-pyqt5' 'python-peewee' 'python-xdg' 'python-dateutil' 'python-dbus' 'qt5-base' 'qt5-svg' 'qt5-quickcontrols2' 'qt5-declarative' 'sqlite')
depends=('flatpak' 'python' 'pyqt5-common' 'python-pyqt5' 'python-sip-pyqt5' 'python-peewee' 'python-xdg' 'python-dateutil' 'qt5-base' 'qt5-svg' 'qt5-quickcontrols2' 'qt5-declarative' 'sqlite')
makedepends=('git')
source=("git+https://gitlab.com/librebob/athenaeum.git")
......
import signal, os, sys
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import QTranslator, QLocale, Qt
from PyQt5.QtCore import QTranslator, QLocale, Qt, QVariant, QMetaType
from PyQt5.QtQml import QQmlApplicationEngine, qmlRegisterType
from PyQt5.QtWidgets import QApplication
......@@ -12,7 +12,7 @@ else:
BASEDIR, BASEFILE = os.path.split(os.path.abspath(__file__))
sys.path.insert(0, BASEDIR)
import notify2
from notify import Notify
from game import Game
from settings import Settings
from library import Library
......@@ -81,9 +81,10 @@ def main():
root.search.connect(library.searchGames)
root.filter.connect(library.filterGames)
notify = None
try:
notify2.init("Athenaeum")
root.notify.connect(show_notifitcation)
notify = Notify("Athenaeum")
root.notify.connect(notify.show_notifitcation)
except Error as e:
print('Error initializing notifications.');
......@@ -100,10 +101,6 @@ def main():
os._exit(app.exec())
def show_notifitcation(summary='', message='', icon_path=''):
n = notify2.Notification(summary, message, icon_path)
n.set_urgency(notify2.URGENCY_NORMAL)
n.show()
if __name__ == '__main__':
main()
notify2 is under the BSD 2-Clause License.
Some of the examples (icon.py, default-action.py, multi-actions.py and qt-app.py)
are derived from pynotify examples, and are therefore `LGPL-2.1 <http://opensource.org/licenses/lgpl-2.1.php>`_,
© 2006 Christian Hammond <chipx86@chipx86.com>.
Contributors
------------
* Thomas Kluyver
* John Terry
License text
------------
Copyright (c) 2012, Thomas Kluyver & contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from notify2.notify2 import *
This diff is collapsed.
......@@ -7,7 +7,7 @@ setup(
license='GPL-3.0-or-later',
url='https://gitlab.com/librebob/athenaeum',
include_package_data=True,
packages=['athenaeum', 'athenaeum.appstream', 'athenaeum.notify2'],
packages=['athenaeum', 'athenaeum.appstream'],
entry_points={
'gui_scripts': [
'athenaeum = athenaeum.athenaeum:main',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment