diff options
Diffstat (limited to 'style/config/polyesterconf.cpp')
-rwxr-xr-x | style/config/polyesterconf.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/style/config/polyesterconf.cpp b/style/config/polyesterconf.cpp index 2df304a..a114084 100755 --- a/style/config/polyesterconf.cpp +++ b/style/config/polyesterconf.cpp @@ -35,9 +35,12 @@ DEALINGS IN THE SOFTWARE. #include <tqspinbox.h> #include <tqsettings.h> #include <tqcolor.h> +#include <tqtextbrowser.h> +#include <tqfile.h> #include <tqgroupbox.h> #include <tdeglobal.h> #include <tdelocale.h> +#include <kstandarddirs.h> #include <kcolorbutton.h> #include <kdemacros.h> @@ -211,12 +214,33 @@ PolyesterStyleConfig::PolyesterStyleConfig(TQWidget* parent): TQWidget(parent) dialog_->checkMarkColor->setEnabled(true); else dialog_->checkMarkColor->setEnabled(false); + + dialog_->licenceBox->setText(readLicence()); } PolyesterStyleConfig::~PolyesterStyleConfig() { } +TQString PolyesterStyleConfig::readLicence() { + // code borrowed from TDE license dialog + // (C) 2023 TDE Developers + TQString licensePath = locate("data", TQString("LICENSES/GPL_V2")); + if (licensePath.isEmpty()) + { + return i18n("License file not found!"); + } + + TQFile licenseFile(licensePath); + if (licenseFile.open(IO_ReadOnly)) + { + TQTextStream txtstr(&licenseFile); + return txtstr.read(); + } + + return i18n("Unable to open license file!"); +} + void PolyesterStyleConfig::save() { |