Signed-off-by: Andrew Lee (李健秋) <ajqlee@debian.org>ubuntu/cosmic upstream/0.9.0+20150807
parent
1d96dee67a
commit
80d6a5b53b
@ -1 +0,0 @@
|
||||
build
|
@ -1,28 +0,0 @@
|
||||
# some system (rpm builds) setup LIB_SUFFIX for cmake. If there is no set, try to get it from system
|
||||
if(NOT DEFINED LIB_SUFFIX AND NOT DEFINED LIB_SUFFIX_ALREADY_SET)
|
||||
MESSAGE(STATUS "*********************************************************************")
|
||||
MESSAGE(STATUS "LIB_SUFFIX variable is not defined. It will be autodetected now")
|
||||
MESSAGE(STATUS "You can set it manually with -DLIB_SUFFIX=<value> (64 for example)")
|
||||
|
||||
# All 32bit system have empty lib suffix
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
# If there is lib64 dir, set suffix to 64
|
||||
if(IS_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib64)
|
||||
set(LIB_SUFFIX 64)
|
||||
elseif(IS_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(LIB_SUFFIX "")
|
||||
else()
|
||||
message(WARNING "LIB_SUFFIX cannot be autodetected. No ${CMAKE_INSTALL_PREFIX}/lib neither ${CMAKE_INSTALL_PREFIX}/lib64 found.")
|
||||
set(LIB_SUFFIX "")
|
||||
endif()
|
||||
else()
|
||||
set(LIB_SUFFIX "")
|
||||
endif()
|
||||
|
||||
set(LIB_SUFFIX_ALREADY_SET 1)
|
||||
|
||||
message(STATUS "LIB_SUFFIX autodetected as '${LIB_SUFFIX}', libraries will be installed into ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
|
||||
MESSAGE(STATUS "*********************************************************************")
|
||||
else()
|
||||
message(STATUS "LIB_SUFFIX already set: ${LIB_SUFFIX}")
|
||||
endif()
|
@ -1,4 +1,3 @@
|
||||
# Translations
|
||||
Comment[de]=Konfiguriere die LxQt-Qt Sitzungsmodule
|
||||
GenericName[de]=LxQt Sitzungskonfiguration
|
||||
Name[de]=LxQt Sitzungskonfiguration
|
||||
Name[de]=Sitzungskonfiguration
|
||||
GenericName[de]=LXQt Sitzungskonfiguration
|
||||
Comment[de]=Die LXQt Sitzung konfigurieren
|
||||
|
@ -1,4 +0,0 @@
|
||||
# Translations
|
||||
Comment[de_DE]=LxQt-Qt Sitzungsmodul konfigurieren
|
||||
GenericName[de_DE]=LxQt Sitzungskonfigurator
|
||||
Name[de_DE]=LxQt Sitzungskonfigurator
|
@ -1,264 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de_DE">
|
||||
<context>
|
||||
<name>AutoStartEdit</name>
|
||||
<message>
|
||||
<location filename="../autostartedit.ui" line="14"/>
|
||||
<source>Edit</source>
|
||||
<translation>Bearbeiten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartedit.ui" line="20"/>
|
||||
<source>Name:</source>
|
||||
<translation>Name:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartedit.ui" line="27"/>
|
||||
<source>Search...</source>
|
||||
<translation>Suche...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartedit.ui" line="47"/>
|
||||
<source>Command:</source>
|
||||
<translation>Befehl:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartedit.ui" line="57"/>
|
||||
<source>Wait for system tray</source>
|
||||
<translation>Warte auf System Tray</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartedit.cpp" line="59"/>
|
||||
<source>Select Application</source>
|
||||
<translation>Anwendung auswählen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AutoStartItemModel</name>
|
||||
<message>
|
||||
<location filename="../autostartmodel.cpp" line="177"/>
|
||||
<source>Global Autostart</source>
|
||||
<translation>Globaler Autostart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LxQt Autostart</source>
|
||||
<translation type="vanished">LxQt Autostart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartmodel.cpp" line="179"/>
|
||||
<source>LXQt Autostart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartmodel.cpp" line="197"/>
|
||||
<source>Location: %1</source>
|
||||
<translation>Ort: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartmodel.cpp" line="199"/>
|
||||
<source>Overrides: %1</source>
|
||||
<translation>Überschreibung: %1</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>AutoStartPage</name>
|
||||
<message>
|
||||
<location filename="../autostartpage.ui" line="17"/>
|
||||
<source>Delete</source>
|
||||
<translation>Löschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartpage.ui" line="24"/>
|
||||
<source>Add</source>
|
||||
<translation>Hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartpage.ui" line="31"/>
|
||||
<source>Edit</source>
|
||||
<translation>Bearbeiten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartpage.ui" line="44"/>
|
||||
<source>Application Autostart</source>
|
||||
<translation>Anwendung-Autostart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartpage.cpp" line="82"/>
|
||||
<source>Error</source>
|
||||
<translation>Fehler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../autostartpage.cpp" line="82"/>
|
||||
<source>File '%1' already exists!</source>
|
||||
<translation>Datei '%1' existiert bereits!</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>BasicSettings</name>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="30"/>
|
||||
<source>Window Manager</source>
|
||||
<translation>Fenstermanager</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="49"/>
|
||||
<source>Search...</source>
|
||||
<translation>Suchen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="59"/>
|
||||
<source>LXQt Modules</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="111"/>
|
||||
<source>Leave Session</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="117"/>
|
||||
<source>Ask confirmation to leave session</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="23"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Grundeinstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>LxQt Modules</source>
|
||||
<translation type="vanished">LxQt-Module</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="65"/>
|
||||
<source>Start</source>
|
||||
<translation>Start</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.ui" line="72"/>
|
||||
<source>Stop</source>
|
||||
<translation>Stopp</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../basicsettings.cpp" line="84"/>
|
||||
<source>Select a window manager</source>
|
||||
<translation>Fenstermanager auswählen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DefaultApps</name>
|
||||
<message>
|
||||
<location filename="../defaultappspage.cpp" line="72"/>
|
||||
<source>Select a terminal emulator</source>
|
||||
<translation>Terminal-Emulator auswählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../defaultappspage.cpp" line="77"/>
|
||||
<source>Select a web browser</source>
|
||||
<translation>Web Browser auswählen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DefaultAppsPage</name>
|
||||
<message>
|
||||
<location filename="../defaultappspage.ui" line="23"/>
|
||||
<source>Default Applications</source>
|
||||
<translation>Standardanwendungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../defaultappspage.ui" line="32"/>
|
||||
<source>Terminal Emulation:</source>
|
||||
<translation>Terminal-Emulator:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../defaultappspage.ui" line="52"/>
|
||||
<location filename="../defaultappspage.ui" line="79"/>
|
||||
<source>Search...</source>
|
||||
<translation>Suche...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../defaultappspage.ui" line="59"/>
|
||||
<source>Web Browser:</source>
|
||||
<translation>Web Browser:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EnvironmentPage</name>
|
||||
<message>
|
||||
<location filename="../environmentpage.ui" line="30"/>
|
||||
<source>Add</source>
|
||||
<translation>Hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../environmentpage.ui" line="37"/>
|
||||
<source>Delete</source>
|
||||
<translation>Löschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../environmentpage.ui" line="63"/>
|
||||
<source>Environment Variables (Advanced)</source>
|
||||
<translation>Umgebungsvariablen (Erweitert)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../environmentpage.ui" line="74"/>
|
||||
<source>Variable Name</source>
|
||||
<translation>Variablenname</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../environmentpage.ui" line="79"/>
|
||||
<source>Value</source>
|
||||
<translation>Wert</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModuleModel</name>
|
||||
<message>
|
||||
<location filename="../modulemodel.cpp" line="85"/>
|
||||
<source>Running</source>
|
||||
<translation>Läuft</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SessionConfigWindow</name>
|
||||
<message>
|
||||
<source>LxQt Session Configuration</source>
|
||||
<translation type="vanished">LxQt Sitzungs-Konfiguration</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sessionconfigwindow.cpp" line="43"/>
|
||||
<source>LXQt Session Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sessionconfigwindow.cpp" line="46"/>
|
||||
<source>Basic Settings</source>
|
||||
<translation>Grundeinstellungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sessionconfigwindow.cpp" line="52"/>
|
||||
<source>Default Applications</source>
|
||||
<translation>Standardanwendungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sessionconfigwindow.cpp" line="55"/>
|
||||
<source>Autostart</source>
|
||||
<translation>Autostart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sessionconfigwindow.cpp" line="60"/>
|
||||
<source>Environment (Advanced)</source>
|
||||
<translation>Umgebung (Erweitert)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sessionconfigwindow.cpp" line="84"/>
|
||||
<source>Session Restart Required</source>
|
||||
<translation>Erneute Anmeldung erforderlich</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sessionconfigwindow.cpp" line="85"/>
|
||||
<source>You need to restart desktop session (lxqt-session) to reload settings. Use logout from the main menu.</source>
|
||||
<translation>Sie müssen sich erneut anmelden (lxqt-session), damit Ihre Änderungen aktiv werden. Klicken Sie dafür auf "Abmelden" im Hauptmenü.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,4 +1,3 @@
|
||||
# Translations
|
||||
Comment[it]=Configura la sessione LxQt
|
||||
GenericName[it]=Impostazioni della sessione LxQt
|
||||
Name[it]=Impostazioni della sessione LxQt
|
||||
Name[it]=Impostazioni della sessione
|
||||
Comment[it]=Configura i moduli della sessione di LXQt
|
||||
|
@ -1,4 +0,0 @@
|
||||
# Translations
|
||||
Comment[it_IT]=Configura il modulo sessione di LxQt-Qt
|
||||
GenericName[it_IT]=Strumento di configurazione della sessione di LxQt
|
||||
Name[it_IT]=Strumento di configurazione della sessione di LxQt
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[zh_TW]=LXDE-Qt會話模組設定
|
||||
Comment[zh_TW]=LXQt會話模組設定
|
||||
GenericName[zh_TW]=LxQt會話設定
|
||||
Name[zh_TW]=LxQt會話設定
|
||||
|
@ -0,0 +1,69 @@
|
||||
project(lxqt-leave)
|
||||
|
||||
set(CPP_FILES
|
||||
main.cpp
|
||||
leavedialog.cpp
|
||||
)
|
||||
|
||||
set(H_FILES
|
||||
leavedialog.h
|
||||
)
|
||||
|
||||
set(UI_FILES
|
||||
leavedialog.ui
|
||||
)
|
||||
|
||||
|
||||
# Translations **********************************
|
||||
lxqt_translate_desktop(DESKTOP_FILES
|
||||
SOURCES
|
||||
resources/lxqt-leave.desktop.in
|
||||
resources/lxqt-hibernate.desktop.in
|
||||
resources/lxqt-lockscreen.desktop.in
|
||||
resources/lxqt-logout.desktop.in
|
||||
resources/lxqt-reboot.desktop.in
|
||||
resources/lxqt-shutdown.desktop.in
|
||||
resources/lxqt-suspend.desktop.in
|
||||
)
|
||||
|
||||
lxqt_translate_ts(lxqt-leave_QM_FILES
|
||||
UPDATE_TRANSLATIONS
|
||||
${UPDATE_TRANSLATIONS}
|
||||
SOURCES
|
||||
${CPP_FILES}
|
||||
${UI_FILES}
|
||||
${H_FILES}
|
||||
INSTALL_DIR
|
||||
"${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
lxqt_app_translation_loader(lxqt-leave_QM_LOADER ${PROJECT_NAME})
|
||||
#************************************************
|
||||
|
||||
|
||||
add_executable(lxqt-leave
|
||||
${CPP_FILES}
|
||||
${DESKTOP_FILES}
|
||||
${lxqt-leave_QM_LOADER}
|
||||
${lxqt-leave_QM_FILES}
|
||||
)
|
||||
|
||||
target_link_libraries(lxqt-leave
|
||||
lxqt
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
lxqt-leave
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
install(FILES
|
||||
${DESKTOP_FILES} DESTINATION
|
||||
"${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||
COMPONENT Runtime
|
||||
)
|
||||
install(FILES
|
||||
resources/lxqt-leave.1
|
||||
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
|
||||
COMPONENT Runtime
|
||||
)
|
@ -0,0 +1,63 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LxQt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org, http://lxde.org/
|
||||
*
|
||||
* Copyright: 2010-2015 LXQt team
|
||||
* Authors:
|
||||
* Paulo Lieuthier <paulolieuthier@gmail.com>
|
||||
*
|
||||
* This program or 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
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include "leavedialog.h"
|
||||
|
||||
LeaveDialog::LeaveDialog(QWidget* parent)
|
||||
: QDialog(parent),
|
||||
ui(new Ui::LeaveDialog),
|
||||
mPower(new LxQt::Power(this)),
|
||||
mScreensaver(new LxQt::ScreenSaver(this))
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->logoutButton->setEnabled(mPower->canAction(LxQt::Power::PowerLogout));
|
||||
ui->rebootButton->setEnabled(mPower->canAction(LxQt::Power::PowerReboot));
|
||||
ui->shutdownButton->setEnabled(mPower->canAction(LxQt::Power::PowerShutdown));
|
||||
ui->suspendButton->setEnabled(mPower->canAction(LxQt::Power::PowerSuspend));
|
||||
ui->hibernateButton->setEnabled(mPower->canAction(LxQt::Power::PowerHibernate));
|
||||
|
||||
connect(ui->logoutButton, &QPushButton::clicked, [&] { close(); mPower->logout(); });
|
||||
connect(ui->rebootButton, &QPushButton::clicked, [&] { close(); mPower->reboot(); });
|
||||
connect(ui->shutdownButton, &QPushButton::clicked, [&] { close(); mPower->shutdown(); });
|
||||
connect(ui->suspendButton, &QPushButton::clicked, [&] { close(); mPower->suspend(); });
|
||||
connect(ui->hibernateButton, &QPushButton::clicked, [&] { close(); mPower->hibernate(); });
|
||||
connect(ui->lockscreenButton, &QPushButton::clicked, [&] {
|
||||
close();
|
||||
QEventLoop loop;
|
||||
connect(mScreensaver, &LxQt::ScreenSaver::done, &loop, &QEventLoop::quit);
|
||||
mScreensaver->lockScreen();
|
||||
loop.exec();
|
||||
});
|
||||
|
||||
connect(ui->cancelButton, &QPushButton::clicked, [&] { close(); });
|
||||
}
|
||||
|
||||
LeaveDialog::~LeaveDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LxQt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org, http://lxde.org/
|
||||
*
|
||||
* Copyright: 2010-2015 LXQt team
|
||||
* Authors:
|
||||
* Paulo Lieuthier <paulolieuthier@gmail.com>
|
||||
*
|
||||
* This program or 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
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#ifndef LEAVEDIALOG_H
|
||||
#define LEAVEDIALOG_H
|
||||
|
||||
#include "ui_leavedialog.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <LXQt/Power>
|
||||
#include <LXQt/ScreenSaver>
|
||||
|
||||
namespace Ui {
|
||||
class LeaveDialog;
|
||||
}
|
||||
|
||||
class LeaveDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LeaveDialog(QWidget *parent = 0);
|
||||
~LeaveDialog();
|
||||
|
||||
private:
|
||||
Ui::LeaveDialog *ui;
|
||||
LxQt::Power *mPower;
|
||||
LxQt::ScreenSaver *mScreensaver;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,152 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LeaveDialog</class>
|
||||
<widget class="QDialog" name="LeaveDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>617</width>
|
||||
<height>135</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Leave</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-size:12pt;">What do you want the computer to do?</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::AutoText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="buttonsWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="logoutButton">
|
||||
<property name="text">
|
||||
<string>Logout</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="system-log-out">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rebootButton">
|
||||
<property name="text">
|
||||
<string>Reboot</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="system-reboot">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="shutdownButton">
|
||||
<property name="text">
|
||||
<string>Shutdown</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="system-shutdown">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="suspendButton">
|
||||
<property name="text">
|
||||
<string>Suspend</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="system-suspend">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="lockscreenButton">
|
||||
<property name="text">
|
||||
<string>Lock screen</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="system-lock-screen">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="hibernateButton">
|
||||
<property name="text">
|
||||
<string>Hibernate</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="system-suspend-hibernate">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>170</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="dialog-cancel">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -0,0 +1,110 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
||||
* http://razor-qt.org
|
||||
*
|
||||
* Copyright: 2010-2011 Razor team
|
||||
* Authors:
|
||||
* Petr Vanek <petr@scribus.info>
|
||||
*
|
||||
* This program or 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
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <LXQt/Application>
|
||||
#include <LXQt/PowerManager>
|
||||
#include <LXQt/ScreenSaver>
|
||||
#include <LXQt/Translator>
|
||||
#include <QDesktopWidget>
|
||||
#include <QCommandLineParser>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "leavedialog.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
LxQt::Application a(argc, argv);
|
||||
LxQt::Translator::translateApplication();
|
||||
|
||||
LxQt::PowerManager powermanager(&a);
|
||||
LxQt::ScreenSaver screensaver(&a);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QStringLiteral("lxqt-leave"));
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
|
||||
QCommandLineOption logoutOption(QStringLiteral("logout"), QCoreApplication::translate("main", "Logout."));
|
||||
parser.addOption(logoutOption);
|
||||
|
||||
QCommandLineOption lockscreenOption(QStringLiteral("lockscreen"), QCoreApplication::translate("main", "Lockscreen."));
|
||||
parser.addOption(lockscreenOption);
|
||||
|
||||
QCommandLineOption suspendOption(QStringLiteral("suspend"), QCoreApplication::translate("main", "Suspend."));
|
||||
parser.addOption(suspendOption);
|
||||
|
||||
QCommandLineOption hibernateOption(QStringLiteral("hibernate"), QCoreApplication::translate("main", "Hibernate."));
|
||||
parser.addOption(hibernateOption);
|
||||
|
||||
QCommandLineOption shutdownOption(QStringLiteral("shutdown"), QCoreApplication::translate("main", "Shutdown."));
|
||||
parser.addOption(shutdownOption);
|
||||
|
||||
QCommandLineOption rebootOption(QStringLiteral("reboot"), QCoreApplication::translate("main", "Reboot."));
|
||||
parser.addOption(rebootOption);
|
||||
|
||||
parser.process(a);
|
||||
|
||||
if (parser.isSet(logoutOption)) {
|
||||
powermanager.logout();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (parser.isSet(lockscreenOption)) {
|
||||
a.connect(&screensaver, &LxQt::ScreenSaver::done, &a, &LxQt::Application::quit);
|
||||
screensaver.lockScreen();
|
||||
a.exec();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (parser.isSet(suspendOption)) {
|
||||
powermanager.suspend();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (parser.isSet(hibernateOption)) {
|
||||
powermanager.hibernate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (parser.isSet(shutdownOption)) {
|
||||
powermanager.shutdown();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (parser.isSet(rebootOption)) {
|
||||
powermanager.reboot();
|
||||
return 0;
|
||||
}
|
||||
|
||||
LeaveDialog dialog;
|
||||
dialog.setGeometry(QStyle::alignedRect(Qt::LeftToRight,
|
||||
Qt::AlignCenter,
|
||||
dialog.size(),
|
||||
qApp->desktop()->screenGeometry(QCursor::pos())));
|
||||
dialog.setMaximumSize(dialog.minimumSize());
|
||||
return dialog.exec();
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
.TH lxqt-leave 1 "" "" "LXQt\ Helper"
|
||||
.SH NAME
|
||||
\fBlxqt-leave\fR \- easily logout, reboot, shutdown, suspend, hibernate and lock screen from a dialog
|
||||
.SH SYNOPSIS
|
||||
\fBlxqt-leave\fR [\fIargument\fR]
|
||||
.SH DESCRIPTION
|
||||
\fBlxqt-leave\fR is a graphical Qt tool for easily triggering leave session actions: logout, reboot, shutdown, hibernate and lock screen. If run with an argument, the dialog is not shown and the action is executed directly.
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
The options which apply to the \fBlxqt-leave\fR command are:
|
||||
.PP
|
||||
\fB\-\-logout\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-lockscreen\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-suspend\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-hibernate\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-shutdown\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-reboot\fR
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-help\fR
|
||||
.RE
|
||||
.SH "REPORTING BUGS"
|
||||
Report bugs to https://github.com/lxde/lxqt/issues
|
||||
.SH AUTHOR
|
||||
This manual page was created by \fBPaulo Lieuthier\fR \fI<paulolieuthier@gmail.com>\fR for the \fBLXQt\fR project.
|
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Leave
|
||||
GenericName=Leave
|
||||
Comment=Leave dialog
|
||||
Exec=lxqt-leave
|
||||
Icon=system-shutdown
|
||||
Categories=LXQt;X-Leave
|
||||
OnlyShowIn=LXQt;
|
||||
|
||||
#TRANSLATIONS_DIR=../translations
|
@ -0,0 +1,2 @@
|
||||
Comment[de]=Rechner in Tiefschlaf versetzen
|
||||
Name[de]=Tiefschlaf
|
@ -0,0 +1,2 @@
|
||||
Comment[hu]=Mélykészenléti állapot
|
||||
Name[hu]=Mélykészenlét
|
@ -0,0 +1,2 @@
|
||||
Name[it]=Iberna
|
||||
Comment[it]=Ibernare il computer
|
@ -0,0 +1,2 @@
|
||||
Name[pt]=Hibernar
|
||||
Comment[pt]=Hibernar o computador
|
@ -0,0 +1,2 @@
|
||||
Name[ru]=Спящий режим
|
||||
Comment[ru]=Перевести компьютер в спящий режим
|
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>LeaveDialog</name>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="20"/>
|
||||
<source>Leave</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="29"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">What do you want the computer to do?</span></p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="45"/>
|
||||
<source>Logout</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="57"/>
|
||||
<source>Reboot</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="69"/>
|
||||
<source>Shutdown</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="81"/>
|
||||
<source>Suspend</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="93"/>
|
||||
<source>Lock screen</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="105"/>
|
||||
<source>Hibernate</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="136"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="51"/>
|
||||
<source>Logout.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="54"/>
|
||||
<source>Lockscreen.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="57"/>
|
||||
<source>Suspend.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="60"/>
|
||||
<source>Hibernate.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="63"/>
|
||||
<source>Shutdown.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="66"/>
|
||||
<source>Reboot.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -0,0 +1,2 @@
|
||||
Name[de]=Verlassen
|
||||
Comment[de]=Beenden-Dialog
|
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de">
|
||||
<context>
|
||||
<name>LeaveDialog</name>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="20"/>
|
||||
<source>Leave</source>
|
||||
<translation>Verlassen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="29"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">What do you want the computer to do?</span></p></body></html></source>
|
||||
<translation><html><head/><body><p><span style=" font-size:12pt;">Was soll der Computer tun?</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="45"/>
|
||||
<source>Logout</source>
|
||||
<translation>Abmelden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="57"/>
|
||||
<source>Reboot</source>
|
||||
<translation>Neustart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="69"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Herunterfahren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="81"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Bereitschaft</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="93"/>
|
||||
<source>Lock screen</source>
|
||||
<translation>Bildschirm sperren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="105"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Tiefschlaf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="136"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Abbrechen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="51"/>
|
||||
<source>Logout.</source>
|
||||
<translation>Abmelden.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="54"/>
|
||||
<source>Lockscreen.</source>
|
||||
<translation>Sperren.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="57"/>
|
||||
<source>Suspend.</source>
|
||||
<translation>Bereitschaft.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="60"/>
|
||||
<source>Hibernate.</source>
|
||||
<translation>Tiefschlaf.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="63"/>
|
||||
<source>Shutdown.</source>
|
||||
<translation>Herunterfahren.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="66"/>
|
||||
<source>Reboot.</source>
|
||||
<translation>Neustart.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -0,0 +1,2 @@
|
||||
Name[hu]=Kiléptetés
|
||||
Comment[hu]=Kiléptető párbeszédablak
|
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="ru">
|
||||
<context>
|
||||
<name>LeaveDialog</name>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="20"/>
|
||||
<source>Form</source>
|
||||
<translation>Űrlap</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="29"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">What do you want the computer to do?</span></p></body></html></source>
|
||||
<translation><html><head/><body><p><span style=" font-size:12pt;">Mi legyen a számítógéppel?</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="45"/>
|
||||
<source>Logout</source>
|
||||
<translation>Kilépés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="55"/>
|
||||
<source>Reboot</source>
|
||||
<translation>Újraindítás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="65"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Kikapcsolás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="75"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Készenlét</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="85"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Mélykészenlét</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="114"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Mégse</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="51"/>
|
||||
<source>Logout.</source>
|
||||
<translation>Kilépés.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="54"/>
|
||||
<source>Lockscreen.</source>
|
||||
<translation>Képernyőzár.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="57"/>
|
||||
<source>Suspend.</source>
|
||||
<translation>Készenlét.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="60"/>
|
||||
<source>Hibernate.</source>
|
||||
<translation>Mélykészenlét.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="63"/>
|
||||
<source>Shutdown.</source>
|
||||
<translation>Kikapcsolás.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="66"/>
|
||||
<source>Reboot.</source>
|
||||
<translation>Újraindítás.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -0,0 +1,2 @@
|
||||
Name[it]=Esci
|
||||
Comment[it]=Opzioni di uscita
|
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="it">
|
||||
<context>
|
||||
<name>LeaveDialog</name>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="20"/>
|
||||
<source>Form</source>
|
||||
<translation>Esci</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="29"/>
|
||||
<source><html><head/><body><p><span style=" font-size:12pt;">What do you want the computer to do?</span></p></body></html></source>
|
||||
<translation><html><head/><body><p><span style=" font-size:12pt;">Terminare la sessione di LXQt?</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="45"/>
|
||||
<source>Logout</source>
|
||||
<translation>Chiudi sessione</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="55"/>
|
||||
<source>Reboot</source>
|
||||
<translation>Riavvia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="65"/>
|
||||
<source>Shutdown</source>
|
||||
<translation>Spegni</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="75"/>
|
||||
<source>Suspend</source>
|
||||
<translation>Sospendi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="85"/>
|
||||
<source>Hibernate</source>
|
||||
<translation>Iberna</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../leavedialog.ui" line="114"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Cancella</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="51"/>
|
||||
<source>Logout.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="54"/>
|
||||
<source>Lockscreen.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="57"/>
|
||||
<source>Suspend.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="60"/>
|
||||
<source>Hibernate.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="63"/>
|
||||
<source>Shutdown.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../main.cpp" line="66"/>
|
||||
<source>Reboot.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -0,0 +1,2 @@
|
||||
Name[ru]=Выйти
|
||||
Comment[ru]=Меню выхода
|
@ -0,0 +1,2 @@
|
||||
Comment[de]=aktuelle Sitzung sperren
|
||||
Name[de]=Bildschirm sperren
|
@ -0,0 +1,2 @@
|
||||
Comment[hu]=A gép zárolása
|
||||
Name[hu]=Képernyőzár
|
@ -0,0 +1,2 @@
|
||||
Name[it]=Blocca schermo
|
||||
Comment[it]=Blocca la sessione attuale
|
@ -0,0 +1,2 @@
|
||||
Name[pt]=Bloquear
|
||||
Comment[pt]=Bloquear a sessão atual
|
@ -0,0 +1,2 @@
|
||||
Name[ru]=Блокировать экран
|
||||
Comment[ru]=Блокировать текущий сеанс
|
@ -0,0 +1,2 @@
|
||||
Comment[de]=Sitzung beenden
|
||||
Name[de]=Abmelden
|
@ -0,0 +1,2 @@
|
||||
Comment[hu]=LXQt munkamenet vége
|
||||
Name[hu]=Kilépés
|
@ -0,0 +1,2 @@
|
||||
Name[it]=Chiudi sessione
|
||||
Comment[it]=Chiudere la sessione attuale
|
@ -0,0 +1,2 @@
|
||||
Name[pt]=Sair
|
||||
Comment[pt]=Sair da sessão
|
@ -0,0 +1,2 @@
|
||||
Name[ru]=Выйти из системы
|
||||
Comment[ru]=Выйти из текущего сеанса
|
@ -0,0 +1,2 @@
|
||||
Comment[de]=Rechner neustarten
|
||||
Name[de]=Neustart
|
@ -0,0 +1,2 @@
|
||||
Comment[hu]=A gép újraindítása
|
||||
Name[hu]=Újraindítás
|
@ -0,0 +1,2 @@
|
||||
Name[it]=Riavvia
|
||||
Comment[it]=Riavviare il computer
|
@ -0,0 +1,2 @@
|
||||
Name[pt]=Reiniciar
|
||||
Comment[pt]=Reiniciar o computador
|
@ -0,0 +1,2 @@
|
||||
Name[ru]=Перезагрузка
|
||||
Comment[ru]=Перезагрузить компьютер
|
@ -0,0 +1,2 @@
|
||||
Comment[de]=Rechner herunterfahren
|
||||
Name[de]=Herunterfahren
|
@ -0,0 +1,2 @@
|
||||
Comment[hu]=A számítógép kikapcsolása
|
||||
Name[hu]=Kikapcsolás
|
@ -0,0 +1,2 @@
|
||||
Name[it]=Arresta
|
||||
Comment[it]=Spegnere il computer
|
@ -0,0 +1,2 @@
|
||||
Name[pt]=Desligar
|
||||
Comment[pt]=Desligar o computador
|
@ -0,0 +1,2 @@
|
||||
Name[ru]=Выключение
|
||||
Comment[ru]=Выключить компьютер
|
@ -0,0 +1,2 @@
|
||||
Comment[de]=Rechner in Bereitschaftsmodus versetzen
|
||||
Name[de]=Bereitschaft
|
@ -0,0 +1,2 @@
|
||||
Comment[hu]=A számítógép készenléti állapotba helyezése
|
||||
Name[hu]=Készenlét
|
@ -0,0 +1,2 @@
|
||||
Name[it]=Sospensione
|
||||
Comment[it]=Sospendere il computer
|
@ -0,0 +1,2 @@
|
||||
Name[pt]=Suspender
|
||||
Comment[pt]=Suspender o computador
|
@ -0,0 +1,2 @@
|
||||
Name[ru]=Ждущий режим
|
||||
Comment[ru]=Перевести компьютер в ждущий режим
|
@ -0,0 +1,99 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXQt - a lightweight, Qt based, desktop toolset
|
||||
* http://lxqt.org
|
||||
*
|
||||
* Copyright: 2015 LXQt team
|
||||
* Authors:
|
||||
* Palo Kisa <palo.kisa@gmail.com>
|
||||
*
|
||||
* This program or 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
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include "UdevNotifier.h"
|
||||
#include <libudev.h>
|
||||
#include <QDebug>
|
||||
#include <QSocketNotifier>
|
||||
|
||||
|
||||
class UdevNotifier::Impl
|
||||
{
|
||||
public:
|
||||
struct udev * udev;
|
||||
struct udev_monitor * monitor;
|
||||
QScopedPointer<QSocketNotifier> notifier;
|
||||
};
|
||||
|
||||
|
||||
UdevNotifier::UdevNotifier(QString const & subsystem, QObject * parent/* = nullptr*/)
|
||||
: QObject(parent)
|
||||
, d(new Impl)
|
||||
{
|
||||
d->udev = udev_new();
|
||||
d->monitor = udev_monitor_new_from_netlink(d->udev, "udev");
|
||||
if (nullptr == d->monitor)
|
||||
{
|
||||
qWarning() << QStringLiteral("UdevNotifier: unable to initialize udev_monitor, monitoring will be disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
int ret = udev_monitor_filter_add_match_subsystem_devtype(d->monitor, subsystem.toUtf8().constData(), nullptr);
|
||||
if (0 != ret)
|
||||
qWarning() << QStringLiteral("UdevNotifier: unable to add match subsystem, monitor will receive all devices");
|
||||
|
||||
ret = udev_monitor_enable_receiving(d->monitor);
|
||||
if (0 != ret)
|
||||
{
|
||||
qWarning() << QStringLiteral("UdevNotifier: unable to enable receiving(%1), monitoring will be disabled").arg(ret);
|
||||
return;
|
||||
}
|
||||
|
||||
d->notifier.reset(new QSocketNotifier(udev_monitor_get_fd(d->monitor), QSocketNotifier::Read));
|
||||
connect(d->notifier.data(), &QSocketNotifier::activated, this, &UdevNotifier::eventReady);
|
||||
d->notifier->setEnabled(true);
|
||||
}
|
||||
|
||||
UdevNotifier::~UdevNotifier()
|
||||
{
|
||||
if (d->monitor)
|
||||
udev_monitor_unref(d->monitor);
|
||||
udev_unref(d->udev);
|
||||
}
|
||||
|
||||
void UdevNotifier::eventReady(int socket)
|
||||
{
|
||||
struct udev_device * dev;
|
||||
while (nullptr != (dev = udev_monitor_receive_device(d->monitor)))
|
||||
{
|
||||
QString const action = udev_device_get_action(dev);
|
||||
QString const device = udev_device_get_devpath(dev);
|
||||
|
||||
if (QStringLiteral("add") == action)
|
||||
emit deviceAdded(std::move(device));
|
||||
else if (QStringLiteral("remove") == action)
|
||||
emit deviceRemoved(std::move(device));
|
||||
else if (QStringLiteral("change") == action)
|
||||
emit deviceChanged(std::move(device));
|
||||
else if (QStringLiteral("online") == action)
|
||||
emit deviceOnline(std::move(device));
|
||||
else if (QStringLiteral("offline") == action)
|
||||
emit deviceOffline(std::move(device));
|
||||
|
||||
udev_device_unref(dev);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
||||
* (c)LGPL2+
|
||||
*
|
||||
* LXQt - a lightweight, Qt based, desktop toolset
|
||||
* http://lxqt.org
|
||||
*
|
||||
* Copyright: 2015 LXQt team
|
||||
* Authors:
|
||||
* Palo Kisa <palo.kisa@gmail.com>
|
||||
*
|
||||
* This program or 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
|
||||
*
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#if !defined(UdevNotifier_h)
|
||||
#define UdevNotifier_h
|
||||
#if defined(WITH_LIBUDEV_MONITOR)
|
||||
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
|
||||
class UdevNotifier : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
UdevNotifier(QString const & subsystem, QObject * parent = nullptr);
|
||||
~UdevNotifier();
|
||||
|
||||
signals:
|
||||
void deviceAdded(QString path);
|
||||
void deviceRemoved(QString path);
|
||||
void deviceChanged(QString path);
|
||||
void deviceOnline(QString path);
|
||||
void deviceOffline(QString path);
|
||||
|
||||
private slots:
|
||||
void eventReady(int socket);
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
|
||||
QScopedPointer<Impl> d;
|
||||
};
|
||||
|
||||
#endif //WITH_LIBUDEV_MONITOR
|
||||
#endif //UdevNotifier_h
|
@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de_DE">
|
||||
<context>
|
||||
<name>LxQtModuleManager</name>
|
||||
<message>
|
||||
<source>LxQt Session Crash Report</source>
|
||||
<translation type="vanished">LxQt Sitzungs-Absturzbericht</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Application '%1' crashed too many times. Its autorestart has been disabled for current session.</source>
|
||||
<translation type="vanished">Anwendung '%1' stürzte zu oft ab. Ihr automatischer Neustart wurde für die aktuelle Sitzung deaktiviert.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/lxqtmodman.cpp" line="289"/>
|
||||
<source>Crash Report</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/lxqtmodman.cpp" line="290"/>
|
||||
<source><b>%1</b> crashed too many times. Its autorestart has been disabled until next login.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WmSelectDialog</name>
|
||||
<message>
|
||||
<source>Welcome to LXDE-Qt</source>
|
||||
<translation type="vanished">Willkommen zu LXDE-Qt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><b>Welcome to LXDE-Qt</b>
|
||||
<p>
|
||||
Before starting to use the LXDE-Qt, you might want to select the Windows Manager:</source>
|
||||
<translation type="vanished"><b>Willkommen zu LXDE-Qt</b>⏎
|
||||
<p>⏎
|
||||
Bevor Sie LXDE-Qt starten, möchten Sie vielleicht einen Fenstermanager auswählen:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>You can change the Window Manager later at any time via LxQt Session Configurator.</source>
|
||||
<translation type="vanished">Sie können den Fenstermanager später durch die LxQt Sitzungs-Konfiguration jederzeit wieder ändern.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.cpp" line="62"/>
|
||||
<source>Other ...</source>
|
||||
<translation>Andere...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.cpp" line="63"/>
|
||||
<source>Choose your favorite one.</source>
|
||||
<translation>Wähle was dir am Besten gefällt.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.ui" line="14"/>
|
||||
<source>Welcome to LXQt</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.ui" line="20"/>
|
||||
<source><html><head/><body><p><span style=" font-weight:600;">Welcome to LXQt</span></p><p>Please select your default Window Manager.</p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.ui" line="71"/>
|
||||
<source>You will be able to change this at any time through Preferences -> Session Settings -> Basic Settings.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,61 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="hu_HU">
|
||||
<TS version="2.0" language="hu_HU">
|
||||
<context>
|
||||
<name>LxQtModuleManager</name>
|
||||
<message>
|
||||
<location filename="../src/lxqtmodman.cpp" line="289"/>
|
||||
<source>Crash Report</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Összeomlás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/lxqtmodman.cpp" line="290"/>
|
||||
<source><b>%1</b> crashed too many times. Its autorestart has been disabled until next login.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>A <b>%1</b> gyorsan többször összeomlott. Az autorestart a következő bejeltkezésig letiltva.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>WmSelectDialog</name>
|
||||
<message>
|
||||
<source>Welcome to LXDE-Qt</source>
|
||||
<translation type="vanished">Üdvözli a LXDE-Qt!</translation>
|
||||
<source>Welcome to LXQt</source>
|
||||
<translation>Üdvözli a LXQt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><b>Welcome to LXDE-Qt</b>
|
||||
<source><b>Welcome to LXQt</b>
|
||||
<p>
|
||||
Before starting to use the LXDE-Qt, you might want to select the Windows Manager:</source>
|
||||
<translation type="vanished"><b>Üdvözli a LXDE-Qt!</b>
|
||||
Before starting to use the LXQt, you might want to select the Windows Manager:</source>
|
||||
<translation><b>Üdvözli a LXQt!</b>
|
||||
<p>
|
||||
Mielőtt elkezdené a LXDE-Qt használatát, válasszon ablakkezelőt:</translation>
|
||||
Mielőtt elkezdené a LXQt használatát, válasszon ablakkezelőt:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>You can change the Window Manager later at any time via LxQt Session Configurator.</source>
|
||||
<translation type="vanished">Az ablakkezelőt később bármikor megváltoztathatja a LxQt munkamenetbeállítóban.</translation>
|
||||
<translation>Az ablakkezelőt később bármikor megváltoztathatja a LxQt munkamenetbeállítóban.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.cpp" line="62"/>
|
||||
<source>Other ...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Más...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.cpp" line="63"/>
|
||||
<source>Choose your favorite one.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Válassz egy kedvencet.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.ui" line="14"/>
|
||||
<source>Welcome to LXQt</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Üdvözli az LXQt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.ui" line="20"/>
|
||||
<source><html><head/><body><p><span style=" font-weight:600;">Welcome to LXQt</span></p><p>Please select your default Window Manager.</p></body></html></source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation><html><head/><body><p><span style=" font-weight:600;">Íme az LXQt!</span></p><p>Ablakkezelőt kell választani.</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/wmselectdialog.ui" line="71"/>
|
||||
<source>You will be able to change this at any time through Preferences -> Session Settings -> Basic Settings.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Ez a választás később módosítható a Beállítások -> Munkamenet beállítás -> Alapbeállítás helyen.</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue