set new minimal versions for liblxqt and libqtxdg fix some wording in debian/copyrightubuntu/cosmic debian/0.9.0+20151031-1
parent
54fa89661a
commit
79276dfcd4
@ -0,0 +1,33 @@
|
||||
/* This file is part of the LXQt project. <http://lxqt.org>
|
||||
* Copyright (C) 2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "autostartutils.h"
|
||||
#include <XdgDesktopFile>
|
||||
|
||||
#include <QString>
|
||||
|
||||
bool AutostartUtils::showOnlyInLXQt(const XdgDesktopFile &file)
|
||||
{
|
||||
return file.value(QLatin1String("OnlyShowIn")) == QLatin1String("LXQt;");
|
||||
}
|
||||
|
||||
bool AutostartUtils::isLXQtModule(const XdgDesktopFile& file)
|
||||
{
|
||||
return file.value(QLatin1String("X-LXQt-Module"), false).toBool();
|
||||
}
|
||||
|
@ -0,0 +1,31 @@
|
||||
/* This file is part of the LXQt project. <http://lxqt.org>
|
||||
* Copyright (C) 2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AUTOSTARTUTILS_H
|
||||
#define AUTOSTARTUTILS_H
|
||||
|
||||
class XdgDesktopFile;
|
||||
|
||||
class AutostartUtils
|
||||
{
|
||||
public:
|
||||
static bool showOnlyInLXQt(const XdgDesktopFile& file);
|
||||
static bool isLXQtModule(const XdgDesktopFile& file);
|
||||
};
|
||||
|
||||
#endif // AUTOSTARTUTILS_H
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[cs]=Nastavit modul sezení LXQt-Qt
|
||||
GenericName[cs]=Nastavení sezení LXQt-Qt
|
||||
Name[cs]=Nastavení sezení LXQt-Qt
|
||||
Comment[cs]=Nastavit modul sezení LXQt
|
||||
GenericName[cs]=Nastavení sezení LXQt
|
||||
Name[cs]=Nastavení sezení LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[da]=Indstil LXQt-Qt Sessionsmodul
|
||||
Comment[da]=Indstil LXQt Sessionsmodul
|
||||
GenericName[da]=Indstilling af LXQt-sessioner
|
||||
Name[da]=Indstilling af LXQt-sessioner
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[da_DK]=Indstilling af LXQt-Qt sessionsmodul
|
||||
Comment[da_DK]=Indstilling af LXQt sessionsmodul
|
||||
GenericName[da_DK]=Indstilling af LXQt Session
|
||||
Name[da_DK]=Indstilling af LXQt Session
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[eo]=Agordi modulon de seanco de LXQt-Qt
|
||||
Comment[eo]=Agordi modulon de seanco de LXQt
|
||||
GenericName[eo]=Agordilo de seanco de LXQt
|
||||
Name[eo]=Agordilo de seanco de LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[es]=Configura el módulo de sesiones de LXQt-Qt
|
||||
Comment[es]=Configura el módulo de sesiones de LXQt
|
||||
GenericName[es]=Configuración de sesiones LXQt
|
||||
Name[es]=Configuración de sesiones LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[es_VE]=Configuracion de modulo de LXQt-Qt
|
||||
Comment[es_VE]=Configuracion de modulo de LXQt
|
||||
GenericName[es_VE]=Configuracion de sesion de LXQt
|
||||
Name[es_VE]=Configuracion de sesion de LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[eu]=Konfiguratu LXQt-Qt saioaren modulua
|
||||
Comment[eu]=Konfiguratu LXQt saioaren modulua
|
||||
GenericName[eu]=LXQt saioaren konfiguratzailea
|
||||
Name[eu]=LXQt saioaren konfiguratzailea
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[fi]=Hallinnoi LXQt-Qt:n istuntomoduulia
|
||||
Comment[fi]=Hallinnoi LXQt:n istuntomoduulia
|
||||
GenericName[fi]=LXQtin istunnonhallinta
|
||||
Name[fi]=LXQtin istunnonhallinta
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[fr_FR]=Configurer le module 'session' de LXQt-Qt
|
||||
Comment[fr_FR]=Configurer le module 'session' de LXQt
|
||||
GenericName[fr_FR]=Paramétreur de session LXQt
|
||||
Name[fr_FR]=Paramétreur de session LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[hu]=A LXQt-Qt munkamenetmodul beállítása
|
||||
Comment[hu]=A LXQt munkamenetmodul beállítása
|
||||
GenericName[hu]=LXQt munkamenetbeállíó
|
||||
Name[hu]=LXQt munkamenetbeállíó
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[id_ID]=Konfigurasi modul sesi LXQt-Qt
|
||||
Comment[id_ID]=Konfigurasi modul sesi LXQt
|
||||
GenericName[id_ID]=Konfigurator Sesi LXQt
|
||||
Name[id_ID]=Konfigurator Sesi LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[ja]=LXQt-Qtセッションもジュールを設定
|
||||
Comment[ja]=LXQtセッションもジュールを設定
|
||||
GenericName[ja]=LXQtセッションの設定
|
||||
Name[ja]=LXQtセッションの設定
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[lt]=Konfigūruoti LXQt-Qt sesijų modulį
|
||||
Comment[lt]=Konfigūruoti LXQt sesijų modulį
|
||||
GenericName[lt]=LXQt sesijų konfigūravimas
|
||||
Name[lt]=LXQt sesijų konfigūravimas
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[nl]=Configureer LXQt-Qt sessie module
|
||||
Comment[nl]=Configureer LXQt sessie module
|
||||
GenericName[nl]=LXQt sessie Configurator
|
||||
Name[nl]=LXQt sessie Configurator
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[pl]=Ustawienia sesji LXQt-Qt
|
||||
Comment[pl]=Ustawienia sesji LXQt
|
||||
GenericName[pl]=Ustawienia sesji LXQt
|
||||
Name[pl]=Ustawienia sesji LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[pt_BR]=Módulo de configurador de sessão do LXQt-Qt
|
||||
Comment[pt_BR]=Módulo de configurador de sessão do LXQt
|
||||
GenericName[pt_BR]=Configurador de sessão do LXQt
|
||||
Name[pt_BR]=Configurador de sessão do LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[ro_RO]=Configurează modulul sesiune LXQt-Qt
|
||||
Comment[ro_RO]=Configurează modulul sesiune LXQt
|
||||
GenericName[ro_RO]=Configurare sesiune LXQt
|
||||
Name[ro_RO]=Configurare sesiune LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[sk]=Nastavenie relácie prostredia LXQt-Qt
|
||||
Comment[sk]=Nastavenie relácie prostredia LXQt
|
||||
GenericName[sk]=Nastavenie relácie prostredia LXQt
|
||||
Name[sk]=Nastavenie relácie
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[th_TH]=ตั้งค่ามอดูลวาระงาน LXQt-Qt
|
||||
Comment[th_TH]=ตั้งค่ามอดูลวาระงาน LXQt
|
||||
GenericName[th_TH]=ตัวตั้งค่าวาระงาน LXQt
|
||||
Name[th_TH]=ตัวตั้งค่าวาระงาน LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[uk]=Налаштувати модуль сеансу LXQt-Qt
|
||||
Comment[uk]=Налаштувати модуль сеансу LXQt
|
||||
GenericName[uk]=Налаштування сеансу LXQt
|
||||
Name[uk]=Налаштування сеансу LXQt
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[zh_CN]=配置 LXQt-Qt 会话模块
|
||||
Comment[zh_CN]=配置 LXQt 会话模块
|
||||
GenericName[zh_CN]=LXQt 会话配置
|
||||
Name[zh_CN]=LXQt 会话配置
|
||||
|
@ -0,0 +1,184 @@
|
||||
/*
|
||||
* This file is part of the LXQt project. <http://lxqt.org>
|
||||
* Copyright (C) 2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "userlocationspage.h"
|
||||
|
||||
#include <XdgDirs>
|
||||
#include <XdgIcon>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QLabel>
|
||||
#include <QSignalMapper>
|
||||
#include <QLineEdit>
|
||||
#include <QToolButton>
|
||||
#include <QStringList>
|
||||
#include <QGridLayout>
|
||||
#include <QSpacerItem>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
class UserLocationsPagePrivate {
|
||||
public:
|
||||
|
||||
UserLocationsPagePrivate();
|
||||
static const QStringList locationsName;
|
||||
|
||||
QList<QString> initialLocations;
|
||||
QList<QLineEdit *> locations;
|
||||
QSignalMapper *signalMapper;
|
||||
|
||||
void getUserDirs();
|
||||
void populate();
|
||||
};
|
||||
|
||||
UserLocationsPagePrivate::UserLocationsPagePrivate()
|
||||
: locations(),
|
||||
signalMapper(0)
|
||||
{
|
||||
}
|
||||
|
||||
// This labels haveto match XdgDirs::UserDirectories
|
||||
const QStringList UserLocationsPagePrivate::locationsName = QStringList() <<
|
||||
qApp->translate("UserLocationsPrivate", "Desktop") <<
|
||||
qApp->translate("UserLocationsPrivate", "Downloads") <<
|
||||
qApp->translate("UserLocationsPrivate", "Templates") <<
|
||||
qApp->translate("UserLocationsPrivate", "Public Share") <<
|
||||
qApp->translate("UserLocationsPrivate", "Documents") <<
|
||||
qApp->translate("UserLocationsPrivate", "Music") <<
|
||||
qApp->translate("UserLocationsPrivate", "Pictures") <<
|
||||
qApp->translate("UserLocationsPrivate", "Videos");
|
||||
|
||||
void UserLocationsPagePrivate::getUserDirs()
|
||||
{
|
||||
const int N = locationsName.count();
|
||||
for(int i = 0; i < N; ++i) {
|
||||
const QString userDir = XdgDirs::userDir(static_cast<XdgDirs::UserDirectory> (i));
|
||||
const QDir dir(userDir);
|
||||
initialLocations.append(dir.canonicalPath());
|
||||
}
|
||||
}
|
||||
|
||||
void UserLocationsPagePrivate::populate()
|
||||
{
|
||||
const int N = initialLocations.count();
|
||||
|
||||
Q_ASSERT(N == locationsName.count());
|
||||
|
||||
for (int i = 0; i < N; ++i) {
|
||||
locations.at(i)->setText(initialLocations.at(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UserLocationsPage::UserLocationsPage(QWidget *parent)
|
||||
: QWidget(parent),
|
||||
d(new UserLocationsPagePrivate())
|
||||
{
|
||||
d->signalMapper = new QSignalMapper(this);
|
||||
QGridLayout *gridLayout = new QGridLayout(this);
|
||||
|
||||
int row = 0;
|
||||
|
||||
QLabel *description = new QLabel(tr("Locations for Personal Files"), this);
|
||||
QFont font;
|
||||
font.setBold(true);
|
||||
description->setFont(font);
|
||||
|
||||
gridLayout->addWidget(description, row++, 0, 1, -1);
|
||||
|
||||
for (int i = 0; i < d->locationsName.size(); ++i, ++row) {
|
||||
QLabel *label = new QLabel(d->locationsName.at(i), this);
|
||||
|
||||
QLineEdit *edit = new QLineEdit(this);
|
||||
d->locations.append(edit);
|
||||
edit->setClearButtonEnabled(true);
|
||||
|
||||
QToolButton *button = new QToolButton(this);
|
||||
button->setIcon(XdgIcon::fromTheme(QStringLiteral("folder")));
|
||||
connect(button, SIGNAL(clicked()), d->signalMapper, SLOT(map()));
|
||||
d->signalMapper->setMapping(button, i);
|
||||
|
||||
gridLayout->addWidget(label, row, 0);
|
||||
gridLayout->addWidget(edit, row, 1);
|
||||
gridLayout->addWidget(button, row, 2);
|
||||
}
|
||||
connect(d->signalMapper, SIGNAL(mapped(int)),
|
||||
this, SLOT(clicked(int)));
|
||||
|
||||
QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum,
|
||||
QSizePolicy::Expanding);
|
||||
gridLayout->addItem(verticalSpacer, row++, 1, 1, 1);
|
||||
setLayout(gridLayout);
|
||||
|
||||
d->getUserDirs();
|
||||
d->populate();
|
||||
}
|
||||
|
||||
UserLocationsPage::~UserLocationsPage()
|
||||
{
|
||||
// It's fine to delete a null pointer. No need to check.
|
||||
delete d;
|
||||
d = 0;
|
||||
}
|
||||
|
||||
void UserLocationsPage::restoreSettings()
|
||||
{
|
||||
d->populate();
|
||||
}
|
||||
|
||||
void UserLocationsPage::save()
|
||||
{
|
||||
bool restartWarn = false;
|
||||
|
||||
const int N = d->locations.count();
|
||||
for (int i = 0; i < N; ++i) {
|
||||
const QDir dir(d->locations.at(i)->text());
|
||||
const QString s = dir.canonicalPath();
|
||||
|
||||
if (s != d->initialLocations.at(i)) {
|
||||
const bool ok = XdgDirs::setUserDir(
|
||||
static_cast<XdgDirs::UserDirectory> (i), s, true);
|
||||
if (!ok) {
|
||||
const int ret = QMessageBox::warning(this,
|
||||
tr("LXQt Session Settings - Locations"),
|
||||
tr("An error ocurred while applying the settings for the %1 location").arg(d->locationsName.at(i)),
|
||||
QMessageBox::Ok);
|
||||
Q_UNUSED(ret);
|
||||
}
|
||||
restartWarn = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (restartWarn)
|
||||
emit needRestart();
|
||||
}
|
||||
|
||||
void UserLocationsPage::clicked(int id)
|
||||
{
|
||||
const QString& currentDir = d->locations.at(id)->text();
|
||||
const QString dir = QFileDialog::getExistingDirectory(this,
|
||||
tr("Choose Location"),
|
||||
currentDir,
|
||||
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
if (!dir.isEmpty()) {
|
||||
const QDir dd(dir);
|
||||
d->locations.at(id)->setText(dd.canonicalPath());
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* This file is part of the LXQt project. <http://lxqt.org>
|
||||
* Copyright (C) 2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef USERLOCATIONSPAGE_H
|
||||
#define USERLOCATIONSPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class UserLocationsPagePrivate;
|
||||
|
||||
class UserLocationsPage : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit UserLocationsPage(QWidget *parent = 0);
|
||||
~UserLocationsPage();
|
||||
|
||||
Q_SIGNALS:
|
||||
void needRestart();
|
||||
|
||||
public Q_SLOTS:
|
||||
void restoreSettings();
|
||||
void save();
|
||||
|
||||
private Q_SLOTS:
|
||||
void clicked(int id);
|
||||
|
||||
private:
|
||||
UserLocationsPagePrivate *d;
|
||||
};
|
||||
|
||||
#endif // USERLOCATIONSPAGE_H
|
Loading…
Reference in new issue