Don't allow more than one indicator
This commit is contained in:
parent
35a9bde458
commit
58f9045bfa
2 changed files with 4 additions and 1 deletions
|
@ -2,7 +2,7 @@ find_package(KF5Notifications REQUIRED)
|
||||||
find_package(KF5KCMUtils REQUIRED)
|
find_package(KF5KCMUtils REQUIRED)
|
||||||
|
|
||||||
add_executable(kdeconnect-indicator main.cpp deviceindicator.cpp)
|
add_executable(kdeconnect-indicator main.cpp deviceindicator.cpp)
|
||||||
target_link_libraries(kdeconnect-indicator Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::KCMUtils kdeconnectinterfaces)
|
target_link_libraries(kdeconnect-indicator Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::DBusAddons KF5::KCMUtils kdeconnectinterfaces)
|
||||||
|
|
||||||
install(TARGETS kdeconnect-indicator ${INSTALL_TARGETS_DEFAULT_ARGS})
|
install(TARGETS kdeconnect-indicator ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
install(PROGRAMS org.kde.kdeconnect.nonplasma.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
|
install(PROGRAMS org.kde.kdeconnect.nonplasma.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include <KStatusNotifierItem>
|
#include <KStatusNotifierItem>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <KDBusService>
|
||||||
#include <KAboutData>
|
#include <KAboutData>
|
||||||
#include <KCMultiDialog>
|
#include <KCMultiDialog>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
|
@ -52,6 +53,8 @@ int main(int argc, char** argv)
|
||||||
i18n("(C) 2016 Aleix Pol Gonzalez"));
|
i18n("(C) 2016 Aleix Pol Gonzalez"));
|
||||||
KAboutData::setApplicationData(about);
|
KAboutData::setApplicationData(about);
|
||||||
|
|
||||||
|
KDBusService dbusService(KDBusService::Unique);
|
||||||
|
|
||||||
DevicesModel model;
|
DevicesModel model;
|
||||||
model.setDisplayFilter(DevicesModel::Reachable | DevicesModel::Paired);
|
model.setDisplayFilter(DevicesModel::Reachable | DevicesModel::Paired);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue