From f5c827290ebf4dcb5f11f7d3753d5af764a54588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20P=2E=20M=C3=B6ller?= Date: Sat, 18 Apr 2020 22:17:58 -0400 Subject: [PATCH] initial commit --- __pycache__/lubuntuBreeze.cpython-38.pyc | Bin 0 -> 3745 bytes breeze-color | 36 ++++++++ data/breeze-color.desktop | 11 +++ data/designer/main.ui | 54 +++++++++++ debian/changelog | 5 + debian/control | 22 +++++ debian/copyright | 16 ++++ debian/help2man.include | 5 + debian/lubuntu-breeze-color.install | 2 + debian/lubuntu-breeze-config.manpages | 1 + debian/manpages/breeze-color.1 | 15 +++ debian/rules | 7 ++ debian/source/format | 1 + debian/tests/control | 3 + debian/tests/run-tests | 4 + lubuntu-breeze-color/__init__.py | 0 lubuntuBreeze.py | 113 +++++++++++++++++++++++ po/es.po | 37 ++++++++ po/lubuntu-breeze-color.pot | 37 ++++++++ setup.cfg | 2 + setup.py | 32 +++++++ tests/__init__.py | 0 tests/test_gui.py | 82 ++++++++++++++++ 23 files changed, 485 insertions(+) create mode 100644 __pycache__/lubuntuBreeze.cpython-38.pyc create mode 100755 breeze-color create mode 100644 data/breeze-color.desktop create mode 100644 data/designer/main.ui create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/help2man.include create mode 100644 debian/lubuntu-breeze-color.install create mode 100644 debian/lubuntu-breeze-config.manpages create mode 100644 debian/manpages/breeze-color.1 create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/tests/control create mode 100644 debian/tests/run-tests create mode 100644 lubuntu-breeze-color/__init__.py create mode 100755 lubuntuBreeze.py create mode 100644 po/es.po create mode 100644 po/lubuntu-breeze-color.pot create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 tests/__init__.py create mode 100755 tests/test_gui.py diff --git a/__pycache__/lubuntuBreeze.cpython-38.pyc b/__pycache__/lubuntuBreeze.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2330053eefb9bf4f176f14dccfe366f20fa73158 GIT binary patch literal 3745 zcmZWsTW=gm74F+~_gw6Z9mh^~xwL|S3`#r%5dt9_g*dxWAdF(1Xr-25)YDbtX}d3z zs+uHjO&*ZDuu<7KS6o$6C{>Ri5a{CaJzW#D)J zpMU&AZ^JPDMT^y+gT-Ss`Db*@U}kEB^=O8sUR$As(Ms*i2_2L6?6i@&p{wUk>SccD zXU(vgwZfLBHPUw02|L+ZxR$Ml>zd}KSF&!{)pIZ1$Tq@F(|BeupEbWSSd;swc6b%* z7HebO=1r`(Sck2BWrWw5d0_O`{|yO^LC>t5myw!a^y6ZBGEP$7vny}^%Y+?rRdx1% zHJzqO9I2$ptM2~OBub0JCo`pr{7La1pE{t4%6;>ck7kEebN_%VmE?yKC)%?l#^B)~ z#ow!#Ze0CYSUg6PKSjq4(h#&`G7D1L%w`Tohc%dsvB5m%V{}=QwJ>_DjaPK4)^DRE z|1!y0@h&!T%=wSzWQ{#E`2d|V7UtYIGfhKT3!Bm0!rW2LqHzX`d}^G6HguVd-kTc> z|I8r$;udF6USpAp`i#ruFz2G5;nLk%Qf}_XMLtdr`^StQro|{qWqG4NlcFytk>LHf zNDFaC#uJ`#+3z(4iB$Q+VUj0mI27bfp_>*Fdz}bUN99b4jFT<$@fWZ~)vTGdj*02@ zb26Fa>G*3yTm{E}Ui68jKgo(Tg=mbw?WeQRELXE9g7cE^)eBdA=#pr>Z7c4nQLAI!PQ z?E40d*mF+Ji+SS|J3Ge3+CAS}`QBU7j3awtGJkIFz}*VomwC0wC18ccNXiceWqXV=C7J| z1V*JaZ=to;3avpKF;pEQMUt`|qpA-1y4#}XAPE`Y zN0UE5XINd+$6v?nqG7bQ5WwAK+cdW@@0#VtN+{Qmaw(7rqArm0B^GdM;|u|-%!PGk zEbQgzU=HLwL%=O52)Z+K;o)0*ZZ7<}y$p#aRtP^@>D*(Lt@^<-c>R3PYlmxN5oP=t z2adrmf}jKdU;A9xkue}EAI!257oi)^ge*j5PYVgv>#YmMfEZg@@s{stg@z8zLl3U| zf{#_tsrBpC*JYtw^M~zPoR>uczaUUu(J-C)5KXS5Gc3~Y`hOj36I#8b$@+*(nzX@i zp~(~rzyu)i%n-jLSX9U~N60!mXgU)u*UABmSp<*^mqDY@FTjkxnOn?0w#AFNbzm^( zz{t0ib$$wK)aMYLxqu(9yskYlfX2uV25-8!G%ZHa9sT9b;yP>4EdOLh-Wyupzbov~_e+D_ zr4sA{`;aR>Ru2T@AB&8D@I5Ug4;vBcvlDGVZOn45f05zAEvOC}^ga=k(?hogBSCpO zY)~3G(N+~Vh|pd-3L%fU4oYojLd=iG7Ua~mV_1c(T)`>CDrbr!vhn~|IU>38qLI`T zlse=)!(r8!3Pe}clC#lN6frVF)p%JA20V(Jbl)v>l}{(p z@!#~X?_&2Anj~*D;7m6MeX|xpq?hxeCg6>_BMSHzQ3)UxoSM-x4b`Q&_ysnAKg1o{2!*i0-}89b zGsQ1KTDe)jfc_82&?KQUu-p1~T12JvI+euA#@$am9ZRF~wgoXk{`YR?a^ygb=g z_jdPH{ST7V6@9Hy9aWw4{k=jgOAf+K9ZF$CZ|bUFw28Vy9T`EtKufbC^M$r5|6%Qx YkBB4*v +# +# This program 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, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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. +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import sys +from argparse import ArgumentParser + +import lubuntuBreeze + +if __name__ == "__main__": + parser = ArgumentParser() + parser.add_argument('--version', + action='version', + version='%(prog)s 0.1') + options = parser.parse_args() + + # TODO translations replace gettext with _ ??? + # localesApp="lubuntu-breeze" + # localesDir="/usr/share/locale" + # gettext.bindtextdomain(localesApp, localesDir) + # gettext.textdomain(localesApp) + lubuntuBreeze.main(sys.argv) diff --git a/data/breeze-color.desktop b/data/breeze-color.desktop new file mode 100644 index 0000000..0d140d9 --- /dev/null +++ b/data/breeze-color.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Exec=breeze-config +Name=Lubuntu Breeze Config +GenericName=Lubuntu Breeze Config +Comment=Configure Breeze Theme +Icon=preferences-desktop-color +Type=Application +Version=0.1 +Categories=System;Settings;DesktopSettings;Qt;LXQt; +Keywords=breeze;config +Terminal=false diff --git a/data/designer/main.ui b/data/designer/main.ui new file mode 100644 index 0000000..e32b8a8 --- /dev/null +++ b/data/designer/main.ui @@ -0,0 +1,54 @@ + + + Main + + + + 0 + 0 + 479 + 168 + + + + Lubuntu Breeze Config + + + + .. + + + + + + + + + Select Color Scheme + + + + + + + + + + <font size="-1">Applications need to be restarted for changes to take effect.<br> +In case of pcmanfm-qt, since it handles the desktop, a restart of the desktop is needed<br/> +Easier, restart session.<br/>Best results if a matching GTK Theme is selected.</font> + + + + + + + QDialogButtonBox::Apply|QDialogButtonBox::Close + + + + + + + + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..232909e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +lubuntu-breeze-color (0.1) UNRELEASED; urgency=medium + + * Initial release. (Closes: #XXXXXX) + + -- Hans P. Möller Thu, 05 Mar 2020 17:18:27 -0300 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..cdb45bd --- /dev/null +++ b/debian/control @@ -0,0 +1,22 @@ +Source: lubuntu-breeze-color +Section: utils +Priority: optional +Maintainer: Hans P Möller +Build-Depends: debhelper-compat (= 12), + dh-python, + python3-all, + python3-setuptools, +Standards-Version: 4.5.0 +Rules-Requires-Root: no + +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 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/copyright b/debian/copyright new file mode 100644 index 0000000..1d08024 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,16 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://phab.lubuntu.me/################################## + +Files: * +Copyright: © 2020 Lubuntu Team. + © 2020 Hans P Möller +License: GPL-3+ + +License: GPL-3+ + This program 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, either version 3 of the License, or + (at your option) any later version. + . + On Debian systems, the full text of the GNU General Public License version + 3 can be found in the file `/usr/share/common-licenses/GPL-3'. diff --git a/debian/help2man.include b/debian/help2man.include new file mode 100644 index 0000000..0290f64 --- /dev/null +++ b/debian/help2man.include @@ -0,0 +1,5 @@ +[authors] + lubuntu-breeze-color was primarily written by Hans P Moller. + +[name] + breeze-color \- is a Color Scheme Selector for Breeze Theme. 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.manpages b/debian/lubuntu-breeze-config.manpages new file mode 100644 index 0000000..74c2bd8 --- /dev/null +++ b/debian/lubuntu-breeze-config.manpages @@ -0,0 +1 @@ +debian/manpages/breeze-config.1 diff --git a/debian/manpages/breeze-color.1 b/debian/manpages/breeze-color.1 new file mode 100644 index 0000000..a5755d3 --- /dev/null +++ b/debian/manpages/breeze-color.1 @@ -0,0 +1,15 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.12. +.TH BREEZE-CONFIG "1" "March 2020" "breeze-config 0.1" "User Commands" +.SH NAME + breeze-config \- is a Color Scheme Selector for Breeze Theme. +.SH DESCRIPTION +usage: breeze\-config [\-h] [\-\-version] +.SS "optional arguments:" +.TP +\fB\-h\fR, \fB\-\-help\fR +show this help message and exit +.TP +\fB\-\-version\fR +show program's version number and exit +.SH AUTHORS + lubuntu-breeze-config was primarily written by Hans P Moller. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..3c213a2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,7 @@ +#! /usr/bin/make -f +export DH_VERBOSE=1 +export PYBUILD_INTERPRETERS=python3 +export PYBUILD_NAME=lubuntu-breeze-color + +%: + dh $@ --with python3 --buildsystem=pybuild diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..184337b --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Tests: run-tests +Depends: xvfb, + @ diff --git a/debian/tests/run-tests b/debian/tests/run-tests new file mode 100644 index 0000000..9ba9a5c --- /dev/null +++ b/debian/tests/run-tests @@ -0,0 +1,4 @@ +#!/bin/sh + +xvfb-run +python3 setup.py test diff --git a/lubuntu-breeze-color/__init__.py b/lubuntu-breeze-color/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lubuntuBreeze.py b/lubuntuBreeze.py new file mode 100755 index 0000000..c03a38a --- /dev/null +++ b/lubuntuBreeze.py @@ -0,0 +1,113 @@ +#!/usr/bin/python3 +# coding=utf-8 + +# Copyright (C) 2020 Hans P. Möller +# +# This program 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, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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. +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +import os +import subprocess +import sys +from pathlib import Path +from shutil import copyfile +from PyQt5.QtWidgets import (QWidget, QApplication, QDialogButtonBox) +from PyQt5.QtCore import (QDir, qDebug, QSettings) +from PyQt5 import uic +from gettext import gettext as _ # better than in main "_ = gettext.gettext" for testing + +class MainWindow(QWidget): + def __init__(self): + QWidget.__init__(self) + uic.loadUi("data/designer/main.ui", self) + self.confFile = Path(Path.home() / ".config/kdeglobals") + self.schemeDir = "/usr/share/color-schemes/" + self.initUI() + + def initUI(self): + '''populate text and combobox needed with uic''' + self.label.setText(_("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.note.setText('' + noteText + '') + dir = QDir(self.schemeDir) + self.files = dir.entryList(dir, dir.Files) + self.comboBox.clear() + self.comboBox.addItem(_("None")) + for f in self.files: + settings = QSettings(self.schemeDir + f, QSettings.NativeFormat) + self.comboBox.addItem(settings.value("ColorScheme")) + self.comboBox.setCurrentText(self.checkCurrent()) + self.buttonBox.clicked.connect(self.btnClk) + self.center() + + def center(self): + '''centers UI''' + frameGm = self.frameGeometry() + screen = QApplication.desktop().screenNumber( + QApplication.desktop().cursor().pos()) + centerPoint = QApplication.desktop().screenGeometry(screen).center() + frameGm.moveCenter(centerPoint) + self.move(frameGm.topLeft()) + + def checkCurrent(self): + '''check current used theme''' + if self.confFile.is_file(): + qDebug("exist: " + str(self.confFile)) + settings = QSettings(str(self.confFile), QSettings.NativeFormat) + set = settings.value("ColorScheme") + qDebug(set) + if set != "": + return(set) + else: + return("None") + else: + qDebug(str(self.confFile) + " wasn't found") + return("None") + + def btnClk(self, btn): + '''copy selected color-scheme to kdeglobals or close''' + if btn == self.buttonBox.button(QDialogButtonBox.Apply): + qDebug("apply") + if self.comboBox.currentText() != "None": + for f in self.files: + set = QSettings(self.schemeDir + f, QSettings.NativeFormat) + if(set.value("ColorScheme") == self.comboBox.currentText()): + copyfile(self.schemeDir + f, self.confFile) + else: + os.remove(self.confFile) + filename = os.path.dirname(os.path.abspath(__file__)) + '/breeze-color' + print(filename) + subprocess.Popen(filename) + sys.exit(0) + + elif btn == self.buttonBox.button(QDialogButtonBox.Close): + exit(0) + +class App(QApplication): + def __init__(self, *args): + QApplication.__init__(self, *args) + self.main = MainWindow() + self.main.show() + +def main(args): + global app + app = App(args) + # app.setWindowIcon(QIcon.fromTheme("preferences-desktop-color")) + app.exec_() diff --git a/po/es.po b/po/es.po new file mode 100644 index 0000000..42ccdf2 --- /dev/null +++ b/po/es.po @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2020-03-02 20:52-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" + + +#: lubuntuBreeze.py:39 +msgid "Select Color Scheme for Breeze Qt Style:" +msgstr "Selecciona el Esquema de Color de Breeze para el estilo Qt" + +#: lubuntuBreeze.py:40 +msgid "Applications need to be restarted for changes to take effect." +msgstr "Las aplicaciones se deben reiniciar para que los cambios tengan efecto." + +#: lubuntuBreeze.py:42 +msgid "In case of pcmanfm-qt, since it handles the desktop, a restart of the desktop is needed" +msgstr "En caso de pcmanfm-qt, dado que maneja el escritorio, un reinicio del escritorio es necesario" + +#: lubuntuBreeze.py:44 +msgid "Easier, restart session." +msgstr "Más fácil es reiniciar la sesión" + +#: lubuntuBreeze.py:46 +msgid "Best results if a matching GTK Theme is selected." +msgstr "Mejores resultados si se ocupa un tema GTK que se asemeje." + diff --git a/po/lubuntu-breeze-color.pot b/po/lubuntu-breeze-color.pot new file mode 100644 index 0000000..faf17c5 --- /dev/null +++ b/po/lubuntu-breeze-color.pot @@ -0,0 +1,37 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2020-03-02 20:52-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" + + +#: lubuntuBreeze.py:39 +msgid "Select Color Scheme for Breeze Qt Style:" +msgstr "" + +#: lubuntuBreeze.py:40 +msgid "Applications need to be restarted for changes to take effect." +msgstr "" + +#: lubuntuBreeze.py:42 +msgid "In case of pcmanfm-qt, since it handles the desktop, a restart of the desktop is needed" +msgstr "" + +#: lubuntuBreeze.py:44 +msgid "Easier, restart session." +msgstr "" + +#: lubuntuBreeze.py:46 +msgid "Best results if a matching GTK Theme is selected." +msgstr "" + diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..ee3c6e9 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[sdist] +formats = bztar diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..3ff4bff --- /dev/null +++ b/setup.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 +# coding=utf-8 + +# Copyright (C) 2019 Hans P. Möller +# +# This program 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, either version 3 of the License, or +# (at your option) any later version. +# +# This program 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 this program. If not, see . + +from setuptools import setup + +setup( + name="lubuntu-breeze-color", + version="0.1", + packages=['lubuntu-breeze-color'], + scripts=['breeze-color'], + data_files=[ + ('lib/lubuntu-breeze-color/', + ['lubuntuBreeze.py', ] + ), + ], + test_suite="tests", +) diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_gui.py b/tests/test_gui.py new file mode 100755 index 0000000..a28ca93 --- /dev/null +++ b/tests/test_gui.py @@ -0,0 +1,82 @@ +#!/usr/bin/python3 +# coding=utf-8 + +import unittest +import sys +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, "") +import lubuntuBreeze + + +app = QApplication(sys.argv) + +class LubuntuBreezeTest(unittest.TestCase): + + def setUp(self): + 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)''' + len(self.files) + self.assertEqual(self.form.comboBox.count(), len(self.files) + 1) + + def testComoboxSelected(self): + '''test if comobox select the actual''' + if self.confFile.is_file(): + settings = QSettings(str(self.confFile), QSettings.NativeFormat) + set = settings.value("ColorScheme") + self.assertEqual(self.form.comboBox.currentText(), set) + else: + self.assertEqual(self.form.comboBox.currentText(), _("None")) + + + """def testSelectApply(self): + '''check if ''' + if self.form.comboBox.currentText() == "None": + # select something else + for f in self.files: + set = QSettings(self.form.schemeDir + f, QSettings.NativeFormat) + if(set.value("ColorScheme") == self.form.comboBox.currentText()): + settings = QSettings(str(self.confFile), QSettings.NativeFormat) + set = settings.value("ColorScheme") + self.assertEqual(self.form.comboBox.currentText(),set) + # copyfile(self.schemeDir + f, self.confFile) + else: + # select NONE and see if file is removed + + + + def testClose(self): + '''test apply''' + """ + +if __name__ == "__main__": + unittest.main()