From cc7b7b56594665a1797ddc2045b321e0e78d8312 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Fri, 16 Jan 2015 05:27:41 +0300 Subject: [PATCH] create skel for aw --- sources/CMakeLists.txt | 16 +- .../CMakeLists.txt | 4 - .../advanced.ui | 0 .../appearance.ui | 0 .../awesome-widget.cpp | 0 .../awesome-widget.h | 0 .../configuration.cpp | 0 .../customlabel.cpp | 0 .../customlabel.h | 0 .../deconfig.ui | 0 .../deinteraction.cpp | 0 .../graphicalitem.cpp | 0 .../graphicalitem.h | 0 .../graphicalitem.ui | 0 .../plasma-applet-awesomewidget.desktop | 0 .../plasma_applet_awesome-widget.notifyrc | 0 .../reinit.cpp | 0 .../tooltipconfig.ui | 0 .../widget.ui | 0 sources/awesome-widget-kf5/CMakeLists.txt | 16 + .../package/metadata.desktop | 29 ++ .../awesome-widget-kf5/plugin/CMakeLists.txt | 31 ++ sources/awesome-widget-kf5/plugin/awadds.cpp | 47 ++ sources/awesome-widget-kf5/plugin/awadds.h | 38 ++ .../plugin/awesomewidget.cpp | 36 ++ .../awesome-widget-kf5/plugin/awesomewidget.h | 36 ++ .../plugin/graphicalitem.cpp | 470 ++++++++++++++++++ .../awesome-widget-kf5/plugin/graphicalitem.h | 98 ++++ .../plugin/graphicalitem.ui | 293 +++++++++++ ...let-org.kde.plasma.awesome-widget.notifyrc | 14 + sources/awesome-widget-kf5/plugin/qmldir | 3 + .../CMakeLists.txt | 0 .../appearance.ui | 0 .../desktop-panel.cpp | 0 .../desktop-panel.h | 0 .../plasma-applet-desktoppanel.desktop | 0 .../po/CMakeLists.txt | 0 .../po/en.po | 0 .../po/es.po | 0 .../po/extract_messages.sh | 0 .../po/fr.po | 0 .../po/plasma_applet_desktop-panel.pot | 0 .../po/pt_BR.po | 0 .../po/ru.po | 0 .../po/uk.po | 0 .../po/zh.po | 0 .../toggle.ui | 0 .../widget.ui | 0 .../desktops/aw-bat-bar.desktop | 0 .../desktops/aw-cpu-bar.desktop | 0 .../desktops/aw-mem-bar.desktop | 0 .../desktops/aw-swap-bar.desktop | 0 .../desktops/bar-template.desktop | 0 .../po => translations}/CMakeLists.txt | 0 .../{awesome-widget/po => translations}/en.po | 0 .../{awesome-widget/po => translations}/es.po | 0 .../po => translations}/extract_messages.sh | 0 .../{awesome-widget/po => translations}/fr.po | 0 .../plasma_applet_awesome-widget.pot | 0 .../po => translations}/pt_BR.po | 0 .../{awesome-widget/po => translations}/ru.po | 0 .../{awesome-widget/po => translations}/uk.po | 0 .../{awesome-widget/po => translations}/zh.po | 0 63 files changed, 1124 insertions(+), 7 deletions(-) rename sources/{awesome-widget => awesome-widget-kde4}/CMakeLists.txt (91%) rename sources/{awesome-widget => awesome-widget-kde4}/advanced.ui (100%) rename sources/{awesome-widget => awesome-widget-kde4}/appearance.ui (100%) rename sources/{awesome-widget => awesome-widget-kde4}/awesome-widget.cpp (100%) rename sources/{awesome-widget => awesome-widget-kde4}/awesome-widget.h (100%) rename sources/{awesome-widget => awesome-widget-kde4}/configuration.cpp (100%) rename sources/{awesome-widget => awesome-widget-kde4}/customlabel.cpp (100%) rename sources/{awesome-widget => awesome-widget-kde4}/customlabel.h (100%) rename sources/{awesome-widget => awesome-widget-kde4}/deconfig.ui (100%) rename sources/{awesome-widget => awesome-widget-kde4}/deinteraction.cpp (100%) rename sources/{awesome-widget => awesome-widget-kde4}/graphicalitem.cpp (100%) rename sources/{awesome-widget => awesome-widget-kde4}/graphicalitem.h (100%) rename sources/{awesome-widget => awesome-widget-kde4}/graphicalitem.ui (100%) rename sources/{awesome-widget => awesome-widget-kde4}/plasma-applet-awesomewidget.desktop (100%) rename sources/{awesome-widget => awesome-widget-kde4}/plasma_applet_awesome-widget.notifyrc (100%) rename sources/{awesome-widget => awesome-widget-kde4}/reinit.cpp (100%) rename sources/{awesome-widget => awesome-widget-kde4}/tooltipconfig.ui (100%) rename sources/{awesome-widget => awesome-widget-kde4}/widget.ui (100%) create mode 100644 sources/awesome-widget-kf5/CMakeLists.txt create mode 100644 sources/awesome-widget-kf5/package/metadata.desktop create mode 100644 sources/awesome-widget-kf5/plugin/CMakeLists.txt create mode 100644 sources/awesome-widget-kf5/plugin/awadds.cpp create mode 100644 sources/awesome-widget-kf5/plugin/awadds.h create mode 100644 sources/awesome-widget-kf5/plugin/awesomewidget.cpp create mode 100644 sources/awesome-widget-kf5/plugin/awesomewidget.h create mode 100644 sources/awesome-widget-kf5/plugin/graphicalitem.cpp create mode 100644 sources/awesome-widget-kf5/plugin/graphicalitem.h create mode 100644 sources/awesome-widget-kf5/plugin/graphicalitem.ui create mode 100644 sources/awesome-widget-kf5/plugin/plasma-applet-org.kde.plasma.awesome-widget.notifyrc create mode 100644 sources/awesome-widget-kf5/plugin/qmldir rename sources/{desktop-panel => desktop-panel-kde4}/CMakeLists.txt (100%) rename sources/{desktop-panel => desktop-panel-kde4}/appearance.ui (100%) rename sources/{desktop-panel => desktop-panel-kde4}/desktop-panel.cpp (100%) rename sources/{desktop-panel => desktop-panel-kde4}/desktop-panel.h (100%) rename sources/{desktop-panel => desktop-panel-kde4}/plasma-applet-desktoppanel.desktop (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/CMakeLists.txt (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/en.po (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/es.po (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/extract_messages.sh (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/fr.po (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/plasma_applet_desktop-panel.pot (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/pt_BR.po (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/ru.po (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/uk.po (100%) rename sources/{desktop-panel => desktop-panel-kde4}/po/zh.po (100%) rename sources/{desktop-panel => desktop-panel-kde4}/toggle.ui (100%) rename sources/{desktop-panel => desktop-panel-kde4}/widget.ui (100%) rename sources/{awesome-widget => }/desktops/aw-bat-bar.desktop (100%) rename sources/{awesome-widget => }/desktops/aw-cpu-bar.desktop (100%) rename sources/{awesome-widget => }/desktops/aw-mem-bar.desktop (100%) rename sources/{awesome-widget => }/desktops/aw-swap-bar.desktop (100%) rename sources/{awesome-widget => }/desktops/bar-template.desktop (100%) rename sources/{awesome-widget/po => translations}/CMakeLists.txt (100%) rename sources/{awesome-widget/po => translations}/en.po (100%) rename sources/{awesome-widget/po => translations}/es.po (100%) rename sources/{awesome-widget/po => translations}/extract_messages.sh (100%) rename sources/{awesome-widget/po => translations}/fr.po (100%) rename sources/{awesome-widget/po => translations}/plasma_applet_awesome-widget.pot (100%) rename sources/{awesome-widget/po => translations}/pt_BR.po (100%) rename sources/{awesome-widget/po => translations}/ru.po (100%) rename sources/{awesome-widget/po => translations}/uk.po (100%) rename sources/{awesome-widget/po => translations}/zh.po (100%) diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 2cef46b..885f764 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -10,7 +10,7 @@ set (PROJECT_AUTHOR "Evgeniy Alekseev") set (PROJECT_CONTACT "esalexeev@gmail.com") set (PROJECT_LICENSE "GPLv3") set (PROJECT_VERSION_MAJOR 2) -set (PROJECT_VERSION_MINOR 1) +set (PROJECT_VERSION_MINOR 2) set (PROJECT_VERSION_PATCH 0) set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) @@ -38,5 +38,15 @@ configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/ver set (PROJECT_TRDPARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty) add_subdirectory (ext-sysmon) -#add_subdirectory (awesome-widget) -#add_subdirectory (desktop-panel) +if (BUILD_KDE4) + add_subdirectory (awesome-widget-kde4) + add_subdirectory (desktop-panel-kde4) +else () + add_subdirectory (awesome-widget-kf5) +endif () + +# translations +add_subdirectory (translations) +# aw bars desktops +set (AW_DESKTOPS ${CMAKE_CURRENT_SOURCE_DIR}/desktops) +install (DIRECTORY ${AW_DESKTOPS} DESTINATION ${DATA_INSTALL_DIR}/plasma_applet_awesome-widget) diff --git a/sources/awesome-widget/CMakeLists.txt b/sources/awesome-widget-kde4/CMakeLists.txt similarity index 91% rename from sources/awesome-widget/CMakeLists.txt rename to sources/awesome-widget-kde4/CMakeLists.txt index a562b56..8080d86 100644 --- a/sources/awesome-widget/CMakeLists.txt +++ b/sources/awesome-widget-kde4/CMakeLists.txt @@ -7,8 +7,6 @@ message (STATUS "Subproject ${SUBPROJECT}") find_package (KDE4 REQUIRED) add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) -add_subdirectory (po) - include (KDE4Defaults) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} @@ -28,7 +26,6 @@ file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp ${PROJECT_TRDPARTY_DIR}/task/*.cpp set (TASK_HEADER ${PROJECT_TRDPARTY_DIR}/task/task.h) file (GLOB SUBPROJECT_UI *.ui ${PROJECT_TRDPARTY_DIR}/about/*.ui) file (GLOB SUBPROJECT_NOTIFY *.notifyrc) -set (SUBPROJECT_DESKTOPS ${CMAKE_CURRENT_SOURCE_DIR}/desktops) # prepare configure_file (${SUBPROJECT_DESKTOP_IN} ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP}) @@ -43,4 +40,3 @@ target_link_libraries (${PLUGIN_NAME} ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${K install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBPROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR}) install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME}) -install (DIRECTORY ${SUBPROJECT_DESKTOPS} DESTINATION ${DATA_INSTALL_DIR}/${PLUGIN_NAME}) diff --git a/sources/awesome-widget/advanced.ui b/sources/awesome-widget-kde4/advanced.ui similarity index 100% rename from sources/awesome-widget/advanced.ui rename to sources/awesome-widget-kde4/advanced.ui diff --git a/sources/awesome-widget/appearance.ui b/sources/awesome-widget-kde4/appearance.ui similarity index 100% rename from sources/awesome-widget/appearance.ui rename to sources/awesome-widget-kde4/appearance.ui diff --git a/sources/awesome-widget/awesome-widget.cpp b/sources/awesome-widget-kde4/awesome-widget.cpp similarity index 100% rename from sources/awesome-widget/awesome-widget.cpp rename to sources/awesome-widget-kde4/awesome-widget.cpp diff --git a/sources/awesome-widget/awesome-widget.h b/sources/awesome-widget-kde4/awesome-widget.h similarity index 100% rename from sources/awesome-widget/awesome-widget.h rename to sources/awesome-widget-kde4/awesome-widget.h diff --git a/sources/awesome-widget/configuration.cpp b/sources/awesome-widget-kde4/configuration.cpp similarity index 100% rename from sources/awesome-widget/configuration.cpp rename to sources/awesome-widget-kde4/configuration.cpp diff --git a/sources/awesome-widget/customlabel.cpp b/sources/awesome-widget-kde4/customlabel.cpp similarity index 100% rename from sources/awesome-widget/customlabel.cpp rename to sources/awesome-widget-kde4/customlabel.cpp diff --git a/sources/awesome-widget/customlabel.h b/sources/awesome-widget-kde4/customlabel.h similarity index 100% rename from sources/awesome-widget/customlabel.h rename to sources/awesome-widget-kde4/customlabel.h diff --git a/sources/awesome-widget/deconfig.ui b/sources/awesome-widget-kde4/deconfig.ui similarity index 100% rename from sources/awesome-widget/deconfig.ui rename to sources/awesome-widget-kde4/deconfig.ui diff --git a/sources/awesome-widget/deinteraction.cpp b/sources/awesome-widget-kde4/deinteraction.cpp similarity index 100% rename from sources/awesome-widget/deinteraction.cpp rename to sources/awesome-widget-kde4/deinteraction.cpp diff --git a/sources/awesome-widget/graphicalitem.cpp b/sources/awesome-widget-kde4/graphicalitem.cpp similarity index 100% rename from sources/awesome-widget/graphicalitem.cpp rename to sources/awesome-widget-kde4/graphicalitem.cpp diff --git a/sources/awesome-widget/graphicalitem.h b/sources/awesome-widget-kde4/graphicalitem.h similarity index 100% rename from sources/awesome-widget/graphicalitem.h rename to sources/awesome-widget-kde4/graphicalitem.h diff --git a/sources/awesome-widget/graphicalitem.ui b/sources/awesome-widget-kde4/graphicalitem.ui similarity index 100% rename from sources/awesome-widget/graphicalitem.ui rename to sources/awesome-widget-kde4/graphicalitem.ui diff --git a/sources/awesome-widget/plasma-applet-awesomewidget.desktop b/sources/awesome-widget-kde4/plasma-applet-awesomewidget.desktop similarity index 100% rename from sources/awesome-widget/plasma-applet-awesomewidget.desktop rename to sources/awesome-widget-kde4/plasma-applet-awesomewidget.desktop diff --git a/sources/awesome-widget/plasma_applet_awesome-widget.notifyrc b/sources/awesome-widget-kde4/plasma_applet_awesome-widget.notifyrc similarity index 100% rename from sources/awesome-widget/plasma_applet_awesome-widget.notifyrc rename to sources/awesome-widget-kde4/plasma_applet_awesome-widget.notifyrc diff --git a/sources/awesome-widget/reinit.cpp b/sources/awesome-widget-kde4/reinit.cpp similarity index 100% rename from sources/awesome-widget/reinit.cpp rename to sources/awesome-widget-kde4/reinit.cpp diff --git a/sources/awesome-widget/tooltipconfig.ui b/sources/awesome-widget-kde4/tooltipconfig.ui similarity index 100% rename from sources/awesome-widget/tooltipconfig.ui rename to sources/awesome-widget-kde4/tooltipconfig.ui diff --git a/sources/awesome-widget/widget.ui b/sources/awesome-widget-kde4/widget.ui similarity index 100% rename from sources/awesome-widget/widget.ui rename to sources/awesome-widget-kde4/widget.ui diff --git a/sources/awesome-widget-kf5/CMakeLists.txt b/sources/awesome-widget-kf5/CMakeLists.txt new file mode 100644 index 0000000..88a82dc --- /dev/null +++ b/sources/awesome-widget-kf5/CMakeLists.txt @@ -0,0 +1,16 @@ +# set project name +set (SUBPROJECT plasma_applet_awesome-widget) +message (STATUS "Subproject ${SUBPROJECT}") + +find_package (ECM 0.0.12 REQUIRED NO_MODULE) +set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) + +find_package (Qt5 REQUIRED COMPONENTS Core DBus Qml) +find_package (KF5 REQUIRED COMPONENTS I18n Notifications Plasma) + +include (KDEInstallDirs) +include (KDECMakeSettings) +include (KDECompilerSettings) + +add_subdirectory (plugin) +plasma_install_package (package org.kde.plasma.awesome-widget) diff --git a/sources/awesome-widget-kf5/package/metadata.desktop b/sources/awesome-widget-kf5/package/metadata.desktop new file mode 100644 index 0000000..64734ea --- /dev/null +++ b/sources/awesome-widget-kf5/package/metadata.desktop @@ -0,0 +1,29 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Awesome Widget +Comment=A minimalistic Plasmoid +Comment[en]=A minimalistic Plasmoid +Comment[es]=Un plasmoide minimalista +Comment[es]=Un script Plasmoïde minimaliste +Comment[pt_BR]=Um script Plasmoid +Comment[ru]=Минималистичный плазмоид +Comment[uk]=Мінімалістичний плазмоїд +X-KDE-ServiceTypes=Plasma/Applet +Type=Service +Icon=utilities-system-monitor + +X-KDE-ServiceTypes=Plasma/Applet +X-Plasma-API=declarativeappletscript +X-Plasma-MainScript=ui/main.qml +X-Plasma-NotificationArea=true +X-Plasma-RemoteLocation= + +X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis +X-KDE-PluginInfo-Email=esalexeev@gmail.com +X-KDE-PluginInfo-Name=org.kde.plasma.awesome-widget +X-KDE-PluginInfo-Version=@PROJECT_VERSION@ +X-KDE-PluginInfo-Website=http://arcanis.name/projects/awesome-widgets/ +X-KDE-PluginInfo-Category=System Information +X-KDE-PluginInfo-Depends= +X-KDE-PluginInfo-License=GPLv3 +X-KDE-PluginInfo-EnabledByDefault=true diff --git a/sources/awesome-widget-kf5/plugin/CMakeLists.txt b/sources/awesome-widget-kf5/plugin/CMakeLists.txt new file mode 100644 index 0000000..cd8f3b4 --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/CMakeLists.txt @@ -0,0 +1,31 @@ +set (PLUGIN_NAME awplugin) + +add_definitions (${Qt5Core_DEFINITIONS}) +set (Qt_INCLUDE ${Qt5Core_INCLUDE_DIRS} + ${Qt5Qml_INCLUDE_DIRS}) +set (Qt_LIBRARIES ${Qt5Core_LIBRARIES} + ${Qt5Qml_LIBRARIES}) +set (Kf5_INCLUDE ${I18n_INCLUDE_DIR} + ${Notifications_INCLUDE_DIR}) +set (Kf5_LIBRARIES KF5::I18n + KF5::Notifications) + +include_directories (${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/../ + ${PROJECT_TRDPARTY_DIR} + ${Qt_INCLUDE} + ${Kf5_INCLUDE}) + +file (GLOB SUBPROJECT_SOURCE *.cpp) +file (GLOB SUBPROJECT_NOTIFY *.notifyrc) +file (GLOB SUBPROJECT_UI *.ui) + +qt5_wrap_ui (SUBPROJECT_UI_HEADER ${SUBPROJECT_UI}) +add_library (${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE} ${SUBPROJECT_UI_HEADER}) +target_link_libraries (${PLUGIN_NAME} ${Qt_LIBRARIES} ${Kf5_LIBRARIES}) + +install (TARGETS ${PLUGIN_NAME} DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/private/awesome-widget) +install (FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/private/awesome-widget) +install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${KNOTIFYRC_INSTALL_DIR}) diff --git a/sources/awesome-widget-kf5/plugin/awadds.cpp b/sources/awesome-widget-kf5/plugin/awadds.cpp new file mode 100644 index 0000000..318b635 --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/awadds.cpp @@ -0,0 +1,47 @@ +/*************************************************************************** + * This file is part of awesome-widgets * + * * + * awesome-widgets is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * awesome-widgets is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "awadds.h" +#include "graphicalitem.h" +#include "version.h" + + +AWAdds::AWAdds(QObject *parent) + : QObject(parent) +{ + // debug + QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); + QString debugEnv = environment.value(QString("DEBUG"), QString("no")); + debug = (debugEnv == QString("yes")); +} + + +AWAdds::~AWAdds() +{ + if (debug) qDebug() << PDEBUG; +} diff --git a/sources/awesome-widget-kf5/plugin/awadds.h b/sources/awesome-widget-kf5/plugin/awadds.h new file mode 100644 index 0000000..9723f2b --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/awadds.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * This file is part of awesome-widgets * + * * + * awesome-widgets is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * awesome-widgets is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + + +#ifndef AWADDS_H +#define AWADDS_H + +#include + + +class AWAdds : public QObject +{ + Q_OBJECT + +public: + AWAdds(QObject *parent = 0); + ~AWAdds(); + +private: + bool debug = false; +}; + + +#endif /* AWADDS_H */ diff --git a/sources/awesome-widget-kf5/plugin/awesomewidget.cpp b/sources/awesome-widget-kf5/plugin/awesomewidget.cpp new file mode 100644 index 0000000..a59d64f --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/awesomewidget.cpp @@ -0,0 +1,36 @@ +/*************************************************************************** + * This file is part of awesome-widgets * + * * + * awesome-widgets is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * awesome-widgets is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#include "awesomewidget.h" +#include "awadds.h" + + +static QObject *aw_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine) +{ + Q_UNUSED(engine); + Q_UNUSED(scriptEngine); + + return new AWAdds(); +} + + +void AWPlugin::registerTypes(const char *uri) +{ + Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.awesome-widget")); + + qmlRegisterSingletonType(uri, 1, 0, "AWAdds", aw_singletontype_provider); +} diff --git a/sources/awesome-widget-kf5/plugin/awesomewidget.h b/sources/awesome-widget-kf5/plugin/awesomewidget.h new file mode 100644 index 0000000..14f8646 --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/awesomewidget.h @@ -0,0 +1,36 @@ +/*************************************************************************** + * This file is part of awesome-widgets * + * * + * awesome-widgets is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * awesome-widgets is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + + +#ifndef AWPLUGIN_H +#define AWPLUGIN_H + +#include + + +class AWPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void initializeEngine(QQmlEngine *engine, const char *uri); + void registerTypes(const char *uri); +}; + + +#endif /* AWPLUGIN_H */ diff --git a/sources/awesome-widget-kf5/plugin/graphicalitem.cpp b/sources/awesome-widget-kf5/plugin/graphicalitem.cpp new file mode 100644 index 0000000..0437ced --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/graphicalitem.cpp @@ -0,0 +1,470 @@ +/*************************************************************************** + * This file is part of awesome-widgets * + * * + * awesome-widgets is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * awesome-widgets is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#include "graphicalitem.h" +#include "ui_graphicalitem.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +GraphicalItem::GraphicalItem(QWidget *parent, const QString desktopName, const QStringList directories, const bool debugCmd) + : QDialog(parent), + fileName(desktopName), + dirs(directories), + debug(debugCmd), + ui(new Ui::GraphicalItem) +{ + readConfiguration(); + + ui->setupUi(this); + connect(ui->pushButton_activeColor, SIGNAL(clicked()), this, SLOT(changeColor())); + connect(ui->pushButton_inactiveColor, SIGNAL(clicked()), this, SLOT(changeColor())); +} + + +GraphicalItem::~GraphicalItem() +{ + if (debug) qDebug() << PDEBUG; + + delete ui; +} + + +QString GraphicalItem::getImage(const float value) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Value" << value; + if (_bar == QString("none")) return QString(""); + + QColor active = stringToColor(_activeColor); + QColor inactive = stringToColor(_inactiveColor); + float percent = value / 100.0; + int scale[2] = {1, 1}; + QPen pen = QPen(); + QGraphicsScene *scene = new QGraphicsScene(); + scene->setBackgroundBrush(QBrush(Qt::NoBrush)); + QGraphicsView *view = new QGraphicsView(scene); + view->setStyleSheet(QString("background: transparent")); + view->setContentsMargins(0, 0, 0, 0); + view->setFrameShape(QFrame::NoFrame); + view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + view->resize(_width + 5.0, _height + 5.0); + + // paint + switch(_type) { + case Vertical: + pen.setWidth(_width); + // inactive + pen.setColor(inactive); + scene->addLine(0.5 * _width, -0.5 * _width, 0.5 * _width, (1.0 - percent) * _height - 0.5 * _width, pen); + // active + pen.setColor(active); + scene->addLine(0.5 * _width, (1.0 - percent) * _height + 0.5 * _width, 0.5 * _width, _height + 0.5 * _width, pen); + // scale + scale[1] = -2 * (int)_direction + 1; + break; + case Circle: + QGraphicsEllipseItem *circle; + pen.setWidth(1.0); + // inactive + pen.setColor(inactive); + circle = scene->addEllipse(0.0, 0.0, _width, _height, pen, QBrush(inactive, Qt::SolidPattern)); + circle->setSpanAngle(- (1.0 - percent) * 360.0 * 16.0); + circle->setStartAngle(90.0 * 16.0 - percent * 360.0 * 16.0); + // active + pen.setColor(active); + circle = scene->addEllipse(0.0, 0.0, _width, _height, pen, QBrush(active, Qt::SolidPattern)); + circle->setSpanAngle(- percent * 360.0 * 16.0); + circle->setStartAngle(90.0 * 16.0); + // scale + scale[0] = -2 *(int)_direction + 1; + break; + default: + pen.setWidth(_height); + // inactive + pen.setColor(inactive); + scene->addLine(percent * _width + 0.5 * _height, 0.5 * _height, _width + 0.5 * _height, 0.5 * _height, pen); + // active + pen.setColor(active); + scene->addLine(-0.5 * _height, 0.5 * _height, percent * _width - 0.5 * _height, 0.5 * _height, pen); + // scale + scale[0] = -2 * (int)_direction + 1; + break; + } + + // convert + QPixmap pixmap = QPixmap::grabWidget(view).transformed(QTransform().scale(scale[0], scale[1])); + QByteArray byteArray; + QBuffer buffer(&byteArray); + pixmap.save(&buffer, "PNG"); + QString url = QString("").arg(QString(byteArray.toBase64())); + delete view; + delete scene; + + return url; +} + + +QString GraphicalItem::getFileName() +{ + if (debug) qDebug() << PDEBUG; + + return fileName; +} + + +QString GraphicalItem::getName() +{ + if (debug) qDebug() << PDEBUG; + + return _name; +} + + +QString GraphicalItem::getComment() +{ + if (debug) qDebug() << PDEBUG; + + return _comment; +} + + +QString GraphicalItem::getBar() +{ + if (debug) qDebug() << PDEBUG; + + return _bar; +} + + +QString GraphicalItem::getActiveColor() +{ + if (debug) qDebug() << PDEBUG; + + return _activeColor; +} + + +QString GraphicalItem::getInactiveColor() +{ + if (debug) qDebug() << PDEBUG; + + return _inactiveColor; +} + + +GraphicalItem::Type GraphicalItem::getType() +{ + if (debug) qDebug() << PDEBUG; + + return _type; +} + + +QString GraphicalItem::getStrType() +{ + if (debug) qDebug() << PDEBUG; + + QString value; + switch(_type) { + case Vertical: + value = QString("Vertical"); + break; + case Circle: + value = QString("Circle"); + break; + default: + value = QString("Horizontal"); + break; + }\ + + return value; +} + + +GraphicalItem::Direction GraphicalItem::getDirection() +{ + if (debug) qDebug() << PDEBUG; + + return _direction; +} + + +QString GraphicalItem::getStrDirection() +{ + if (debug) qDebug() << PDEBUG; + + QString value; + switch (_direction) { + case RightToLeft: + value = QString("RightToLeft"); + break; + default: + value = QString("LeftToRight"); + break; + } + + return value; +} + + +int GraphicalItem::getHeight() +{ + if (debug) qDebug() << PDEBUG; + + return _height; +} + + +int GraphicalItem::getWidth() +{ + if (debug) qDebug() << PDEBUG; + + return _width; +} + + +void GraphicalItem::setName(const QString name) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Name" << name; + + _name = name; +} + + +void GraphicalItem::setComment(const QString comment) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Comment" << comment; + + _comment = comment; +} + + +void GraphicalItem::setBar(const QString bar) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Bar" << bar; + + _bar = bar; + if ((!_bar.contains(QRegExp(QString("cpu(?!cl).*")))) && + (!_bar.contains(QRegExp(QString("gpu")))) && + (!_bar.contains(QRegExp(QString("mem")))) && + (!_bar.contains(QRegExp(QString("swap")))) && + (!_bar.contains(QRegExp(QString("hdd[0-9].*")))) && + (!_bar.contains(QRegExp(QString("bat.*"))))) + _bar = QString("none"); +} + + +void GraphicalItem::setActiveColor(const QString color) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Color" << color; + + _activeColor = color; +} + + +void GraphicalItem::setInactiveColor(const QString color) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Color" << color; + + _inactiveColor = color; +} + + +void GraphicalItem::setType(const QString type) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Type" << type; + + if (type == QString("Vertical")) + _type = Vertical; + else if (type == QString("Circle")) + _type = Circle; + else + _type = Horizontal; +} + + +void GraphicalItem::setDirection(const QString direction) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Direction" << direction; + + if (direction == QString("RightToLeft")) + _direction = RightToLeft; + else + _direction = LeftToRight; +} + + +void GraphicalItem::setHeight(const int height) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Height" << height; + if (height <= 0) return; + + _height = height; +} + + +void GraphicalItem::setWidth(const int width) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Width" << width; + if (width <= 0) return; + + _width = width; +} + + +void GraphicalItem::readConfiguration() +{ + if (debug) qDebug() << PDEBUG; + + for (int i=dirs.count()-1; i>=0; i--) { + if (!QDir(dirs[i]).entryList(QDir::Files).contains(fileName)) continue; + QSettings settings(dirs[i] + QDir::separator() + fileName, QSettings::IniFormat); + settings.beginGroup(QString("Desktop Entry")); + setName(settings.value(QString("Name"), _name).toString()); + setComment(settings.value(QString("Comment"), _comment).toString()); + setBar(settings.value(QString("X-AW-Value"), _bar).toString()); + setActiveColor(settings.value(QString("X-AW-ActiveColor"), _activeColor).toString()); + setInactiveColor(settings.value(QString("X-AW-InactiveColor"), _inactiveColor).toString()); + setType(settings.value(QString("X-AW-Type"), getStrType()).toString()); + setDirection(settings.value(QString("X-AW-Direction"), getStrDirection()).toString()); + setHeight(settings.value(QString("X-AW-Height"), QString::number(_height)).toInt()); + setWidth(settings.value(QString("X-AW-Width"), QString::number(_width)).toInt()); + settings.endGroup(); + } +} + + +void GraphicalItem::showConfiguration(const QStringList tags) +{ + if (debug) qDebug() << PDEBUG; + + ui->label_nameValue->setText(_name); + ui->lineEdit_comment->setText(_comment); + ui->comboBox_value->addItems(tags); + ui->comboBox_value->addItem(_bar); + ui->comboBox_value->setCurrentIndex(ui->comboBox_value->count() - 1); + ui->pushButton_activeColor->setText(_activeColor); + ui->pushButton_inactiveColor->setText(_inactiveColor); + ui->comboBox_type->setCurrentIndex((int)_type); + ui->comboBox_direction->setCurrentIndex((int)_direction); + ui->spinBox_height->setValue(_height); + ui->spinBox_width->setValue(_width); + + int ret = exec(); + if (ret != 1) return; + setName(ui->label_nameValue->text()); + setComment(ui->lineEdit_comment->text()); + setBar(ui->comboBox_value->currentText()); + setActiveColor(ui->pushButton_activeColor->text().remove(QChar('&'))); + setInactiveColor(ui->pushButton_inactiveColor->text().remove(QChar('&'))); + setType(ui->comboBox_type->currentText()); + setDirection(ui->comboBox_direction->currentText()); + setHeight(ui->spinBox_height->value()); + setWidth(ui->spinBox_width->value()); + + writeConfiguration(); +} + + +void GraphicalItem::tryDelete() +{ + if (debug) qDebug() << PDEBUG; + + for (int i=0; itext()); + QColor newColor = QColorDialog::getColor(color, 0, i18n("Select color"), + QColorDialog::ShowAlphaChannel); + if (!newColor.isValid()) return; + + QStringList colorText; + colorText.append(QString("%1").arg(newColor.red())); + colorText.append(QString("%1").arg(newColor.green())); + colorText.append(QString("%1").arg(newColor.blue())); + colorText.append(QString("%1").arg(newColor.alpha())); + ((QPushButton *)sender())->setText(colorText.join(QChar(','))); +} + + +QColor GraphicalItem::stringToColor(const QString color) +{ + if (debug) qDebug() << PDEBUG; + if (debug) qDebug() << PDEBUG << ":" << "Color" << color; + + QColor qcolor; + QStringList listColor = color.split(QChar(',')); + while (listColor.count() < 4) + listColor.append(QString("0")); + qcolor.setRed(listColor[0].toInt()); + qcolor.setGreen(listColor[1].toInt()); + qcolor.setBlue(listColor[2].toInt()); + qcolor.setAlpha(listColor[3].toInt()); + + return qcolor; +} diff --git a/sources/awesome-widget-kf5/plugin/graphicalitem.h b/sources/awesome-widget-kf5/plugin/graphicalitem.h new file mode 100644 index 0000000..1795393 --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/graphicalitem.h @@ -0,0 +1,98 @@ +/*************************************************************************** + * This file is part of awesome-widgets * + * * + * awesome-widgets is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * awesome-widgets is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with awesome-widgets. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#ifndef GRAPHICALITEM_H +#define GRAPHICALITEM_H + +#include +#include + +namespace Ui { +class GraphicalItem; +} + +class GraphicalItem : public QDialog +{ + Q_OBJECT + +public: + enum Direction { + LeftToRight = 0, + RightToLeft + }; + enum Type { + Horizontal = 0, + Vertical, + Circle + }; + + explicit GraphicalItem(QWidget *parent = 0, const QString desktopName = QString(), + const QStringList directories = QStringList(), const bool debugCmd = false); + ~GraphicalItem(); + QString getImage(const float value); + // get methods + QString getFileName(); + QString getName(); + QString getComment(); + QString getBar(); + QString getActiveColor(); + QString getInactiveColor(); + Type getType(); + QString getStrType(); + Direction getDirection(); + QString getStrDirection(); + int getHeight(); + int getWidth(); + // set methods + void setName(const QString name = QString("none")); + void setComment(const QString comment = QString("empty")); + void setBar(const QString bar = QString("cpu")); + void setActiveColor(const QString color = QString("0,0,0,130")); + void setInactiveColor(const QString color = QString("255,255,255,130")); + void setType(const QString type = QString("Horizontal")); + void setDirection(const QString direction = QString("LeftToRight")); + void setHeight(const int height = 100); + void setWidth(const int width = 100); + +public slots: + void readConfiguration(); + void showConfiguration(const QStringList tags = QStringList()); + void tryDelete(); + void writeConfiguration(); + +private slots: + void changeColor(); + +private: + QColor stringToColor(const QString color); + QString fileName; + QStringList dirs; + bool debug; + Ui::GraphicalItem *ui; + // properties + QString _name = QString("none"); + QString _comment = QString("empty"); + QString _bar = QString("cpu"); + QString _activeColor = QString("0,0,0,130"); + QString _inactiveColor = QString("255,255,255,130"); + Type _type = Horizontal; + Direction _direction = LeftToRight; + int _height = 100; + int _width = 100; +}; + +#endif /* GRAPHICALITEM_H */ diff --git a/sources/awesome-widget-kf5/plugin/graphicalitem.ui b/sources/awesome-widget-kf5/plugin/graphicalitem.ui new file mode 100644 index 0000000..a5afb71 --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/graphicalitem.ui @@ -0,0 +1,293 @@ + + + GraphicalItem + + + + 0 + 0 + 416 + 325 + + + + Configuration + + + + + + + + Name + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + + + + 0 + 0 + + + + Comment + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + Value + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + + + + + + + + + Active color + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + + + Inactive color + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + + + Type + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Horizontal + + + + + Vertical + + + + + Circle + + + + + + + + + + + + Direction + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + LeftToRight + + + + + RightToLeft + + + + + + + + + + + + Height + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 2000 + + + 25 + + + + + + + + + + + Width + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 2000 + + + 25 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + GraphicalItem + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + GraphicalItem + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/sources/awesome-widget-kf5/plugin/plasma-applet-org.kde.plasma.awesome-widget.notifyrc b/sources/awesome-widget-kf5/plugin/plasma-applet-org.kde.plasma.awesome-widget.notifyrc new file mode 100644 index 0000000..5cca673 --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/plasma-applet-org.kde.plasma.awesome-widget.notifyrc @@ -0,0 +1,14 @@ +[Global] +IconName=system +Name=Awesome Widget +Comment=Awesome widget information + +[Event/system] +Name=System information +Comment=System information +Action=Popup + +[Event/tag] +Name=Tag information +Comment=Tag information +Action=Popup diff --git a/sources/awesome-widget-kf5/plugin/qmldir b/sources/awesome-widget-kf5/plugin/qmldir new file mode 100644 index 0000000..2c16903 --- /dev/null +++ b/sources/awesome-widget-kf5/plugin/qmldir @@ -0,0 +1,3 @@ +module org.kde.plasma.private.awesome-widget + +plugin awplugin diff --git a/sources/desktop-panel/CMakeLists.txt b/sources/desktop-panel-kde4/CMakeLists.txt similarity index 100% rename from sources/desktop-panel/CMakeLists.txt rename to sources/desktop-panel-kde4/CMakeLists.txt diff --git a/sources/desktop-panel/appearance.ui b/sources/desktop-panel-kde4/appearance.ui similarity index 100% rename from sources/desktop-panel/appearance.ui rename to sources/desktop-panel-kde4/appearance.ui diff --git a/sources/desktop-panel/desktop-panel.cpp b/sources/desktop-panel-kde4/desktop-panel.cpp similarity index 100% rename from sources/desktop-panel/desktop-panel.cpp rename to sources/desktop-panel-kde4/desktop-panel.cpp diff --git a/sources/desktop-panel/desktop-panel.h b/sources/desktop-panel-kde4/desktop-panel.h similarity index 100% rename from sources/desktop-panel/desktop-panel.h rename to sources/desktop-panel-kde4/desktop-panel.h diff --git a/sources/desktop-panel/plasma-applet-desktoppanel.desktop b/sources/desktop-panel-kde4/plasma-applet-desktoppanel.desktop similarity index 100% rename from sources/desktop-panel/plasma-applet-desktoppanel.desktop rename to sources/desktop-panel-kde4/plasma-applet-desktoppanel.desktop diff --git a/sources/desktop-panel/po/CMakeLists.txt b/sources/desktop-panel-kde4/po/CMakeLists.txt similarity index 100% rename from sources/desktop-panel/po/CMakeLists.txt rename to sources/desktop-panel-kde4/po/CMakeLists.txt diff --git a/sources/desktop-panel/po/en.po b/sources/desktop-panel-kde4/po/en.po similarity index 100% rename from sources/desktop-panel/po/en.po rename to sources/desktop-panel-kde4/po/en.po diff --git a/sources/desktop-panel/po/es.po b/sources/desktop-panel-kde4/po/es.po similarity index 100% rename from sources/desktop-panel/po/es.po rename to sources/desktop-panel-kde4/po/es.po diff --git a/sources/desktop-panel/po/extract_messages.sh b/sources/desktop-panel-kde4/po/extract_messages.sh similarity index 100% rename from sources/desktop-panel/po/extract_messages.sh rename to sources/desktop-panel-kde4/po/extract_messages.sh diff --git a/sources/desktop-panel/po/fr.po b/sources/desktop-panel-kde4/po/fr.po similarity index 100% rename from sources/desktop-panel/po/fr.po rename to sources/desktop-panel-kde4/po/fr.po diff --git a/sources/desktop-panel/po/plasma_applet_desktop-panel.pot b/sources/desktop-panel-kde4/po/plasma_applet_desktop-panel.pot similarity index 100% rename from sources/desktop-panel/po/plasma_applet_desktop-panel.pot rename to sources/desktop-panel-kde4/po/plasma_applet_desktop-panel.pot diff --git a/sources/desktop-panel/po/pt_BR.po b/sources/desktop-panel-kde4/po/pt_BR.po similarity index 100% rename from sources/desktop-panel/po/pt_BR.po rename to sources/desktop-panel-kde4/po/pt_BR.po diff --git a/sources/desktop-panel/po/ru.po b/sources/desktop-panel-kde4/po/ru.po similarity index 100% rename from sources/desktop-panel/po/ru.po rename to sources/desktop-panel-kde4/po/ru.po diff --git a/sources/desktop-panel/po/uk.po b/sources/desktop-panel-kde4/po/uk.po similarity index 100% rename from sources/desktop-panel/po/uk.po rename to sources/desktop-panel-kde4/po/uk.po diff --git a/sources/desktop-panel/po/zh.po b/sources/desktop-panel-kde4/po/zh.po similarity index 100% rename from sources/desktop-panel/po/zh.po rename to sources/desktop-panel-kde4/po/zh.po diff --git a/sources/desktop-panel/toggle.ui b/sources/desktop-panel-kde4/toggle.ui similarity index 100% rename from sources/desktop-panel/toggle.ui rename to sources/desktop-panel-kde4/toggle.ui diff --git a/sources/desktop-panel/widget.ui b/sources/desktop-panel-kde4/widget.ui similarity index 100% rename from sources/desktop-panel/widget.ui rename to sources/desktop-panel-kde4/widget.ui diff --git a/sources/awesome-widget/desktops/aw-bat-bar.desktop b/sources/desktops/aw-bat-bar.desktop similarity index 100% rename from sources/awesome-widget/desktops/aw-bat-bar.desktop rename to sources/desktops/aw-bat-bar.desktop diff --git a/sources/awesome-widget/desktops/aw-cpu-bar.desktop b/sources/desktops/aw-cpu-bar.desktop similarity index 100% rename from sources/awesome-widget/desktops/aw-cpu-bar.desktop rename to sources/desktops/aw-cpu-bar.desktop diff --git a/sources/awesome-widget/desktops/aw-mem-bar.desktop b/sources/desktops/aw-mem-bar.desktop similarity index 100% rename from sources/awesome-widget/desktops/aw-mem-bar.desktop rename to sources/desktops/aw-mem-bar.desktop diff --git a/sources/awesome-widget/desktops/aw-swap-bar.desktop b/sources/desktops/aw-swap-bar.desktop similarity index 100% rename from sources/awesome-widget/desktops/aw-swap-bar.desktop rename to sources/desktops/aw-swap-bar.desktop diff --git a/sources/awesome-widget/desktops/bar-template.desktop b/sources/desktops/bar-template.desktop similarity index 100% rename from sources/awesome-widget/desktops/bar-template.desktop rename to sources/desktops/bar-template.desktop diff --git a/sources/awesome-widget/po/CMakeLists.txt b/sources/translations/CMakeLists.txt similarity index 100% rename from sources/awesome-widget/po/CMakeLists.txt rename to sources/translations/CMakeLists.txt diff --git a/sources/awesome-widget/po/en.po b/sources/translations/en.po similarity index 100% rename from sources/awesome-widget/po/en.po rename to sources/translations/en.po diff --git a/sources/awesome-widget/po/es.po b/sources/translations/es.po similarity index 100% rename from sources/awesome-widget/po/es.po rename to sources/translations/es.po diff --git a/sources/awesome-widget/po/extract_messages.sh b/sources/translations/extract_messages.sh similarity index 100% rename from sources/awesome-widget/po/extract_messages.sh rename to sources/translations/extract_messages.sh diff --git a/sources/awesome-widget/po/fr.po b/sources/translations/fr.po similarity index 100% rename from sources/awesome-widget/po/fr.po rename to sources/translations/fr.po diff --git a/sources/awesome-widget/po/plasma_applet_awesome-widget.pot b/sources/translations/plasma_applet_awesome-widget.pot similarity index 100% rename from sources/awesome-widget/po/plasma_applet_awesome-widget.pot rename to sources/translations/plasma_applet_awesome-widget.pot diff --git a/sources/awesome-widget/po/pt_BR.po b/sources/translations/pt_BR.po similarity index 100% rename from sources/awesome-widget/po/pt_BR.po rename to sources/translations/pt_BR.po diff --git a/sources/awesome-widget/po/ru.po b/sources/translations/ru.po similarity index 100% rename from sources/awesome-widget/po/ru.po rename to sources/translations/ru.po diff --git a/sources/awesome-widget/po/uk.po b/sources/translations/uk.po similarity index 100% rename from sources/awesome-widget/po/uk.po rename to sources/translations/uk.po diff --git a/sources/awesome-widget/po/zh.po b/sources/translations/zh.po similarity index 100% rename from sources/awesome-widget/po/zh.po rename to sources/translations/zh.po