Cherry-picking upstream version 0.9.0+20151031.

set new minimal versions for liblxqt and libqtxdg
fix some wording in debian/copyright
ubuntu/cosmic debian/0.9.0+20151031-1
Alf Gaida 9 years ago
parent 54fa89661a
commit 79276dfcd4

@ -39,4 +39,3 @@ set(CPACK_GENERATOR TBZ2)
set(CPACK_SOURCE_GENERATOR TBZ2)
set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp)
include(CPack)

6
debian/changelog vendored

@ -1,8 +1,10 @@
lxqt-session (0.9.0+20151023-1) unstable; urgency=medium
lxqt-session (0.9.0+20151031-1) experimental; urgency=medium
* Cherry-picking upstream version 0.9.0+20151023.
* Cherry-picking upstream version 0.9.0+20151031.
* set new minimal versions for liblxqt and libqtxdg
* Added upstream signing key and use it in watch file
* Added lintian-overrides for invalid category
* fix some wording of debian/copyright
* Fixed some copyright dates
-- Alf Gaida <agaida@siduction.org> Sat, 24 Oct 2015 13:00:16 +0200

4
debian/control vendored

@ -8,9 +8,9 @@ Priority: optional
Build-Depends: debhelper (>= 9),
cmake (>= 3.0.2),
libkf5windowsystem-dev,
liblxqt0-dev,
liblxqt0-dev (>= 0.9.0+20151026),
libqt5x11extras5-dev,
libqt5xdg-dev,
libqt5xdg-dev (>= 1.3.0),
libudev-dev,
libx11-dev,
pkg-config,

12
debian/copyright vendored

@ -3,15 +3,15 @@ Upstream-Name: lxqt-session
Source: https://github.com/lxde/lxqt-session
Files: *
Copyright: Copyright (c) 2010-2012 Razor team
Copyright (c) 2012-2015 LXQt team
Copyright: 2010-2012 Razor team
2012-2015 LXQt team
License: LGPL-2.1+
Files: lxqt-config-session/autostartedit.*
lxqt-config-session/autostartitem.*
lxqt-config-session/autostartpage.*
lxqt-config-session/modulemodel.*
Copyright: Copyright (C) 2011-2012 Alec Moskvin <alecm@gmx.com>
Copyright: 2011-2012 Alec Moskvin <alecm@gmx.com>
License: LGPL-2.1+
Files: lxqt-config-session/basicsettings.*
@ -19,7 +19,7 @@ Files: lxqt-config-session/basicsettings.*
lxqt-config-session/environmentpage.*
lxqt-config-session/main.cpp
lxqt-config-session/sessionconfigwindow.*
Copyright: Copyright 2010-2015 LxQt team
Copyright: 2010-2015 LxQt team
License: LGPL-2.1+
Files: lxqt-leave/leavedialog.*
@ -31,11 +31,11 @@ Files: lxqt-session/src/UdevNotifier.*
lxqt-session/src/sessiondbusadaptor.h
lxqt-session/src/windowmanager.*
lxqt-session/src/wmselectdialog.*
Copyright: Copyright: 2010-2015 LXQt team
Copyright: 2010-2015 LXQt team
License: LGPL-2.1+
Files: lxqt-session/src/sessionapplication.*
Copyright: Copyright (C) 2014 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
Copyright: 2014 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
License: LGPL-2.1+
Files: debian/*

@ -9,8 +9,10 @@ set(lxqt-sessioncfg_HDRS
autostartmodel.h
autostartitem.h
autostartedit.h
autostartutils.h
defaultappspage.h
environmentpage.h
userlocationspage.h
)
set(lxqt-sessioncfg_SRCS
@ -22,8 +24,10 @@ set(lxqt-sessioncfg_SRCS
autostartmodel.cpp
autostartitem.cpp
autostartedit.cpp
autostartutils.cpp
defaultappspage.cpp
environmentpage.cpp
userlocationspage.cpp
../lxqt-session/src/windowmanager.cpp
)
@ -76,3 +80,8 @@ install(FILES
"${CMAKE_INSTALL_DATAROOTDIR}/applications"
COMPONENT Runtime
)
install(FILES
man/lxqt-config-session.1
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
COMPONENT Runtime
)

@ -27,6 +27,7 @@
#include <XdgIcon>
#include "autostartmodel.h"
#include "autostartutils.h"
AutoStartItemModel::AutoStartItemModel(QObject* parent) :
QAbstractItemModel(parent),
@ -37,7 +38,7 @@ AutoStartItemModel::AutoStartItemModel(QObject* parent) :
QMap<QString,AutostartItem>::iterator iter;
for (iter = mItemMap.begin(); iter != mItemMap.end(); ++iter)
{
if (!iter.value().file().value("X-LXQt-Module", false).toBool())
if (!AutostartUtils::isLXQtModule(iter.value().file()))
{
if (showOnlyInLXQt(iter.value().file()))
mLXQtItems.append(iter.key());
@ -61,6 +62,20 @@ bool AutoStartItemModel::writeChanges()
return true;
}
QMap<QString, AutostartItem> AutoStartItemModel::items()
{
QMap<QString, AutostartItem> allItems;
QString s;
foreach(s, mLXQtItems)
allItems[s] = mItemMap.value(s);
foreach(s, mGlobalItems)
allItems[s] = mItemMap.value(s);
return allItems;
}
/*
* Creates or replaces an autostart entry
*/

@ -59,6 +59,9 @@ public:
public slots:
bool writeChanges();
public:
QMap<QString, AutostartItem> items();
private:
QMap<QString, AutostartItem> mItemMap;
QPersistentModelIndex mGlobalIndex;

@ -26,6 +26,7 @@
#include "ui_autostartpage.h"
#include "autostartedit.h"
#include "autostartutils.h"
#include <QMessageBox>
@ -63,6 +64,64 @@ void AutoStartPage::restoreSettings()
void AutoStartPage::save()
{
bool doRestart = false;
/*
* Get the previous settings
*/
QMap<QString, AutostartItem> previousItems(AutostartItem::createItemMap());
QMutableMapIterator<QString, AutostartItem> i(previousItems);
while (i.hasNext()) {
i.next();
if (AutostartUtils::isLXQtModule(i.value().file()))
i.remove();
}
/*
* Get the settings from the Ui
*/
QMap<QString, AutostartItem> currentItems = mXdgAutoStartModel->items();
QMutableMapIterator<QString, AutostartItem> j(currentItems);
while (j.hasNext()) {
j.next();
if (AutostartUtils::isLXQtModule(j.value().file()))
j.remove();
}
/* Compare the settings */
if (previousItems.count() != currentItems.count())
{
doRestart = true;
}
else
{
QMap<QString, AutostartItem>::const_iterator k = currentItems.constBegin();
while (k != currentItems.constEnd())
{
if (previousItems.contains(k.key()))
{
if (k.value().file() != previousItems.value(k.key()).file())
{
doRestart = true;
break;
}
}
else
{
doRestart = true;
break;
}
++k;
}
}
if (doRestart)
emit needRestart();
mXdgAutoStartModel->writeChanges();
}

@ -41,6 +41,9 @@ public:
explicit AutoStartPage(QWidget* parent = 0);
~AutoStartPage();
signals:
void needRestart();
public slots:
void save();
void restoreSettings();

@ -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

@ -30,6 +30,11 @@
#include "../lxqt-session/src/windowmanager.h"
#include "sessionconfigwindow.h"
#include "autostartutils.h"
static const QLatin1String windowManagerKey("window_manager");
static const QLatin1String leaveConfirmationKey("leave_confirmation");
static const QLatin1String openboxValue("openbox");
BasicSettings::BasicSettings(LXQt::Settings *settings, QWidget *parent) :
QWidget(parent),
@ -41,9 +46,6 @@ BasicSettings::BasicSettings(LXQt::Settings *settings, QWidget *parent) :
connect(ui->findWmButton, SIGNAL(clicked()), this, SLOT(findWmButton_clicked()));
connect(ui->startButton, SIGNAL(clicked()), this, SLOT(startButton_clicked()));
connect(ui->stopButton, SIGNAL(clicked()), this, SLOT(stopButton_clicked()));
connect(ui->wmComboBox, SIGNAL(currentIndexChanged(int)), parent, SLOT(setRestart()));
connect(ui->wmComboBox, SIGNAL(editTextChanged(const QString&)), SIGNAL(needRestart()));
connect(ui->leaveConfirmationCheckBox, SIGNAL(toggled(bool)), SIGNAL(needRestart()));
restoreSettings();
ui->moduleView->setModel(m_moduleModel);
@ -64,25 +66,75 @@ void BasicSettings::restoreSettings()
knownWMs << wm.command;
}
QString wm = m_settings->value("window_manager", "openbox").toString();
QString wm = m_settings->value(windowManagerKey, openboxValue).toString();
SessionConfigWindow::handleCfgComboBox(ui->wmComboBox, knownWMs, wm);
m_moduleModel->reset();
ui->leaveConfirmationCheckBox->setChecked(m_settings->value("leave_confirmation", false).toBool());
ui->leaveConfirmationCheckBox->setChecked(m_settings->value(leaveConfirmationKey, false).toBool());
}
void BasicSettings::save()
{
m_settings->setValue("window_manager", ui->wmComboBox->currentText());
m_moduleModel->writeChanges();
/* If the setting actually changed:
* * Save the setting
* * Emit a needsRestart signal
*/
bool doRestart = false;
const QString windowManager = ui->wmComboBox->currentText();
const bool leaveConfirmation = ui->leaveConfirmationCheckBox->isChecked();
QMap<QString, AutostartItem> previousItems(AutostartItem::createItemMap());
QMutableMapIterator<QString, AutostartItem> i(previousItems);
while (i.hasNext()) {
i.next();
if (!AutostartUtils::isLXQtModule(i.value().file()))
i.remove();
}
if (windowManager != m_settings->value(windowManagerKey, openboxValue).toString())
{
m_settings->setValue(windowManagerKey, windowManager);
doRestart = true;
}
m_settings->setValue("leave_confirmation", ui->leaveConfirmationCheckBox->isChecked());
if (leaveConfirmation != m_settings->value(leaveConfirmationKey, false).toBool())
{
m_settings->setValue(leaveConfirmationKey, leaveConfirmation);
doRestart = true;
}
QMap<QString, AutostartItem> currentItems = m_moduleModel->items();
QMap<QString, AutostartItem>::const_iterator k = currentItems.constBegin();
while (k != currentItems.constEnd())
{
if (previousItems.contains(k.key()))
{
if (k.value().file() != previousItems.value(k.key()).file())
{
doRestart = true;
break;
}
}
else
{
doRestart = true;
break;
}
++k;
}
if (doRestart)
emit needRestart();
m_moduleModel->writeChanges();
}
void BasicSettings::findWmButton_clicked()
{
SessionConfigWindow::updateCfgComboBox(ui->wmComboBox, tr("Select a window manager"));
emit needRestart();
}
void BasicSettings::startButton_clicked()

@ -73,14 +73,33 @@ void EnvironmentPage::restoreSettings()
void EnvironmentPage::save()
{
bool doRestart = false;
QMap<QString, QString> oldSettings;
m_settings->beginGroup("Environment");
/* We erase the Enviroment group and them write the Ui settings. To know if
they changed or not we need to save them to memory.
*/
foreach (const QString &key, m_settings->childKeys())
oldSettings[key] = m_settings->value(key, QString()).toString();
m_settings->remove("");
for(int i = 0; i < ui->treeWidget->topLevelItemCount(); ++i)
{
QTreeWidgetItem *item = ui->treeWidget->topLevelItem(i);
const QString key = item->text(0);
const QString value = item->text(1);
if (oldSettings.value(key) != value)
doRestart = true;
m_settings->setValue(item->text(0), item->text(1));
}
m_settings->endGroup();
if (doRestart)
emit needRestart();
}
void EnvironmentPage::addButton_clicked()
@ -89,7 +108,6 @@ void EnvironmentPage::addButton_clicked()
item->setFlags(item->flags() | Qt::ItemIsEditable);
ui->treeWidget->addTopLevelItem(item);
ui->treeWidget->setCurrentItem(item);
emit needRestart();
}
void EnvironmentPage::deleteButton_clicked()
@ -99,14 +117,12 @@ void EnvironmentPage::deleteButton_clicked()
emit envVarChanged(item->text(0), "");
delete item;
}
emit needRestart();
}
void EnvironmentPage::itemChanged(QTreeWidgetItem *item, int column)
{
Q_UNUSED(column);
emit envVarChanged(item->text(0), item->text(1));
emit needRestart();
}
void EnvironmentPage::updateItem(const QString& var, const QString& val)
@ -127,5 +143,4 @@ void EnvironmentPage::updateItem(const QString& var, const QString& val)
else
delete item;
}
emit needRestart();
}

@ -1,15 +1,15 @@
.TH lxqt-config-session "1" "September 2012" "LXQt\ 0.7.0" "LXQt\ Application"
.TH lxqt-config-session "1" "October 2015" "LXQt\ 0.9.0" "LXQt\ Application"
.SH NAME
lxqt-config-session \- Session settings of \fBLXQt\fR, the Lightweight Desktop Environment
\fBlxqt-config-session\fR \- Session settings of \fBLXQt\fR, the Lightweight Desktop Environment
.SH SYNOPSIS
.B lxqt-config-session
.br
.SH DESCRIPTION
This application handle settings and configurations around autostart applications on \fBLXQt\-qt\fR desktop environment.
This application handle settings and configuration around autostart applications on \fBLXQt\fR desktop environment.
.P
Through this applicaton you can manage settings related to applications startup and LXQt modules.
Through this applicaton you can manage settings related to applications startup and \fBLXQt\fR modules.
.P
\fBLXQt\-qt\fR is an advanced, easy-to-use, and fast desktop environment based on Qt
\fBLXQt\fR is an advanced, easy-to-use, and fast desktop environment based on Qt
technologies, ships several core desktop components, all of which are optional:
.P
* Panel
@ -18,7 +18,7 @@ technologies, ships several core desktop components, all of which are optional:
* Settings center
* Session handler \fI(related to this)\fR
* Polkit handler
* SSYH password access
* SSH password access
* Display manager handler
.P
These components perform similar actions to those available in other desktop
@ -26,17 +26,17 @@ environments, and their names are self-descriptive. They are usually not launch
by hand but automatically, when choosing a \fBLXQt\fR session in the Display
Manager.
.SH "REPORTING BUGS"
Report bugs to https://github.com/LXQt/LXQt/issues
Report bugs to https://github.com/lxde/lxqt/issues
.SH "SEE ALSO"
LXQt it has been tailored for users who value simplicity, speed, and
\fBLXQt\fR has been tailored for users who value simplicity, speed, and
an intuitive interface, also intended for less powerful machines. See:
.\" any module must refers to session app, for more info on start it
.P
\fBlxqt-config.1\fR LXQt application for manage configurations and settings
\fBlxqt-config(1)\fR \fBLXQt\fR application to manage configuration and settings
.P
\fBlxqt-session.1\fR LXQt module for manage LXQt autostart session applications
.P
\fBstart-lxqt.1\fR LXQt display management independient starup.
\fBlxqt-session(1)\fR \fBLXQt\fR module to manage \fBLXQt\fR autostart session applications
\".P
\"\fBstart-lxqt(1)\fR \fBLXQt\fR display manager independent startup.
.P
.SH AUTHOR
This manual page was created by \fBPICCORO Lenz McKAY\fR \fI<mckaygerhard@gmail.com>\fR

@ -28,6 +28,7 @@
#include <QDebug>
#include <XdgIcon>
#include "modulemodel.h"
#include "autostartutils.h"
ModuleModel::ModuleModel(QObject* parent)
: QAbstractListModel(parent)
@ -51,7 +52,7 @@ void ModuleModel::reset()
QMap<QString,AutostartItem>::iterator iter;
for (iter = mItemMap.begin(); iter != mItemMap.end(); ++iter)
{
if (iter.value().file().value("X-LXQt-Module", false).toBool())
if (AutostartUtils::isLXQtModule(iter.value().file()))
mKeyList.append(iter.key());
}
@ -105,6 +106,17 @@ Qt::ItemFlags ModuleModel::flags(const QModelIndex& index) const
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable;
}
QMap<QString, AutostartItem> ModuleModel::items()
{
QMap<QString, AutostartItem> allItems;
QString s;
foreach(s, mKeyList)
allItems[s] = mItemMap.value(s);
return allItems;
}
int ModuleModel::rowCount(const QModelIndex& parent) const
{
Q_UNUSED(parent);

@ -46,6 +46,8 @@ public:
int columnCount(const QModelIndex&) const { return 2; }
Qt::ItemFlags flags(const QModelIndex& index) const;
QMap<QString, AutostartItem> items();
private slots:
void updateModuleState(QString moduleName, bool state);

@ -37,6 +37,7 @@
#include "autostartpage.h"
#include "defaultappspage.h"
#include "environmentpage.h"
#include "userlocationspage.h"
SessionConfigWindow::SessionConfigWindow() :
@ -51,8 +52,15 @@ SessionConfigWindow::SessionConfigWindow() :
DefaultApps* defaultApps = new DefaultApps(this);
addPage(defaultApps, tr("Default Applications"), "preferences-desktop-filetype-association");
UserLocationsPage* userLocations = new UserLocationsPage(this);
addPage(userLocations, tr("Locations"), QStringLiteral("folder"));
connect(userLocations, SIGNAL(needRestart()), SLOT(setRestart()));
connect(this, SIGNAL(reset()), userLocations, SLOT(restoreSettings()));
connect(this, SIGNAL(save()), userLocations, SLOT(save()));
AutoStartPage* autoStart = new AutoStartPage(this);
addPage(autoStart, tr("Autostart"), "preferences-desktop-launch-feedback");
connect(autoStart, SIGNAL(needRestart()), SLOT(setRestart()));
connect(this, SIGNAL(reset()), autoStart, SLOT(restoreSettings()));
connect(this, SIGNAL(save()), autoStart, SLOT(save()));
@ -82,9 +90,7 @@ void SessionConfigWindow::closeEvent(QCloseEvent * event)
LXQt::ConfigDialog::closeEvent(event);
if (m_restart) {
QMessageBox::information(this, tr("Session Restart Required"),
tr("You need to restart desktop session (lxqt-session) "
"to reload settings. Use logout from the main menu."
)
tr("Some settings will not take effect until the next log in.")
);
}
}

@ -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[tr]=LXQt-Qt oturum modülünü yapılandır
Comment[tr]=LXQt oturum modülünü yapılandır
GenericName[tr]=LXQt Oturum Yapılandırıcı
Name[tr]=LXQt Oturum Yapılandırıcı

@ -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

@ -0,0 +1,3 @@
Comment[fr]=Verrouillage de la session courante
GenericName[fr]=Verrouiller lécran
Name[fr]=Verrouiller lécran

@ -4,7 +4,7 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if(NOT DEFINED LIBUDEV_MONITOR OR LIBUDEV_MONITOR)
if(LIBUDEV_MONITOR)
set(LIBUDEV_MONITOR Yes)
find_package(PkgConfig)
@ -80,3 +80,8 @@ INSTALL(TARGETS
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT Runtime
)
install(FILES
man/lxqt-session.1
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
COMPONENT Runtime
)

@ -1,11 +1,11 @@
.TH lxqt-session "1" "September 2012" "LXQt\ 0.7.0" "LXQt\ Module"
.TH lxqt-session "1" "October 2015" "LXQt\ 0.9.0" "LXQt\ Module"
.SH NAME
lxqt-session \- Session manager of \fBLXQt\fR, the Lightweight Desktop Environment
\fBlxqt-session\fR \- Session manager of \fBLXQt\fR, the Lightweight Desktop Environment
.SH SYNOPSIS
.B lxqt-session
.br
.SH DESCRIPTION
This module handle session autostart application over \fBLXQt\fR desktop environment startup.
This module handles session autostart application over \fBLXQt\fR desktop environment startup.
.P
The \fBLXQt modules\fR are desktop independent tools,
and operate as daemons for the local user for desktop specific operations.
@ -23,28 +23,28 @@ and operate as daemons for the local user for desktop specific operations.
.P
These components perform similar actions to those available in other desktop
environments, and their names are self-descriptive. They are usually not launched
by hand but automatically, when choosing a \fBLXQt\-qt\fR session in the Display
by hand but automatically, when choosing a \fBLXQt\fR session in the Display
Manager.
.SH BEHAVIOR
Through this application \fBLXQt\fR desktop environment manage the session desktop behavior,
module loading and related starup programs before user gets a working area. By default this module
load the panel, desktop and power modules of \fBLXQt\fR environment, such then this its a
important module for a working lxqt sesion.
module loading and related startup programs before user gets a working area. By default this module
loads the panel, desktop and power modules of \fBLXQt\fR environment, thus it is an
important module for a working \fBLXQt\fR session.
.P
Each of any desktop environment has any way to configure applications need or want to start at logon,
so user can manage manualy in the \fBlxqt-config-session\fR application.
so user can manage manually in the \fBlxqt-config-session\fR application.
.SH "REPORTING BUGS"
Report bugs to https://github.com/lxde/lxqt/issues
.SH "SEE ALSO"
\fBLXQt\fR it has been tailored for users who value simplicity, speed, and
\fBLXQt\fR has been tailored for users who value simplicity, speed, and
an intuitive interface, also intended for less powerful machines. See also:
.\" any module must refers to session app, for more info on start it
.P
\fBlxqt-config.1\fR LXQt application for manage configurations and settings
\fBlxqt-config(1)\fR \fBLXQt\fR application to manage configuration and settings
.P
\fBlxqt-config-session.1\fR LXQt module for manage LXQt autostart session applications
.P
\fBstart-lxqt.1\fR LXQt display management independient starup.
\fBlxqt-config-session(1)\fR \fBLXQt\fR module to manage \fBLXQt\fR autostart session applications
\".P
\"\fBstart-lxqt(1)\fR LXQt display management independient starup.
.P
.SH AUTHOR
This manual page was created by \fBPICCORO Lenz McKAY\fR \fI<mckaygerhard@gmail.com>\fR

Loading…
Cancel
Save