Compare commits
4 Commits
ubuntu/que
...
upstream/0
Author | SHA1 | Date | |
---|---|---|---|
|
2e7cc6bbed | ||
|
ed9ce054e2 | ||
|
6a60f296c0 | ||
|
3e7083d4cb |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
build
|
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
project(lxqt-notificationd)
|
project(lxqt-notificationd)
|
||||||
|
|
||||||
@ -7,6 +7,7 @@ option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" O
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
find_package(Qt5Widgets REQUIRED QUIET)
|
find_package(Qt5Widgets REQUIRED QUIET)
|
||||||
find_package(Qt5DBus REQUIRED QUIET)
|
find_package(Qt5DBus REQUIRED QUIET)
|
||||||
@ -14,11 +15,9 @@ find_package(Qt5LinguistTools REQUIRED QUIET)
|
|||||||
find_package(KF5WindowSystem REQUIRED QUIET)
|
find_package(KF5WindowSystem REQUIRED QUIET)
|
||||||
|
|
||||||
find_package(lxqt REQUIRED QUIET)
|
find_package(lxqt REQUIRED QUIET)
|
||||||
find_package(qt5xdg REQUIRED)
|
|
||||||
|
|
||||||
include(${LXQT_USE_FILE})
|
|
||||||
include(${QTXDG_USE_FILE})
|
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
||||||
include(LXQtTranslate)
|
include(LXQtTranslate)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
project(lxqt-config-notificationd)
|
project(lxqt-config-notificationd)
|
||||||
|
|
||||||
include_directories (
|
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(NOTIFICATIONS_CONF_SRC
|
set(NOTIFICATIONS_CONF_SRC
|
||||||
advancedsettings.cpp
|
advancedsettings.cpp
|
||||||
basicsettings.cpp
|
basicsettings.cpp
|
||||||
@ -19,8 +14,9 @@ set(NOTIFICATIONS_CONF_UI
|
|||||||
|
|
||||||
|
|
||||||
# Translations **********************************
|
# Translations **********************************
|
||||||
lxqt_translate_ts(NOTIFICATIONS_CONF_QM SOURCES
|
lxqt_translate_ts(NOTIFICATIONS_CONF_QM
|
||||||
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
||||||
|
SOURCES
|
||||||
${NOTIFICATIONS_CONF_MOC}
|
${NOTIFICATIONS_CONF_MOC}
|
||||||
${NOTIFICATIONS_CONF_SRC}
|
${NOTIFICATIONS_CONF_SRC}
|
||||||
${NOTIFICATIONS_CONF_UI}
|
${NOTIFICATIONS_CONF_UI}
|
||||||
@ -31,11 +27,9 @@ lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
|||||||
lxqt_translate_desktop(DESKTOP_FILES SOURCES lxqt-config-notificationd.desktop.in)
|
lxqt_translate_desktop(DESKTOP_FILES SOURCES lxqt-config-notificationd.desktop.in)
|
||||||
#************************************************
|
#************************************************
|
||||||
|
|
||||||
qt5_wrap_ui(NOTIFICATIONS_CONF_UI_CPP ${NOTIFICATIONS_CONF_UI})
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
${NOTIFICATIONS_CONF_SRC}
|
${NOTIFICATIONS_CONF_SRC}
|
||||||
${NOTIFICATIONS_CONF_UI_CPP}
|
|
||||||
${NOTIFICATIONS_CONF_QM}
|
${NOTIFICATIONS_CONF_QM}
|
||||||
${DESKTOP_FILES}
|
${DESKTOP_FILES}
|
||||||
${QM_LOADER}
|
${QM_LOADER}
|
||||||
@ -44,8 +38,16 @@ add_executable(${PROJECT_NAME}
|
|||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
KF5::WindowSystem
|
KF5::WindowSystem
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
${LXQT_LIBRARIES}
|
lxqt
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
install(TARGETS
|
||||||
install(FILES ${DESKTOP_FILES} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")
|
${PROJECT_NAME}
|
||||||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
install(FILES
|
||||||
|
${DESKTOP_FILES}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
|
||||||
AdvancedSettings::AdvancedSettings(LxQt::Settings* settings, QWidget *parent):
|
AdvancedSettings::AdvancedSettings(LXQt::Settings* settings, QWidget *parent):
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
mSettings(settings)
|
mSettings(settings)
|
||||||
{
|
{
|
||||||
|
@ -37,14 +37,14 @@ class AdvancedSettings : public QWidget, public Ui::AdvancedSettings
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AdvancedSettings(LxQt::Settings* settings, QWidget* parent = 0);
|
explicit AdvancedSettings(LXQt::Settings* settings, QWidget* parent = 0);
|
||||||
~AdvancedSettings();
|
~AdvancedSettings();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void restoreSettings();
|
void restoreSettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LxQt::Settings* mSettings;
|
LXQt::Settings* mSettings;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void save();
|
void save();
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>340</width>
|
<width>350</width>
|
||||||
<height>284</height>
|
<height>301</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
@ -70,6 +70,12 @@
|
|||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Some notifications set their own on-screen duration.</string>
|
<string>Some notifications set their own on-screen duration.</string>
|
||||||
</property>
|
</property>
|
||||||
@ -92,6 +98,9 @@
|
|||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string> sec</string>
|
<string> sec</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>7200</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
|
|
||||||
BasicSettings::BasicSettings(LxQt::Settings* settings, QWidget *parent) :
|
BasicSettings::BasicSettings(LXQt::Settings* settings, QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
mSettings(settings)
|
mSettings(settings)
|
||||||
{
|
{
|
||||||
@ -39,28 +39,26 @@ BasicSettings::BasicSettings(LxQt::Settings* settings, QWidget *parent) :
|
|||||||
|
|
||||||
restoreSettings();
|
restoreSettings();
|
||||||
|
|
||||||
connect(topLeftButton, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
connect(topLeftRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
connect(topRightButton, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
connect(topCenterRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
connect(bottomRightButton, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
connect(topRightRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
connect(bottomLeftButton, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
connect(centerLeftRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(centerCenterRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(centerRightRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(bottomLeftRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(bottomCenterRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
connect(bottomRightRB, SIGNAL(clicked()), this, SLOT(updateNotification()));
|
||||||
|
|
||||||
LxQt::Notification serverTest;
|
LXQt::Notification serverTest;
|
||||||
QString serverName = serverTest.serverInfo().name;
|
QString serverName = serverTest.serverInfo().name;
|
||||||
if (serverName != "lxqt-notificationd")
|
if (serverName != "lxqt-notificationd")
|
||||||
{
|
{
|
||||||
if (serverName.isEmpty())
|
if (serverName.isEmpty())
|
||||||
{
|
warningLabel->setText(tr("<b>Warning:</b> No notifications daemon is running.\n"
|
||||||
warningLabel->setText(tr(
|
"A fallback will be used."));
|
||||||
"<b>Warning:</b> No notifications daemon is running.\n"
|
|
||||||
"A fallback will be used."));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
warningLabel->setText(tr("<b>Warning:</b> A third-party notifications daemon (%1) is running.\n"
|
||||||
warningLabel->setText(tr(
|
"These settings won't have any effect on it!").arg(serverName));
|
||||||
"<b>Warning:</b> A third-party notifications daemon (%1) is running.\n"
|
|
||||||
"These settings won't have any effect on it!"
|
|
||||||
).arg(serverName));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,33 +68,53 @@ BasicSettings::~BasicSettings()
|
|||||||
|
|
||||||
void BasicSettings::restoreSettings()
|
void BasicSettings::restoreSettings()
|
||||||
{
|
{
|
||||||
QString placement = mSettings->value("placement", "bottom-right").toString().toLower();
|
QString placement = mSettings->value(QStringLiteral("placement"),
|
||||||
if (placement == "bottom-right")
|
QStringLiteral("bottom-right")).toString().toLower();
|
||||||
bottomRightButton->setChecked(true);
|
|
||||||
else if (placement == "bottom-left")
|
if (QStringLiteral("top-left") == placement)
|
||||||
bottomLeftButton->setChecked(true);
|
topLeftRB->setChecked(true);
|
||||||
else if (placement == "top-right")
|
else if (QStringLiteral("top-center") == placement)
|
||||||
topRightButton->setChecked(true);
|
topCenterRB->setChecked(true);
|
||||||
else if (placement == "top-left")
|
else if (QStringLiteral("top-right") == placement)
|
||||||
topLeftButton->setChecked(true);
|
topRightRB->setChecked(true);
|
||||||
else
|
else if (QStringLiteral("center-left") == placement)
|
||||||
bottomRightButton->setChecked(true);
|
centerLeftRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("center-center") == placement)
|
||||||
|
centerCenterRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("center-right") == placement)
|
||||||
|
centerRightRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("bottom-left") == placement)
|
||||||
|
bottomLeftRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("bottom-center") == placement)
|
||||||
|
bottomCenterRB->setChecked(true);
|
||||||
|
else if (QStringLiteral("bottom-right") == placement)
|
||||||
|
bottomRightRB->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BasicSettings::updateNotification()
|
void BasicSettings::updateNotification()
|
||||||
{
|
{
|
||||||
if (bottomRightButton->isChecked())
|
QString align;
|
||||||
mSettings->setValue("placement", "bottom-right");
|
if (topLeftRB->isChecked())
|
||||||
else if (bottomLeftButton->isChecked())
|
align = QStringLiteral("top-left");
|
||||||
mSettings->setValue("placement", "bottom-left");
|
else if (topCenterRB->isChecked())
|
||||||
else if (topRightButton->isChecked())
|
align = QStringLiteral("top-center");
|
||||||
mSettings->setValue("placement", "top-right");
|
else if (topRightRB->isChecked())
|
||||||
else if (topLeftButton->isChecked())
|
align = QStringLiteral("top-right");
|
||||||
mSettings->setValue("placement", "top-left");
|
else if (centerLeftRB->isChecked())
|
||||||
|
align = QStringLiteral("center-left");
|
||||||
|
else if (centerCenterRB->isChecked())
|
||||||
|
align = QStringLiteral("center-center");
|
||||||
|
else if (centerRightRB->isChecked())
|
||||||
|
align = QStringLiteral("center-right");
|
||||||
|
else if (bottomLeftRB->isChecked())
|
||||||
|
align = QStringLiteral("bottom-left");
|
||||||
|
else if (bottomCenterRB->isChecked())
|
||||||
|
align = QStringLiteral("bottom-center");
|
||||||
|
else // if (bottomRightRB->isChecked())
|
||||||
|
align = QStringLiteral("bottom-right");
|
||||||
|
|
||||||
LxQt::Notification::notify(//"lxqt-config-notificationd",
|
mSettings->setValue(QStringLiteral("placement"), align);
|
||||||
tr("Notification demo"),
|
LXQt::Notification::notify(tr("Notification demo ") + align,
|
||||||
tr("This is a test notification.\n"
|
tr("This is a test notification.\n All notifications will now appear here on LXQt."),
|
||||||
"All notifications will now appear here on LXQt."),
|
QStringLiteral("lxqt-logo.png"));
|
||||||
"lxqt-logo.png");
|
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ class BasicSettings : public QWidget, public Ui::BasicSettings
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit BasicSettings(LxQt::Settings* settings, QWidget* parent = 0);
|
explicit BasicSettings(LXQt::Settings* settings, QWidget* parent = 0);
|
||||||
~BasicSettings();
|
~BasicSettings();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
@ -47,7 +47,7 @@ private slots:
|
|||||||
void updateNotification();
|
void updateNotification();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LxQt::Settings* mSettings;
|
LXQt::Settings* mSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BASICSETTINGS_H
|
#endif // BASICSETTINGS_H
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>244</width>
|
<width>148</width>
|
||||||
<height>218</height>
|
<height>179</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@ -24,44 +24,144 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Position on screen</string>
|
<string>Position on screen</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="2" column="4">
|
||||||
<widget class="QRadioButton" name="topLeftButton">
|
<widget class="QRadioButton" name="bottomRightRB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Top/Left</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QRadioButton" name="centerRightRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QRadioButton" name="centerCenterRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QRadioButton" name="topRightButton">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="text">
|
<property name="orientation">
|
||||||
<string>Top/Right</string>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QRadioButton" name="topCenterRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QRadioButton" name="bottomCenterRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="topLeftRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QRadioButton" name="topRightRB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QRadioButton" name="bottomLeftButton">
|
<widget class="QRadioButton" name="centerLeftRB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Bottom/Left</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="2" column="0">
|
||||||
<widget class="QRadioButton" name="bottomRightButton">
|
<widget class="QRadioButton" name="bottomLeftRB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Bottom/Right</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">buttonGroup</string>
|
||||||
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
@ -74,7 +174,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item>
|
||||||
<widget class="QLabel" name="warningLabel">
|
<widget class="QLabel" name="warningLabel">
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -85,4 +185,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
<buttongroups>
|
||||||
|
<buttongroup name="buttonGroup"/>
|
||||||
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -6,6 +6,6 @@ Comment=Configure desktop notifications
|
|||||||
Exec=lxqt-config-notificationd
|
Exec=lxqt-config-notificationd
|
||||||
Icon=preferences-desktop-theme
|
Icon=preferences-desktop-theme
|
||||||
Categories=Settings;DesktopSettings;Qt;LXQt;
|
Categories=Settings;DesktopSettings;Qt;LXQt;
|
||||||
OnlyShowIn=LXQt;LXDE;
|
OnlyShowIn=LXQt;
|
||||||
|
|
||||||
#TRANSLATIONS_DIR=translations
|
#TRANSLATIONS_DIR=translations
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
LxQt::SingleApplication a(argc, argv);
|
LXQt::SingleApplication a(argc, argv);
|
||||||
|
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.setWindowIcon(QIcon::fromTheme("preferences-desktop-theme"));
|
w.setWindowIcon(QIcon::fromTheme("preferences-desktop-theme"));
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
LxQt::ConfigDialog(tr("Desktop Notifications"), new LxQt::Settings("notifications"), parent)
|
LXQt::ConfigDialog(tr("Desktop Notifications"), new LXQt::Settings("notifications"), parent)
|
||||||
{
|
{
|
||||||
BasicSettings* basic = new BasicSettings(mSettings, this);
|
BasicSettings* basic = new BasicSettings(mSettings, this);
|
||||||
addPage(basic, tr("Basic Settings"), "preferences-desktop-notification");
|
addPage(basic, tr("Basic Settings"), "preferences-desktop-notification");
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <LXQt/ConfigDialog>
|
#include <LXQt/ConfigDialog>
|
||||||
|
|
||||||
|
|
||||||
class MainWindow : public LxQt::ConfigDialog
|
class MainWindow : public LXQt::ConfigDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -1,105 +1,100 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE TS>
|
<!DOCTYPE TS>
|
||||||
<TS version="2.0" language="en_US">
|
<TS version="2.1">
|
||||||
<context>
|
<context>
|
||||||
<name>AdvancedSettings</name>
|
<name>AdvancedSettings</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Menu Configuration</source>
|
<location filename="../advancedsettings.ui" line="17"/>
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Notification Duration</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>For some the notification's expiration time is dependent on the notification server's settings.</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>"Server Decides" Time:</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source> sec</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Sizes</source>
|
<source>Sizes</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Notification Spacing:</source>
|
<location filename="../advancedsettings.ui" line="25"/>
|
||||||
|
<source>Width:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="32"/>
|
||||||
|
<location filename="../advancedsettings.ui" line="56"/>
|
||||||
<source> px</source>
|
<source> px</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Notification Width:</source>
|
<location filename="../advancedsettings.ui" line="49"/>
|
||||||
|
<source>Spacing:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="68"/>
|
||||||
|
<source>Duration</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="74"/>
|
||||||
|
<source>Some notifications set their own on-screen duration.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="86"/>
|
||||||
|
<source>Default duration:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="93"/>
|
||||||
|
<source> sec</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>BasicSettings</name>
|
<name>BasicSettings</name>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="23"/>
|
||||||
<source>Basic Settings</source>
|
<source>Basic Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Display Notifications</source>
|
<location filename="../basicsettings.ui" line="30"/>
|
||||||
<translation type="unfinished"></translation>
|
<source>Position on screen</source>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Top/Left</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Top/Right</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Bottom/Left</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Bottom/Right</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Test Notification</source>
|
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="57"/>
|
||||||
<source><b>Warning:</b> No notifications daemon is running.
|
<source><b>Warning:</b> No notifications daemon is running.
|
||||||
A fallback will be used.</source>
|
A fallback will be used.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="60"/>
|
||||||
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||||
These settings won't have an effect on it!</source>
|
These settings won't have any effect on it!</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Notification Summary</source>
|
<location filename="../basicsettings.cpp" line="117"/>
|
||||||
|
<source>Notification demo </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Notification Body</source>
|
<location filename="../basicsettings.cpp" line="118"/>
|
||||||
|
<source>This is a test notification.
|
||||||
|
All notifications will now appear here on LXQt.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="40"/>
|
||||||
<source>Desktop Notifications</source>
|
<source>Desktop Notifications</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="43"/>
|
||||||
<source>Basic Settings</source>
|
<source>Basic Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="47"/>
|
||||||
<source>Advanced Settings</source>
|
<source>Advanced Settings</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[cs]=Nastavení oznamování v LxQtu
|
GenericName[cs]=Nastavení oznamování v LXQtu
|
||||||
Name[cs]=Nastavení oznamování v LxQtu
|
Name[cs]=Nastavení oznamování v LXQtu
|
||||||
Comment[cs]=Nastavit oznamování na ploše LxQt
|
Comment[cs]=Nastavit oznamování na ploše LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[cs_CZ]=Nastavení oznamování v LxQtu
|
GenericName[cs_CZ]=Nastavení oznamování v LXQtu
|
||||||
Name[cs_CZ]=Nastavení oznamování v LxQtu
|
Name[cs_CZ]=Nastavení oznamování v LXQtu
|
||||||
Comment[cs_CZ]=Nastavit oznamování na ploše LxQt
|
Comment[cs_CZ]=Nastavit oznamování na ploše LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[da]=Notesblok
|
GenericName[da]=Notesblok
|
||||||
Name[da]=Strømstyring
|
Name[da]=Strømstyring
|
||||||
Comment[da]=Indstil freedesktop meddelelser på LxQt skrivebord
|
Comment[da]=Indstil freedesktop meddelelser på LXQt skrivebord
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[da_DK]=LxQt freedesktop Meddelelsesindstillinger
|
GenericName[da_DK]=LXQt freedesktop Meddelelsesindstillinger
|
||||||
Name[da_DK]=LxQt freedesktop Meddelelsesindstillinger
|
Name[da_DK]=LXQt freedesktop Meddelelsesindstillinger
|
||||||
Comment[da_DK]=Indstil freedesktop meddelelser på LxQt skrivebord
|
Comment[da_DK]=Indstil freedesktop meddelelser på LXQt skrivebord
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[de]=LxQt Konfigurations Center
|
Name[de]=Mitteilungen der Arbeitsfläche
|
||||||
Name[de]=LxQt Konfiguration
|
GenericName[de]=LXQt Mitteilungseinstellungen
|
||||||
|
Comment[de]=Konfiguration von Benachrichtigungen
|
105
config/translations/lxqt-config-notificationd_de.ts
Normal file
105
config/translations/lxqt-config-notificationd_de.ts
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="de">
|
||||||
|
<context>
|
||||||
|
<name>AdvancedSettings</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="17"/>
|
||||||
|
<source>Sizes</source>
|
||||||
|
<translation>Größen</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="25"/>
|
||||||
|
<source>Width:</source>
|
||||||
|
<translation>Breite:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="32"/>
|
||||||
|
<location filename="../advancedsettings.ui" line="56"/>
|
||||||
|
<source> px</source>
|
||||||
|
<translation> px</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="49"/>
|
||||||
|
<source>Spacing:</source>
|
||||||
|
<translation>Abstand:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="68"/>
|
||||||
|
<source>Duration</source>
|
||||||
|
<translation>Dauer</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="74"/>
|
||||||
|
<source>Some notifications set their own on-screen duration.</source>
|
||||||
|
<translation>Einige Benachrichtigungen setzen ihre eigene Anzeigedauer.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="86"/>
|
||||||
|
<source>Default duration:</source>
|
||||||
|
<translation>Standarddauer:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="93"/>
|
||||||
|
<source> sec</source>
|
||||||
|
<translation> s</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>BasicSettings</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="23"/>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation>Grundeinstellungen</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="30"/>
|
||||||
|
<source>Position on screen</source>
|
||||||
|
<translation>Position auf dem Bildschirm</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="57"/>
|
||||||
|
<source><b>Warning:</b> No notifications daemon is running.
|
||||||
|
A fallback will be used.</source>
|
||||||
|
<translation><b>Warnung:</b> Es läuft kein Benachrichtigungsdaemon.
|
||||||
|
Ein Ersatz wird verwendet.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="60"/>
|
||||||
|
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||||
|
These settings won't have any effect on it!</source>
|
||||||
|
<translation><b>Warnung:</b> Ein anderer Benachrichtigungsdaemon (%1) läuft.
|
||||||
|
Diese Einstellungen wirken sich auf ihn nicht aus!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="117"/>
|
||||||
|
<source>Notification demo </source>
|
||||||
|
<translation>Testbenachrichtigung </translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="118"/>
|
||||||
|
<source>This is a test notification.
|
||||||
|
All notifications will now appear here on LXQt.</source>
|
||||||
|
<translation>Dies ist eine Testbenachrichtigung.
|
||||||
|
Alle Benachrichtigungen erscheinen jetzt hier auf LXQt.</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="40"/>
|
||||||
|
<source>Desktop Notifications</source>
|
||||||
|
<translation>Arbeitsflächenbenachrichtigungen</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="43"/>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation>Grundeinstellungen</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="47"/>
|
||||||
|
<source>Advanced Settings</source>
|
||||||
|
<translation>Erweiterte Einstellungen</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[de_DE]=Anwendungsmenü
|
|
||||||
Name[de_DE]=LxQt Freedesktop Mitteilungen Konfiguration
|
|
||||||
Comment[de_DE]=Freedesktop Mitteilungen für LxQt Desktop konfigurieren
|
|
4
config/translations/lxqt-config-notificationd_el.desktop
Normal file
4
config/translations/lxqt-config-notificationd_el.desktop
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Translations
|
||||||
|
Name[el]=Ειδοποιήσεις επιφάνειας εργασίας
|
||||||
|
GenericName[el]=Ρυθμίσεις ειδοποιήσεων LXQt
|
||||||
|
Comment[el]=Διαμόρφωση των ειδοποιήσεων της επιφάνειας εργασίας LXQt
|
105
config/translations/lxqt-config-notificationd_el.ts
Normal file
105
config/translations/lxqt-config-notificationd_el.ts
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="el">
|
||||||
|
<context>
|
||||||
|
<name>AdvancedSettings</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="17"/>
|
||||||
|
<source>Sizes</source>
|
||||||
|
<translation>Μεγέθη</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="25"/>
|
||||||
|
<source>Width:</source>
|
||||||
|
<translation>Πλάτος:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="32"/>
|
||||||
|
<location filename="../advancedsettings.ui" line="56"/>
|
||||||
|
<source> px</source>
|
||||||
|
<translation> εικ</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="49"/>
|
||||||
|
<source>Spacing:</source>
|
||||||
|
<translation>Απόσταση:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="68"/>
|
||||||
|
<source>Duration</source>
|
||||||
|
<translation>Διάρκεια</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="74"/>
|
||||||
|
<source>Some notifications set their own on-screen duration.</source>
|
||||||
|
<translation>Μερικές ειδοποιήσεις καθορίζουν τη δική τους διάρκεια εμφάνισης.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="86"/>
|
||||||
|
<source>Default duration:</source>
|
||||||
|
<translation>Διάρκεια εξ ορισμού:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="93"/>
|
||||||
|
<source> sec</source>
|
||||||
|
<translation> δευτ</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>BasicSettings</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="23"/>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation>Βασικές ρυθμίσεις</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="30"/>
|
||||||
|
<source>Position on screen</source>
|
||||||
|
<translation>Θέση στην οθόνη</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="57"/>
|
||||||
|
<source><b>Warning:</b> No notifications daemon is running.
|
||||||
|
A fallback will be used.</source>
|
||||||
|
<translation><b>Προειδοποίηση:</b> Δεν εκτελείται κάποιος δαίμονας ειδοποιήσεων
|
||||||
|
Θα χρησιμοποιηθεί η ανακατεύθυνση.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="60"/>
|
||||||
|
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||||
|
These settings won't have any effect on it!</source>
|
||||||
|
<translation><b>Προειδοποίηση:</b> Εκτελείται ένας δαίμονας ειδοποιήσεων τρίτων (%1).
|
||||||
|
Αυτές οι ρυθμίσεις δεν θα έχουν κάποια επίδραση σε αυτόν!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="117"/>
|
||||||
|
<source>Notification demo </source>
|
||||||
|
<translation>Επίδειξη ειδοποιήσεων </translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="118"/>
|
||||||
|
<source>This is a test notification.
|
||||||
|
All notifications will now appear here on LXQt.</source>
|
||||||
|
<translation>Αυτή είναι μια δοκιμαστική ειδοποίηση.
|
||||||
|
Όλες οι ειδοποιήσεις στο LXQt θα εμφανίζονται εδώ.</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="40"/>
|
||||||
|
<source>Desktop Notifications</source>
|
||||||
|
<translation>Ειδοποιήσεις επιφάνειας εργασίας</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="43"/>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation>Βασικές ρυθμίσεις</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="47"/>
|
||||||
|
<source>Advanced Settings</source>
|
||||||
|
<translation>Προηγμένες ρυθμίσεις</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[el_GR]=Διαμόρφωση ειδοποιήσεων LxQt
|
|
||||||
Name[el_GR]=Διαμόρφωση ειδοποιήσεων LxQt
|
|
||||||
Comment[el_GR]=Διαμόρφωση ειδοποιήσεων στην επιφάνεια εργασίας LxQt
|
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[eo]=Agordoj de muso por LxQto
|
GenericName[eo]=Agordoj de muso por LXQto
|
||||||
Name[eo]=Agordoj de muso por LxQto
|
Name[eo]=Agordoj de muso por LXQto
|
||||||
Comment[eo]=Agordi atentigojn de freedesktop en LxQt-labortablo
|
Comment[eo]=Agordi atentigojn de freedesktop en LXQt-labortablo
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[es]=Administrador de tareas
|
GenericName[es]=Administrador de tareas
|
||||||
Name[es]=Configuración de sesiones LxQt
|
Name[es]=Configuración de sesiones LXQt
|
||||||
Comment[es]=Configure las notificacionde de freedesktop en el escritorio LxQt
|
Comment[es]=Configure las notificacionde de freedesktop en el escritorio LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[es_VE]=Configuracion de notificaciones de Escritorio LxQt
|
GenericName[es_VE]=Configuracion de notificaciones de Escritorio LXQt
|
||||||
Name[es_VE]=Configuracion de notificaciones de Escritorio LxQt
|
Name[es_VE]=Configuracion de notificaciones de Escritorio LXQt
|
||||||
Comment[es_VE]=Configura las notificacones en el Escritoro LxQt
|
Comment[es_VE]=Configura las notificacones en el Escritoro LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[eu]=LxQt Freedesktop jakinarazpenen konfigurazioa
|
GenericName[eu]=LXQt Freedesktop jakinarazpenen konfigurazioa
|
||||||
Name[eu]=LxQt Freedesktop jakinarazpenen konfigurazioa
|
Name[eu]=LXQt Freedesktop jakinarazpenen konfigurazioa
|
||||||
Comment[eu]=Konfiguratu LxQt mahaigaineko Freedesktop jakinarazpenak
|
Comment[eu]=Konfiguratu LXQt mahaigaineko Freedesktop jakinarazpenak
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[fi]=LxQt-työpöydän ilmoitusasetukset
|
GenericName[fi]=LXQt-työpöydän ilmoitusasetukset
|
||||||
Name[fi]=LxQt-työpöydän ilmoitusasetukset
|
Name[fi]=LXQt-työpöydän ilmoitusasetukset
|
||||||
Comment[fi]=Muokkaa LxQt-työpöydän ilmoituksia
|
Comment[fi]=Muokkaa LXQt-työpöydän ilmoituksia
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[fr_FR]=Bloc-notes
|
GenericName[fr_FR]=Paramétrage des notifications du bureau
|
||||||
Name[fr_FR]=Paramétreur de session LxQt
|
Name[fr_FR]=Paramétrage notifications
|
||||||
|
107
config/translations/lxqt-config-notificationd_hr.ts
Normal file
107
config/translations/lxqt-config-notificationd_hr.ts
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.0" language="hr_HR">
|
||||||
|
<context>
|
||||||
|
<name>AdvancedSettings</name>
|
||||||
|
<message>
|
||||||
|
<source>Menu Configuration</source>
|
||||||
|
<translation type="unfinished">Konfiguracija izbornika</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Duration</source>
|
||||||
|
<translation type="unfinished">Trajanje obavijesti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>For some the notification's expiration time is dependent on the notification server's settings.</source>
|
||||||
|
<translation type="unfinished">Za neke obavijesti's vrijeme istjecanja ovisi o postavkama poslužitelja's obavijesti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>"Server Decides" Time:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source> sec</source>
|
||||||
|
<translation type="unfinished">sek</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Sizes</source>
|
||||||
|
<translation type="unfinished">Veličine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Spacing:</source>
|
||||||
|
<translation type="unfinished">Razmak obavijesti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source> px</source>
|
||||||
|
<translation type="unfinished"> px</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Width:</source>
|
||||||
|
<translation type="unfinished">Širina obavijesti</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>BasicSettings</name>
|
||||||
|
<message>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation type="unfinished">Osnovne postavke</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display Notifications</source>
|
||||||
|
<translation type="unfinished">Prikaži obavijesti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Top/Left</source>
|
||||||
|
<translation type="unfinished">Gore/lijevo</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Top/Right</source>
|
||||||
|
<translation type="unfinished">Gore/desno</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Bottom/Left</source>
|
||||||
|
<translation type="unfinished">Dolje/lijevo</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Bottom/Right</source>
|
||||||
|
<translation type="unfinished">Dolje/desno</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Test Notification</source>
|
||||||
|
<translation type="unfinished">Isprobaj obavijesti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source><b>Warning:</b> No notifications daemon is running.
|
||||||
|
A fallback will be used.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||||
|
These settings won't have an effect on it!</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Summary</source>
|
||||||
|
<translation type="unfinished">Sažetak obavijesti</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Body</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<source>Desktop Notifications</source>
|
||||||
|
<translation type="unfinished">Obavijesti radne površine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation type="unfinished">Osnovne postavke</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Advanced Settings</source>
|
||||||
|
<translation type="unfinished">Napredne postavke</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[hu]=Alkalmazásmenü
|
GenericName[hu]=Az asztali értesítések beállítása
|
||||||
Name[hu]=LxQt beállítóközpont
|
Name[hu]=LXQt értesítések beállítása
|
||||||
Comment[hu]=A Freedesktop értesítések beállítása
|
Comment[hu]=A felbukkanó értesítések beállítása
|
||||||
|
125
config/translations/lxqt-config-notificationd_hu.ts
Normal file
125
config/translations/lxqt-config-notificationd_hu.ts
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="hu_HU">
|
||||||
|
<context>
|
||||||
|
<name>AdvancedSettings</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="17"/>
|
||||||
|
<source>Sizes</source>
|
||||||
|
<translation>Méret</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="25"/>
|
||||||
|
<source>Width:</source>
|
||||||
|
<translation>Szélesség:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="32"/>
|
||||||
|
<location filename="../advancedsettings.ui" line="56"/>
|
||||||
|
<source> px</source>
|
||||||
|
<translation> pixel</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="49"/>
|
||||||
|
<source>Spacing:</source>
|
||||||
|
<translation>Térköz:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="68"/>
|
||||||
|
<source>Duration</source>
|
||||||
|
<translation>Tartam</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="74"/>
|
||||||
|
<source>Some notifications set their own on-screen duration.</source>
|
||||||
|
<translation>Egyes értesítések megjelenési ideje</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="86"/>
|
||||||
|
<source>Default duration:</source>
|
||||||
|
<translation>Alapértelmezett tartam:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../advancedsettings.ui" line="93"/>
|
||||||
|
<source> sec</source>
|
||||||
|
<translation> mp</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>BasicSettings</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="23"/>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation>Alapbeállítások</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="30"/>
|
||||||
|
<source>Position on screen</source>
|
||||||
|
<translation>Hely</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="36"/>
|
||||||
|
<source>Top/Left</source>
|
||||||
|
<translation>Balra fenn</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="43"/>
|
||||||
|
<source>Top/Right</source>
|
||||||
|
<translation>Jobbra fenn</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="50"/>
|
||||||
|
<source>Bottom/Left</source>
|
||||||
|
<translation>Balra lenn</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.ui" line="57"/>
|
||||||
|
<source>Bottom/Right</source>
|
||||||
|
<translation>Jobbra lenn</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="53"/>
|
||||||
|
<source><b>Warning:</b> No notifications daemon is running.
|
||||||
|
A fallback will be used.</source>
|
||||||
|
<translation><b>Figyelem:</b> Értesítő démon nem fut.
|
||||||
|
A vésztartalék használatos.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="59"/>
|
||||||
|
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||||
|
These settings won't have any effect on it!</source>
|
||||||
|
<translation><b>Figyelem:</b> A (%1) démont már valaki futtatja.
|
||||||
|
Ezek a beállítások arra már hatástalanok!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="98"/>
|
||||||
|
<source>Notification demo</source>
|
||||||
|
<translation>Értesítési bemutató</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../basicsettings.cpp" line="99"/>
|
||||||
|
<source>This is a test notification.
|
||||||
|
All notifications will now appear here on LXQt.</source>
|
||||||
|
<translation>Az értesítés tesztje
|
||||||
|
Minden értesítést megjelenít az LXQt.</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="40"/>
|
||||||
|
<source>Desktop Notifications</source>
|
||||||
|
<translation>Asztali értesítések</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="43"/>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation>Alapbeállítások</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../mainwindow.cpp" line="47"/>
|
||||||
|
<source>Advanced Settings</source>
|
||||||
|
<translation>Haladó beállítások</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
@ -1,3 +1,3 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[id_ID]=Hell World
|
GenericName[id_ID]=Hell World
|
||||||
Name[id_ID]=Konfigurator Desktop LxQt
|
Name[id_ID]=Konfigurator Desktop LXQt
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[it]=Centro di Configurazione LxQt
|
GenericName[it]=Notifiche
|
||||||
Name[it]=Configura LxQt
|
Name[it]=Configura notifiche
|
||||||
|
Comment[it]=Configura le notifiche Freedesktop del Desktop LXQt
|
||||||
|
110
config/translations/lxqt-config-notificationd_it.ts
Normal file
110
config/translations/lxqt-config-notificationd_it.ts
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="it">
|
||||||
|
<context>
|
||||||
|
<name>AdvancedSettings</name>
|
||||||
|
<message>
|
||||||
|
<source>Menu Configuration</source>
|
||||||
|
<translation>Configurazione del menu</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Duration</source>
|
||||||
|
<translation>Durata delle notifiche</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>For some the notification's expiration time is dependent on the notification server's settings.</source>
|
||||||
|
<translation>Per alcune notifiche il tempo dipende dalle impostazioni del server delle notifiche.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>"Server Decides" Time:</source>
|
||||||
|
<translation>Tempo di decisioni del server:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source> sec</source>
|
||||||
|
<translation> sec</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Sizes</source>
|
||||||
|
<translation>Dimensione</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Spacing:</source>
|
||||||
|
<translatorcomment>a cosa si riferisce??</translatorcomment>
|
||||||
|
<translation type="unfinished">Spazing:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source> px</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Width:</source>
|
||||||
|
<translation>Larghezza:</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>BasicSettings</name>
|
||||||
|
<message>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation>Impostazioni base</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Display Notifications</source>
|
||||||
|
<translation>Mostra notifiche</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Top/Left</source>
|
||||||
|
<translation>Alto a sinistra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Top/Right</source>
|
||||||
|
<translation>Alto a destra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Bottom/Left</source>
|
||||||
|
<translation>Fondo a sinistra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Bottom/Right</source>
|
||||||
|
<translation>Fondo a destra</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Test Notification</source>
|
||||||
|
<translation>Notifica di prova</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source><b>Warning:</b> No notifications daemon is running.
|
||||||
|
A fallback will be used.</source>
|
||||||
|
<translation><b>Attenzione:</b> Nessun demone di notifiche è in esecuzione.
|
||||||
|
Sarà usato un sistema di riserva.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source><b>Warning:</b> A third-party notifications daemon (%1) is running.
|
||||||
|
These settings won't have an effect on it!</source>
|
||||||
|
<translation><b>Attenzione:</b> Un altro demone di notifiche (%1) è in esecuzione.
|
||||||
|
Queste impostazioni non avranno effetto su quello!</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Summary</source>
|
||||||
|
<translation>Sommario della notifica</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Notification Body</source>
|
||||||
|
<translation>Corpo della notifica</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<source>Desktop Notifications</source>
|
||||||
|
<translation type="unfinished">Notificazioni Desktop</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Basic Settings</source>
|
||||||
|
<translation>Impostazioni base</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Advanced Settings</source>
|
||||||
|
<translation>Impostazioni avanzate</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
GenericName[it_IT]=Esci
|
|
||||||
Name[it_IT]=Esci dal sistema
|
|
||||||
Comment[it_IT]=Configura le notifiche freedesktop nel desktop LxQt
|
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[ja]=LxQtフリーデスクトップ通知の設定
|
GenericName[ja]=LXQtフリーデスクトップ通知の設定
|
||||||
Name[ja]=LxQtフリーデスクトップ通知の設定
|
Name[ja]=LXQtフリーデスクトップ通知の設定
|
||||||
Comment[ja]=LxQtデスクトップでフリーデスクトップ通知を設定
|
Comment[ja]=LXQtデスクトップでフリーデスクトップ通知を設定
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[lt]=Qlipper
|
GenericName[lt]=Qlipper
|
||||||
Name[lt]=Energijos naudojimo nustatymai
|
Name[lt]=Energijos naudojimo nustatymai
|
||||||
Comment[lt]=Konfigūruoti freedesktop pranešimus LxQt darbalaukyje
|
Comment[lt]=Konfigūruoti freedesktop pranešimus LXQt darbalaukyje
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[nl]=Notepad
|
GenericName[nl]=Notepad
|
||||||
Name[nl]=Energiebeheer
|
Name[nl]=Energiebeheer
|
||||||
Comment[nl]=Configureren freedesktop meldingen in LxQt desktop
|
Comment[nl]=Configureren freedesktop meldingen in LXQt desktop
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[pl]=Menu
|
GenericName[pl]=Menu
|
||||||
Name[pl]=Panel sterowania LxQt
|
Name[pl]=Panel sterowania LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[pl_PL]=Konfiguracja wyglądu LxQt
|
GenericName[pl_PL]=Konfiguracja wyglądu LXQt
|
||||||
Name[pl_PL]=Konfiguracja wyglądu LxQt
|
Name[pl_PL]=Konfiguracja wyglądu LXQt
|
||||||
Comment[pl_PL]=Konfiguruj powiadomienia freedesktop w LxQt
|
Comment[pl_PL]=Konfiguruj powiadomienia freedesktop w LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[pt_BR]=Suspender Automaticamente
|
GenericName[pt_BR]=Suspender Automaticamente
|
||||||
Name[pt_BR]=Gerenciamento de energia
|
Name[pt_BR]=Gerenciamento de energia
|
||||||
Comment[pt_BR]=Configurar as notificações do freedesktop na área de trabalho do LxQt
|
Comment[pt_BR]=Configurar as notificações do freedesktop na área de trabalho do LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[ro_RO]=Părăsește
|
GenericName[ro_RO]=Părăsește
|
||||||
Name[ro_RO]=Părăsește sistemul
|
Name[ro_RO]=Părăsește sistemul
|
||||||
Comment[ro_RO]=Configurează notificările freedesktop în desktop-ul LxQt
|
Comment[ro_RO]=Configurează notificările freedesktop în desktop-ul LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[ru]=Настройки уведомлений LxQt
|
GenericName[ru]=Настройки уведомлений LXQt
|
||||||
Name[ru]=Уведомления рабочего стола
|
Name[ru]=Уведомления рабочего стола
|
||||||
Comment[ru]=Настроить уведомления рабочего стола
|
Comment[ru]=Настроить уведомления рабочего стола
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[ru]=Настройки уведомлений LxQt
|
GenericName[ru_RU]=Настройки уведомлений LXQt
|
||||||
Name[ru]=Уведомления рабочего стола
|
Name[ru_RU]=Уведомления рабочего стола
|
||||||
Comment[ru]=Настроить уведомления рабочего стола
|
Comment[ru_RU]=Настроить уведомления рабочего стола
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[sl]=Nastavitve obvestil
|
GenericName[sl]=Nastavitve obvestil
|
||||||
Name[sl]=Nastavitve obvestil na namizju
|
Name[sl]=Nastavitve obvestil na namizju
|
||||||
Comment[sl]=Nastavite obvestila na namizju LxQt
|
Comment[sl]=Nastavite obvestila na namizju LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LxQt Freedesktop
|
GenericName[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LXQt Freedesktop
|
||||||
Name[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LxQt Freedesktop
|
Name[th_TH]=การตั้งค่าการเตือนต่างๆ ของ LXQt Freedesktop
|
||||||
Comment[th_TH]=ตั้งค่าการเตือนต่างๆ ของ freedesktop ในเดสก์ท็อป LxQt
|
Comment[th_TH]=ตั้งค่าการเตือนต่างๆ ของ freedesktop ในเดสก์ท็อป LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[tr]=Not Defteri
|
GenericName[tr]=Not Defteri
|
||||||
Name[tr]=Güç yönetimi
|
Name[tr]=Güç yönetimi
|
||||||
Comment[tr]=LxQt masaüstünde freedesktop bildirimlerini ayarla
|
Comment[tr]=LXQt masaüstünde freedesktop bildirimlerini ayarla
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[uk]=Налаштування Freedesktop сповіщень LxQt
|
GenericName[uk]=Налаштування Freedesktop сповіщень LXQt
|
||||||
Name[uk]=Налаштування Freedesktop сповіщень LxQt
|
Name[uk]=Налаштування Freedesktop сповіщень LXQt
|
||||||
Comment[uk]=Налаштувати Freedesktop сповіщення в стільниці LxQt
|
Comment[uk]=Налаштувати Freedesktop сповіщення в стільниці LXQt
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[zh_CN]=qxkb
|
GenericName[zh_CN]=qxkb
|
||||||
Name[zh_CN]=LxQt 通知配置
|
Name[zh_CN]=LXQt 通知配置
|
||||||
Comment[zh_CN]=配置 LxQt 桌面的通知
|
Comment[zh_CN]=配置 LXQt 桌面的通知
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
GenericName[zh_TW]=LxQt通知設定
|
GenericName[zh_TW]=LXQt通知設定
|
||||||
Name[zh_TW]=LxQt通知設定
|
Name[zh_TW]=LXQt通知設定
|
||||||
Comment[zh_TW]=LxQt桌面上的FreeDesktop通知設定
|
Comment[zh_TW]=LXQt桌面上的FreeDesktop通知設定
|
||||||
|
@ -1,8 +1,3 @@
|
|||||||
include_directories(
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
||||||
)
|
|
||||||
|
|
||||||
set(NOTIFICATIONS_SRC
|
set(NOTIFICATIONS_SRC
|
||||||
main.cpp
|
main.cpp
|
||||||
notificationarea.cpp
|
notificationarea.cpp
|
||||||
@ -16,15 +11,15 @@ set(NOTIFICATIONS_UI
|
|||||||
notification.ui
|
notification.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
qt5_wrap_ui(NOTIFICATIONS_UI_CPP ${NOTIFICATIONS_UI})
|
|
||||||
qt5_add_dbus_adaptor(NOTIFICATIONS_SRC
|
qt5_add_dbus_adaptor(NOTIFICATIONS_SRC
|
||||||
org.freedesktop.Notifications.xml
|
org.freedesktop.Notifications.xml
|
||||||
notifyd.h Notifyd
|
notifyd.h Notifyd
|
||||||
)
|
)
|
||||||
|
|
||||||
# Translations **********************************
|
# Translations **********************************
|
||||||
lxqt_translate_ts(NOTIFICATIONS_QM_FILES SOURCES
|
lxqt_translate_ts(NOTIFICATIONS_QM_FILES
|
||||||
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS}
|
||||||
|
SOURCES
|
||||||
${NOTIFICATIONS_SRC}
|
${NOTIFICATIONS_SRC}
|
||||||
${NOTIFICATIONS_UI}
|
${NOTIFICATIONS_UI}
|
||||||
INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
INSTALL_DIR "${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
||||||
@ -35,7 +30,6 @@ lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
|||||||
|
|
||||||
add_executable(lxqt-notificationd
|
add_executable(lxqt-notificationd
|
||||||
${NOTIFICATIONS_SRC}
|
${NOTIFICATIONS_SRC}
|
||||||
${NOTIFICATIONS_UI_CPP}
|
|
||||||
${NOTIFICATIONS_QM_FILES}
|
${NOTIFICATIONS_QM_FILES}
|
||||||
${QM_LOADER}
|
${QM_LOADER}
|
||||||
)
|
)
|
||||||
@ -43,9 +37,12 @@ add_executable(lxqt-notificationd
|
|||||||
target_link_libraries(lxqt-notificationd
|
target_link_libraries(lxqt-notificationd
|
||||||
Qt5::Widgets
|
Qt5::Widgets
|
||||||
Qt5::DBus
|
Qt5::DBus
|
||||||
${QTXDG_LIBRARIES}
|
lxqt
|
||||||
${LXQT_LIBRARIES}
|
|
||||||
KF5::WindowSystem
|
KF5::WindowSystem
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS lxqt-notificationd RUNTIME DESTINATION bin)
|
install(TARGETS
|
||||||
|
lxqt-notificationd
|
||||||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include "notifyd.h"
|
#include "notifyd.h"
|
||||||
|
|
||||||
|
|
||||||
/*! \mainpage LXDE-Qt notification daemon
|
/*! \mainpage LXQt notification daemon
|
||||||
*
|
*
|
||||||
* Running in user session; implementing standard as described in:
|
* Running in user session; implementing standard as described in:
|
||||||
* docs/nodification-spec-latest.html
|
* docs/nodification-spec-latest.html
|
||||||
@ -65,7 +65,7 @@
|
|||||||
*/
|
*/
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
LxQt::Application a(argc, argv);
|
LXQt::Application a(argc, argv);
|
||||||
|
|
||||||
a.setQuitOnLastWindowClosed(false);
|
a.setQuitOnLastWindowClosed(false);
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ int main(int argc, char** argv)
|
|||||||
"NotificationArea {background: transparent;}"
|
"NotificationArea {background: transparent;}"
|
||||||
"NotificationLayout {background: transparent;}"
|
"NotificationLayout {background: transparent;}"
|
||||||
);
|
);
|
||||||
|
|
||||||
Notifyd* daemon = new Notifyd();
|
Notifyd* daemon = new Notifyd();
|
||||||
new NotificationsAdaptor(daemon);
|
new NotificationsAdaptor(daemon);
|
||||||
|
|
||||||
@ -84,6 +84,5 @@ int main(int argc, char** argv)
|
|||||||
if (!connection.registerObject("/org/freedesktop/Notifications", daemon))
|
if (!connection.registerObject("/org/freedesktop/Notifications", daemon))
|
||||||
qDebug() << "registerObject failed: another object with '/org/freedesktop/Notifications' runs already";
|
qDebug() << "registerObject failed: another object with '/org/freedesktop/Notifications' runs already";
|
||||||
|
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
@ -32,13 +32,16 @@
|
|||||||
#include <QtDBus/QDBusArgument>
|
#include <QtDBus/QDBusArgument>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <XdgIcon>
|
#include <XdgIcon>
|
||||||
#include <KF5/KWindowSystem/KWindowSystem>
|
#include <KWindowSystem/KWindowSystem>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QPushButton>
|
||||||
|
|
||||||
#include "notification.h"
|
#include "notification.h"
|
||||||
#include "notificationwidgets.h"
|
#include "notificationwidgets.h"
|
||||||
|
|
||||||
#define ICONSIZE QSize(32, 32)
|
#define ICONSIZE QSize(32, 32)
|
||||||
|
|
||||||
|
|
||||||
Notification::Notification(const QString &application,
|
Notification::Notification(const QString &application,
|
||||||
const QString &summary, const QString &body,
|
const QString &summary, const QString &body,
|
||||||
const QString &icon, int timeout,
|
const QString &icon, int timeout,
|
||||||
@ -46,6 +49,7 @@ Notification::Notification(const QString &application,
|
|||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
m_timer(0),
|
m_timer(0),
|
||||||
|
m_linkHovered(false),
|
||||||
m_actionWidget(0)
|
m_actionWidget(0)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
@ -57,7 +61,14 @@ Notification::Notification(const QString &application,
|
|||||||
|
|
||||||
setValues(application, summary, body, icon, timeout, actions, hints);
|
setValues(application, summary, body, icon, timeout, actions, hints);
|
||||||
|
|
||||||
connect(closeButton, SIGNAL(clicked()), this, SLOT(closeButton_clicked()));
|
connect(closeButton, &QPushButton::clicked, this, &Notification::closeButton_clicked);
|
||||||
|
|
||||||
|
for (QLabel *label : {bodyLabel, summaryLabel})
|
||||||
|
{
|
||||||
|
connect(label, &QLabel::linkHovered, this, &Notification::linkHovered);
|
||||||
|
|
||||||
|
label->installEventFilter(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notification::setValues(const QString &application,
|
void Notification::setValues(const QString &application,
|
||||||
@ -109,21 +120,27 @@ void Notification::setValues(const QString &application,
|
|||||||
iconLabel->setPixmap(m_pixmap);
|
iconLabel->setPixmap(m_pixmap);
|
||||||
iconLabel->show();
|
iconLabel->show();
|
||||||
}
|
}
|
||||||
|
//XXX: workaround to properly set text labels widths (for correct sizeHints after setText)
|
||||||
|
adjustSize();
|
||||||
|
|
||||||
// application
|
// application
|
||||||
appLabel->setVisible(!application.isEmpty());
|
appLabel->setVisible(!application.isEmpty());
|
||||||
|
appLabel->setFixedWidth(appLabel->width());
|
||||||
appLabel->setText(application);
|
appLabel->setText(application);
|
||||||
|
|
||||||
// summary
|
// summary
|
||||||
summaryLabel->setVisible(!summary.isEmpty());
|
summaryLabel->setVisible(!summary.isEmpty() && application != summary);
|
||||||
|
summaryLabel->setFixedWidth(summaryLabel->width());
|
||||||
summaryLabel->setText(summary);
|
summaryLabel->setText(summary);
|
||||||
|
|
||||||
if (application == summary)
|
|
||||||
summaryLabel->setVisible(false);
|
|
||||||
|
|
||||||
// body
|
// body
|
||||||
bodyLabel->setVisible(!body.isEmpty());
|
bodyLabel->setVisible(!body.isEmpty());
|
||||||
bodyLabel->setText(body);
|
bodyLabel->setFixedWidth(bodyLabel->width());
|
||||||
|
//https://developer.gnome.org/notification-spec
|
||||||
|
//Body - This is a multi-line body of text. Each line is a paragraph, server implementations are free to word wrap them as they see fit.
|
||||||
|
//XXX: remove all unsupported tags?!? (supported <b>, <i>, <u>, <a>, <img>)
|
||||||
|
QString formatted(body);
|
||||||
|
bodyLabel->setText(formatted.replace('\n', QStringLiteral("<br/>")));
|
||||||
|
|
||||||
// Timeout
|
// Timeout
|
||||||
// Special values:
|
// Special values:
|
||||||
@ -139,7 +156,7 @@ void Notification::setValues(const QString &application,
|
|||||||
if (timeout > 0)
|
if (timeout > 0)
|
||||||
{
|
{
|
||||||
m_timer = new NotificationTimer(this);
|
m_timer = new NotificationTimer(this);
|
||||||
connect(m_timer, SIGNAL(timeout()), this, SIGNAL(timeout()));
|
connect(m_timer, &NotificationTimer::timeout, this, &Notification::timeout);
|
||||||
m_timer->start(timeout);
|
m_timer->start(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,8 +185,10 @@ void Notification::setValues(const QString &application,
|
|||||||
m_actionWidget = new NotificationActionsButtonsWidget(actions, this);
|
m_actionWidget = new NotificationActionsButtonsWidget(actions, this);
|
||||||
else
|
else
|
||||||
m_actionWidget = new NotificationActionsComboWidget(actions, this);
|
m_actionWidget = new NotificationActionsComboWidget(actions, this);
|
||||||
connect(m_actionWidget, SIGNAL(actionTriggered(const QString &)),
|
|
||||||
this, SIGNAL(actionTriggered(const QString &)));
|
connect(m_actionWidget, &NotificationActionsWidget::actionTriggered,
|
||||||
|
this, &Notification::actionTriggered);
|
||||||
|
|
||||||
actionsLayout->addWidget(m_actionWidget);
|
actionsLayout->addWidget(m_actionWidget);
|
||||||
m_actionWidget->show();
|
m_actionWidget->show();
|
||||||
}
|
}
|
||||||
@ -225,7 +244,14 @@ QPixmap Notification::getPixmapFromHint(const QVariant &argument) const
|
|||||||
arg >> channels;
|
arg >> channels;
|
||||||
arg >> data;
|
arg >> data;
|
||||||
arg.endStructure();
|
arg.endStructure();
|
||||||
QImage img = QImage((uchar*)data.constData(), width, height, QImage::Format_ARGB32).rgbSwapped();
|
|
||||||
|
bool rgb = !hasAlpha && channels == 3 && bitsPerSample == 8;
|
||||||
|
QImage::Format imageFormat = rgb ? QImage::Format_RGB888 : QImage::Format_ARGB32;
|
||||||
|
|
||||||
|
QImage img = QImage((uchar*)data.constData(), width, height, imageFormat);
|
||||||
|
|
||||||
|
if (!rgb)
|
||||||
|
img = img.rgbSwapped();
|
||||||
|
|
||||||
return QPixmap::fromImage(img);
|
return QPixmap::fromImage(img);
|
||||||
}
|
}
|
||||||
@ -259,6 +285,25 @@ void Notification::leaveEvent(QEvent * event)
|
|||||||
m_timer->resume();
|
m_timer->resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Notification::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
{
|
||||||
|
// Catch mouseReleaseEvent on child labels if a link is not currently being hovered.
|
||||||
|
//
|
||||||
|
// This workarounds QTBUG-49025 where clicking on text does not propagate the mouseReleaseEvent
|
||||||
|
// to the parent even though the text is not selectable and no link is being clicked.
|
||||||
|
if (event->type() == QEvent::MouseButtonRelease && !m_linkHovered)
|
||||||
|
{
|
||||||
|
mouseReleaseEvent(static_cast<QMouseEvent*>(event));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Notification::linkHovered(QString link)
|
||||||
|
{
|
||||||
|
m_linkHovered = !link.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
void Notification::mouseReleaseEvent(QMouseEvent * event)
|
void Notification::mouseReleaseEvent(QMouseEvent * event)
|
||||||
{
|
{
|
||||||
// qDebug() << "CLICKED" << event;
|
// qDebug() << "CLICKED" << event;
|
||||||
@ -310,7 +355,7 @@ void NotificationTimer::pause()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
m_intervalMsec = m_startTime.msecsTo(QDateTime());
|
m_intervalMsec = m_startTime.msecsTo(QDateTime::currentDateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationTimer::resume()
|
void NotificationTimer::resume()
|
||||||
|
@ -86,7 +86,7 @@ protected:
|
|||||||
- if there is one action or at least one default action, this
|
- if there is one action or at least one default action, this
|
||||||
default action is triggered on click.
|
default action is triggered on click.
|
||||||
\see NotificationActionsWidget::hasDefaultAction()
|
\see NotificationActionsWidget::hasDefaultAction()
|
||||||
\see NotificationActionsWidget::defaultAction()
|
\see NotificationActionsWidget::defaultAction()
|
||||||
- it tries to find caller window by
|
- it tries to find caller window by
|
||||||
a) application name. \see XfitMan::getApplicationName()
|
a) application name. \see XfitMan::getApplicationName()
|
||||||
b) window title. \see XfitMan::getWindowTitle()
|
b) window title. \see XfitMan::getWindowTitle()
|
||||||
@ -99,6 +99,7 @@ private:
|
|||||||
NotificationTimer *m_timer;
|
NotificationTimer *m_timer;
|
||||||
|
|
||||||
QPixmap m_pixmap;
|
QPixmap m_pixmap;
|
||||||
|
bool m_linkHovered;
|
||||||
|
|
||||||
NotificationActionsWidget *m_actionWidget;
|
NotificationActionsWidget *m_actionWidget;
|
||||||
|
|
||||||
@ -106,9 +107,11 @@ private:
|
|||||||
void paintEvent(QPaintEvent *);
|
void paintEvent(QPaintEvent *);
|
||||||
QPixmap getPixmapFromHint(const QVariant &argument) const;
|
QPixmap getPixmapFromHint(const QVariant &argument) const;
|
||||||
QPixmap getPixmapFromString(const QString &str) const;
|
QPixmap getPixmapFromString(const QString &str) const;
|
||||||
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void closeButton_clicked();
|
void closeButton_clicked();
|
||||||
|
void linkHovered(QString);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
<string notr="true">TextLabel</string>
|
<string notr="true">TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::RichText</enum>
|
<enum>Qt::PlainText</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
@ -55,10 +55,10 @@ NotificationArea::NotificationArea(QWidget *parent)
|
|||||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
connect(m_layout, SIGNAL(allNotificationsClosed()), this, SLOT(close()));
|
connect(m_layout, &NotificationLayout::allNotificationsClosed, this, &NotificationArea::close);
|
||||||
connect(m_layout, SIGNAL(notificationAvailable()), this, SLOT(show()));
|
connect(m_layout, &NotificationLayout::notificationAvailable, this, &NotificationArea::show);
|
||||||
connect(m_layout, SIGNAL(heightChanged(int)), this, SLOT(setHeight(int)));
|
connect(m_layout, &NotificationLayout::heightChanged, this, &NotificationArea::setHeight);
|
||||||
connect(qApp->desktop(), SIGNAL(workAreaResized(int)), SLOT(setHeight()));
|
connect(qApp->desktop(), &QDesktopWidget::workAreaResized, this, &NotificationArea::setHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationArea::setHeight(int contentHeight)
|
void NotificationArea::setHeight(int contentHeight)
|
||||||
@ -78,38 +78,44 @@ void NotificationArea::setHeight(int contentHeight)
|
|||||||
// I think it's a bug of Qt.
|
// I think it's a bug of Qt.
|
||||||
QRect workArea = qApp->desktop()->availableGeometry(qApp->desktop()->primaryScreen());
|
QRect workArea = qApp->desktop()->availableGeometry(qApp->desktop()->primaryScreen());
|
||||||
|
|
||||||
int h = workArea.height();
|
workArea -= QMargins(m_spacing, m_spacing, m_spacing, m_spacing);
|
||||||
int safeHeight = contentHeight > h ? h : contentHeight;
|
QRect notif_rect = workArea.normalized();
|
||||||
int x, y;
|
notif_rect.setWidth(width());
|
||||||
|
if (notif_rect.height() > contentHeight)
|
||||||
|
notif_rect.setHeight(contentHeight);
|
||||||
|
|
||||||
if (m_placement == "bottom-right")
|
// no move needed for "top-left"
|
||||||
|
if ("top-center" == m_placement)
|
||||||
{
|
{
|
||||||
x = workArea.right() - width() - m_spacing;
|
notif_rect.moveCenter(workArea.center());
|
||||||
y = workArea.bottom() - safeHeight - m_spacing;
|
notif_rect.moveTop(workArea.top());
|
||||||
}
|
} else if ("top-right" == m_placement)
|
||||||
else if (m_placement == "bottom-left")
|
|
||||||
{
|
{
|
||||||
x = workArea.x() + m_spacing;
|
notif_rect.moveRight(workArea.right());
|
||||||
y = workArea.bottom() - safeHeight - m_spacing;
|
} else if ("center-left" == m_placement)
|
||||||
}
|
|
||||||
else if (m_placement == "top-right")
|
|
||||||
{
|
{
|
||||||
x = workArea.right() - width() - m_spacing;
|
notif_rect.moveCenter(workArea.center());
|
||||||
y = workArea.y() + m_spacing;
|
notif_rect.moveLeft(workArea.left());
|
||||||
}
|
} else if ("center-center" == m_placement)
|
||||||
else if (m_placement == "top-left")
|
|
||||||
{
|
{
|
||||||
x = workArea.x() + m_spacing;
|
notif_rect.moveCenter(workArea.center());
|
||||||
y = workArea.y() + m_spacing;
|
} else if ("center-right" == m_placement)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
x = workArea.right() - width() - m_spacing;
|
notif_rect.moveCenter(workArea.center());
|
||||||
y = workArea.bottom() - safeHeight;
|
notif_rect.moveRight(workArea.right());
|
||||||
|
} else if ("bottom-left" == m_placement)
|
||||||
|
{
|
||||||
|
notif_rect.moveBottom(workArea.bottom());
|
||||||
|
} else if ("bottom-center" == m_placement)
|
||||||
|
{
|
||||||
|
notif_rect.moveCenter(workArea.center());
|
||||||
|
notif_rect.moveBottom(workArea.bottom());
|
||||||
|
} else if ("bottom-right" == m_placement)
|
||||||
|
{
|
||||||
|
notif_rect.moveBottomRight(workArea.bottomRight());
|
||||||
}
|
}
|
||||||
|
|
||||||
move(x, y);
|
setGeometry(notif_rect);
|
||||||
resize(width(), safeHeight);
|
|
||||||
// always show the latest notification
|
// always show the latest notification
|
||||||
ensureVisible(0, contentHeight, 0, 0);
|
ensureVisible(0, contentHeight, 0, 0);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ NotificationLayout::NotificationLayout(QWidget *parent)
|
|||||||
setPalette(palette);
|
setPalette(palette);
|
||||||
// Required to display wallpaper
|
// Required to display wallpaper
|
||||||
setAttribute(Qt::WA_TranslucentBackground);
|
setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
|
||||||
// Make the window stay on top
|
// Make the window stay on top
|
||||||
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
|
||||||
|
|
||||||
@ -96,10 +96,10 @@ void NotificationLayout::addNotification(uint id, const QString &application,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(n, SIGNAL(timeout()), this, SLOT(removeNotificationTimeout()));
|
connect(n, &Notification::timeout, this, &NotificationLayout::removeNotificationTimeout);
|
||||||
connect(n, SIGNAL(userCanceled()), this, SLOT(removeNotificationUser()));
|
connect(n, &Notification::userCanceled, this, &NotificationLayout::removeNotificationUser);
|
||||||
connect(n, SIGNAL(actionTriggered(QString)),
|
connect(n, &Notification::actionTriggered,
|
||||||
this, SLOT(notificationActionCalled(QString)));
|
this, &NotificationLayout::notificationActionCalled);
|
||||||
m_notifications[id] = n;
|
m_notifications[id] = n;
|
||||||
m_layout->addWidget(n);
|
m_layout->addWidget(n);
|
||||||
n->show();
|
n->show();
|
||||||
|
@ -39,77 +39,77 @@
|
|||||||
NotificationActionsWidget::NotificationActionsWidget(const QStringList& actions, QWidget *parent)
|
NotificationActionsWidget::NotificationActionsWidget(const QStringList& actions, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < actions.count(); ++i)
|
for (int i = 0; i < actions.count(); i += 2)
|
||||||
{
|
{
|
||||||
if (i == actions.count()-1)
|
QString key = actions[i];
|
||||||
|
QString value;
|
||||||
|
|
||||||
|
if (i == actions.count() - 1)
|
||||||
{
|
{
|
||||||
qDebug() << "NotificationActionsWidget actions has contains pairs (id, value, id, value...) got odd count:" << actions.count() << "Actions:" << actions;
|
value = key;
|
||||||
m_actionMap[actions.at(i)] = actions.at(i);
|
qWarning() << "Odd number of elements in action list. Last action will use key as text (" << key << ")";
|
||||||
|
} else {
|
||||||
|
value = actions[i + 1];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
if (key == "default")
|
||||||
m_actionMap[actions.at(i)] = actions.at(i+1);
|
m_defaultAction = key;
|
||||||
}
|
|
||||||
++i; // move to the next ID
|
m_actions.append({key, value});
|
||||||
}
|
}
|
||||||
|
|
||||||
// if there is only one action let's take it as a default one
|
// if there is only one action let's use it as the default one
|
||||||
if (m_actionMap.count() == 1)
|
if (m_actions.count() == 1)
|
||||||
m_defaultAction = m_actionMap[m_actionMap.keys().at(0)];
|
m_defaultAction = m_actions[0].first;
|
||||||
|
|
||||||
qDebug() << "NotificationActionsWidget processed actions:" << m_actionMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NotificationActionsButtonsWidget::NotificationActionsButtonsWidget(const QStringList& actions, QWidget *parent)
|
NotificationActionsButtonsWidget::NotificationActionsButtonsWidget(const QStringList& actions, QWidget *parent)
|
||||||
: NotificationActionsWidget(actions, parent)
|
: NotificationActionsWidget(actions, parent)
|
||||||
{
|
{
|
||||||
QHashIterator<QString,QString> it(m_actionMap);
|
|
||||||
QHBoxLayout *l = new QHBoxLayout();
|
QHBoxLayout *l = new QHBoxLayout();
|
||||||
setLayout(l);
|
setLayout(l);
|
||||||
|
|
||||||
QButtonGroup *group = new QButtonGroup(this);
|
QButtonGroup *group = new QButtonGroup(this);
|
||||||
|
|
||||||
while (it.hasNext())
|
for (auto const & action : m_actions)
|
||||||
{
|
{
|
||||||
it.next();
|
QPushButton *b = new QPushButton(action.second, this);
|
||||||
QPushButton *b = new QPushButton(it.value(), this);
|
b->setObjectName(action.first);
|
||||||
l->addWidget(b);
|
l->addWidget(b);
|
||||||
group->addButton(b);
|
group->addButton(b);
|
||||||
if (it.key() == "default")
|
|
||||||
{
|
if (action.first == m_defaultAction)
|
||||||
b->setFocus(Qt::OtherFocusReason);
|
b->setFocus(Qt::OtherFocusReason);
|
||||||
m_defaultAction = it.key();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
connect(group, SIGNAL(buttonClicked(QAbstractButton*)),
|
connect(group, static_cast<void (QButtonGroup::*)(QAbstractButton*)>(&QButtonGroup::buttonClicked),
|
||||||
this, SLOT(actionButtonActivated(QAbstractButton*)));
|
this, &NotificationActionsButtonsWidget::actionButtonActivated);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationActionsButtonsWidget::actionButtonActivated(QAbstractButton* button)
|
void NotificationActionsButtonsWidget::actionButtonActivated(QAbstractButton* button)
|
||||||
{
|
{
|
||||||
emit actionTriggered(m_actionMap.key(button->text()));
|
emit actionTriggered(button->objectName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
NotificationActionsComboWidget::NotificationActionsComboWidget(const QStringList& actions, QWidget *parent)
|
NotificationActionsComboWidget::NotificationActionsComboWidget(const QStringList& actions, QWidget *parent)
|
||||||
: NotificationActionsWidget(actions, parent)
|
: NotificationActionsWidget(actions, parent)
|
||||||
{
|
{
|
||||||
QHashIterator<QString,QString> it(m_actionMap);
|
|
||||||
QHBoxLayout *l = new QHBoxLayout();
|
QHBoxLayout *l = new QHBoxLayout();
|
||||||
setLayout(l);
|
setLayout(l);
|
||||||
|
|
||||||
l->addWidget(new QLabel(tr("Actions:"), this));
|
l->addWidget(new QLabel(tr("Actions:"), this));
|
||||||
m_comboBox = new QComboBox(this);
|
m_comboBox = new QComboBox(this);
|
||||||
int currentIndex = -1;
|
int currentIndex = -1;
|
||||||
while (it.hasNext())
|
|
||||||
|
for (int i = 0; i < m_actions.count(); ++i)
|
||||||
{
|
{
|
||||||
it.next();
|
auto const & action = m_actions[i];
|
||||||
m_comboBox->addItem(it.value(), it.key());
|
|
||||||
if (it.key() == "default")
|
m_comboBox->addItem(action.second, action.first);
|
||||||
|
if (action.first == m_defaultAction)
|
||||||
{
|
{
|
||||||
currentIndex = m_comboBox->count()-1;
|
currentIndex = i;
|
||||||
m_defaultAction = it.key();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
l->addWidget(m_comboBox);
|
l->addWidget(m_comboBox);
|
||||||
@ -119,8 +119,8 @@ NotificationActionsComboWidget::NotificationActionsComboWidget(const QStringList
|
|||||||
|
|
||||||
QPushButton *b = new QPushButton(tr("OK"), this);
|
QPushButton *b = new QPushButton(tr("OK"), this);
|
||||||
l->addWidget(b);
|
l->addWidget(b);
|
||||||
connect(b, SIGNAL(clicked()),
|
connect(b, &QPushButton::clicked,
|
||||||
this, SLOT(actionComboBoxActivated()));
|
this, &NotificationActionsComboWidget::actionComboBoxActivated);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationActionsComboWidget::actionComboBoxActivated()
|
void NotificationActionsComboWidget::actionComboBoxActivated()
|
||||||
@ -130,5 +130,5 @@ void NotificationActionsComboWidget::actionComboBoxActivated()
|
|||||||
int ix = m_comboBox->currentIndex();
|
int ix = m_comboBox->currentIndex();
|
||||||
if (ix == -1)
|
if (ix == -1)
|
||||||
return;
|
return;
|
||||||
emit actionTriggered(m_actionMap.key(m_comboBox->itemText(ix)));
|
emit actionTriggered(m_actions[ix].first);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
QString m_defaultAction;
|
QString m_defaultAction;
|
||||||
QHash<QString,QString> m_actionMap;
|
QList<QPair<QString/*action key*/, QString/*action value*/>> m_actions;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NotificationActionsButtonsWidget : public NotificationActionsWidget
|
class NotificationActionsButtonsWidget : public NotificationActionsWidget
|
||||||
|
@ -40,21 +40,21 @@ Notifyd::Notifyd(QObject* parent)
|
|||||||
mId(0)
|
mId(0)
|
||||||
{
|
{
|
||||||
m_area = new NotificationArea();
|
m_area = new NotificationArea();
|
||||||
m_settings = new LxQt::Settings("notifications");
|
m_settings = new LXQt::Settings("notifications");
|
||||||
reloadSettings();
|
reloadSettings();
|
||||||
|
|
||||||
connect(this, SIGNAL(notificationAdded(uint,QString,QString,QString,QString,int,QStringList,QVariantMap)),
|
connect(this, &Notifyd::notificationAdded,
|
||||||
m_area->layout(), SLOT(addNotification(uint,QString,QString,QString,QString,int,QStringList,QVariantMap)));
|
m_area->layout(), &NotificationLayout::addNotification);
|
||||||
connect(this, SIGNAL(notificationClosed(uint, uint)),
|
connect(this, &Notifyd::notificationClosed,
|
||||||
m_area->layout(), SLOT(removeNotification(uint, uint)));
|
m_area->layout(), &NotificationLayout::removeNotification);
|
||||||
// feedback for original caller
|
// feedback for original caller
|
||||||
connect(m_area->layout(), SIGNAL(notificationClosed(uint,uint)),
|
connect(m_area->layout(), &NotificationLayout::notificationClosed,
|
||||||
this, SIGNAL(NotificationClosed(uint,uint)));
|
this, &Notifyd::NotificationClosed);
|
||||||
connect(m_area->layout(), SIGNAL(actionInvoked(uint, QString)),
|
connect(m_area->layout(), &NotificationLayout::actionInvoked,
|
||||||
this, SIGNAL(ActionInvoked(uint,QString)));
|
this, &Notifyd::ActionInvoked);
|
||||||
|
|
||||||
connect(m_settings, SIGNAL(settingsChanged()),
|
connect(m_settings, &LXQt::Settings::settingsChanged,
|
||||||
this, SLOT(reloadSettings()));
|
this, &Notifyd::reloadSettings);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ private:
|
|||||||
NotificationArea *m_area;
|
NotificationArea *m_area;
|
||||||
int m_serverTimeout;
|
int m_serverTimeout;
|
||||||
|
|
||||||
LxQt::Settings *m_settings;
|
LXQt::Settings *m_settings;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void reloadSettings();
|
void reloadSettings();
|
||||||
|
15
src/translations/lxqt-notificationd_de.ts
Normal file
15
src/translations/lxqt-notificationd_de.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="de">
|
||||||
|
<context>
|
||||||
|
<name>NotificationActionsComboWidget</name>
|
||||||
|
<message>
|
||||||
|
<source>Actions:</source>
|
||||||
|
<translation>Aktionen:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>OK</source>
|
||||||
|
<translation>OK</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
15
src/translations/lxqt-notificationd_el.ts
Normal file
15
src/translations/lxqt-notificationd_el.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="el">
|
||||||
|
<context>
|
||||||
|
<name>NotificationActionsComboWidget</name>
|
||||||
|
<message>
|
||||||
|
<source>Actions:</source>
|
||||||
|
<translation>Ενέργειες:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>OK</source>
|
||||||
|
<translation>Εντάξει</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
15
src/translations/lxqt-notificationd_hu.ts
Normal file
15
src/translations/lxqt-notificationd_hu.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="hu">
|
||||||
|
<context>
|
||||||
|
<name>NotificationActionsComboWidget</name>
|
||||||
|
<message>
|
||||||
|
<source>Actions:</source>
|
||||||
|
<translation>Akciók:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>OK</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
@ -33,14 +33,14 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
connect(ui->pushButton, SIGNAL(clicked()), SLOT(createNotification()));
|
connect(ui->pushButton, SIGNAL(clicked()), SLOT(createNotification()));
|
||||||
LxQtNotification::notify("1");
|
LXQtNotification::notify("1");
|
||||||
LxQtNotification::notify("2");
|
LXQtNotification::notify("2");
|
||||||
LxQtNotification::notify("3");
|
LXQtNotification::notify("3");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::createNotification()
|
void MainWindow::createNotification()
|
||||||
{
|
{
|
||||||
LxQtNotification* n = new LxQtNotification("Notification!");
|
LXQtNotification* n = new LXQtNotification("Notification!");
|
||||||
nlist.append(n);
|
nlist.append(n);
|
||||||
connect(n, SIGNAL(actionActivated(int)), this, SLOT(clickEvent(int)));
|
connect(n, SIGNAL(actionActivated(int)), this, SLOT(clickEvent(int)));
|
||||||
n->setActions(QStringList() << "Hi" << "Bye" << "foo" << "bar" << "lorem" << "ipsum", 1);
|
n->setActions(QStringList() << "Hi" << "Bye" << "foo" << "bar" << "lorem" << "ipsum", 1);
|
||||||
@ -50,7 +50,7 @@ void MainWindow::createNotification()
|
|||||||
|
|
||||||
void MainWindow::clickEvent(int button)
|
void MainWindow::clickEvent(int button)
|
||||||
{
|
{
|
||||||
LxQtNotification* n = qobject_cast<LxQtNotification*>(sender());
|
LXQtNotification* n = qobject_cast<LXQtNotification*>(sender());
|
||||||
if (n)
|
if (n)
|
||||||
{
|
{
|
||||||
if (button == 0)
|
if (button == 0)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
|
||||||
class LxQtNotification;
|
class LXQtNotification;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
@ -36,7 +36,7 @@ class MainWindow;
|
|||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget* parent = 0);
|
explicit MainWindow(QWidget* parent = 0);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
@ -47,7 +47,7 @@ public slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow* ui;
|
Ui::MainWindow* ui;
|
||||||
QList<LxQtNotification*> nlist;
|
QList<LXQtNotification*> nlist;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user