diff --git a/debian/changelog b/debian/changelog index 2721800..232909e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -lubuntu-breeze-config (0.1dev) UNRELEASED; urgency=medium +lubuntu-breeze-color (0.1) UNRELEASED; urgency=medium * Initial release. (Closes: #XXXXXX) diff --git a/debian/control b/debian/control index 900bc0a..92acac5 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: lubuntu-breeze-config +Source: lubuntu-breeze-color Section: utils Priority: optional Maintainer: Hans P Möller @@ -9,15 +9,12 @@ Build-Depends: debhelper-compat (= 12), xvfb Standards-Version: 4.5.0 Rules-Requires-Root: no -Testsuite: autopkgtest-pkg-python -Package: lubuntu-breeze-config +Package: lubuntu-breeze-color Architecture: all Depends: python3, python3-pyqt5, ${misc:Depends}, ${python3:Depends} Description: Breeze Theme Color Scheme Selector - It lets you pick a color scheme and change the transparency of the menus. - Color schemes are obtained from "/usr/share/color-schemes/" and when selected - copy to "~/.config/kdeglobals". For transparency of menu the settings are in - "~/.config/breezerc", a composition software is needed to take effect. - Applications need restart in order to apply changes. Take into consideration - that some file managers also manage the desktop so you need to restart that too. + It lets you pick a color scheme from "/usr/share/color-schemes/" and copy it + to "~/.config/kdeglobals" so system use it. Applications need restart in order + to use it. Take into consideration that some file managers also manage the + desktop so you need to restart that too. diff --git a/debian/lubuntu-breeze-color.install b/debian/lubuntu-breeze-color.install new file mode 100644 index 0000000..9e25e95 --- /dev/null +++ b/debian/lubuntu-breeze-color.install @@ -0,0 +1,2 @@ +data/breeze-color.desktop /usr/share/applications/breeze-color.desktop +data/designer /usr/share/lubuntu-breeze-color/designer diff --git a/debian/lubuntu-breeze-config.install b/debian/lubuntu-breeze-config.install deleted file mode 100644 index 7b27f80..0000000 --- a/debian/lubuntu-breeze-config.install +++ /dev/null @@ -1,2 +0,0 @@ -# data/breeze-color.desktop /usr/share/applications/breeze-color.desktop -# data/designer /usr/share/lubuntu-breeze-color/designer diff --git a/debian/rules b/debian/rules index 56328d1..adbbc80 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,10 @@ #! /usr/bin/make -f export DH_VERBOSE=1 export PYBUILD_INTERPRETERS=python3 -export PYBUILD_NAME=lubuntu-breeze-config +export PYBUILD_NAME=lubuntu-breeze-color %: dh $@ --with python3 --buildsystem=pybuild override_dh_auto_test: - xvfb-run dh_auto_test -- --test-pytest + xvfb-run dh_auto_test diff --git a/debian/tests/run-tests b/debian/tests/run-tests index cbe6041..9ba9a5c 100644 --- a/debian/tests/run-tests +++ b/debian/tests/run-tests @@ -1,4 +1,4 @@ #!/bin/sh -# xvfb-run python3 setup.py test -xvfb-run python3 test/test_gui.py +xvfb-run +python3 setup.py test diff --git a/lubuntubreeze/breezeconfig.py b/lubuntubreeze/breezeconfig.py index 9e0e165..ef2659c 100755 --- a/lubuntubreeze/breezeconfig.py +++ b/lubuntubreeze/breezeconfig.py @@ -35,8 +35,7 @@ class MainWindow(QWidget): self.datadir = options.datadir self.bindir = options.bindir else: - self.datadir = '/usr/share/lubuntu-breeze-config' - self.bindir = '/bin' + self.datadir = '/usr/share/lubuntu-breeze-config/designer' uic.loadUi("%s/designer/main.ui" % self.datadir, self) self.confFile = Path(Path.home() / ".config/kdeglobals") self.schemeDir = "/usr/share/color-schemes/" diff --git a/setup.py b/setup.py index 3d90596..794520f 100644 --- a/setup.py +++ b/setup.py @@ -20,10 +20,11 @@ from setuptools import setup setup( name="lubuntu-breeze-config", - version="0.1.dev0", - packages=['lubuntubreeze'], + version="0.1dev", + packages=['lubuntu-breeze-config'], scripts=['breeze-config'], - data_files=[('share/applications/', ['data/breeze-config.desktop']), + data_files=[('libexec/lubuntu-breeze-config/', ['lubuntuBreeze.py']), + ('share/applications/', ['data/breeze-config.desktop']), ('share/lubuntu-breeze-config/designer/', ['data/designer/main.ui'])], test_suite="tests", diff --git a/tests/test_gui.py b/tests/test_gui.py index 3cc89b5..a28ca93 100755 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -3,36 +3,45 @@ import unittest import sys -import os from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import QDir, QSettings # from PyQt5.QtTest import QTest from pathlib import Path from gettext import gettext as _ # better than in main "_ = gettext.gettext" for testing + +# from lubuntuBreezeConfig import lubuntuBreeze # import lubuntuBreezeConfig # help(lubuntuBreezeConfig) -# sys.path.insert(0, "../") -sys.path.insert(0, "../") -from lubuntubreeze import breezeconfig -app = QApplication(sys.argv) +sys.path.insert(0, "") +import lubuntuBreeze -class ParserHelper(): - def __init__(self): - self.datadir = '../../../data' - self.bindir = '.' +app = QApplication(sys.argv) class LubuntuBreezeTest(unittest.TestCase): def setUp(self): - options = ParserHelper() - self.form = breezeconfig.MainWindow(options) + self.form = lubuntuBreeze.MainWindow() dir = QDir(self.form.schemeDir) self.files = dir.entryList(dir, dir.Files) self.confFile = Path(Path.home() / ".config/kdeglobals") + def testText(self): + '''Test GUI in default state''' + label = _("Select Color Scheme for Breeze Qt Style:") + noteText =_("Applications need to be restarted for changes to take effect.") + noteText += "
" + noteText += _("In case of pcmanfm-qt, since it handles the desktop, ") + noteText += _("a restart of the desktop is needed") + "
" + noteText += _("Easier, restart session.") + noteText += "
" + noteText += _("Best results if a matching GTK Theme is selected.") + + self.assertEqual(self.form.label.text(), label) + self.assertEqual(self.form.note.text(), '' + noteText + '') + def testComoboxPopulation(self): '''test if combobox is populated with same entries as number of files (+1 because on None)''' diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 50ebc4d..0000000 --- a/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -# content of: tox.ini , put in same dir as setup.py -[tox] -envlist = py27,py36 - -[testenv] -# install pytest in the virtualenv where commands will be executed -deps = pytest -commands = - # NOTE: you can run any command line tool here - not just tests - pytest