Don't allow more than one indicator

This commit is contained in:
Albert Vaca 2017-05-24 22:52:14 +02:00
parent 35a9bde458
commit 58f9045bfa
2 changed files with 4 additions and 1 deletions

View file

@ -2,7 +2,7 @@ find_package(KF5Notifications REQUIRED)
find_package(KF5KCMUtils REQUIRED)
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(PROGRAMS org.kde.kdeconnect.nonplasma.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})

View file

@ -31,6 +31,7 @@
#include <KStatusNotifierItem>
#endif
#include <KDBusService>
#include <KAboutData>
#include <KCMultiDialog>
#include <KLocalizedString>
@ -52,6 +53,8 @@ int main(int argc, char** argv)
i18n("(C) 2016 Aleix Pol Gonzalez"));
KAboutData::setApplicationData(about);
KDBusService dbusService(KDBusService::Unique);
DevicesModel model;
model.setDisplayFilter(DevicesModel::Reachable | DevicesModel::Paired);