From 80c58c124caf17f670d8efc120f5ae4bfd9aa09f Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Tue, 14 May 2013 01:13:41 +0200 Subject: added liveview watchlet menu (API break) --- notificationswatchlet/notificationswatchletplugin.cpp | 6 ++++-- notificationswatchlet/notificationswatchletplugin.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'notificationswatchlet') diff --git a/notificationswatchlet/notificationswatchletplugin.cpp b/notificationswatchlet/notificationswatchletplugin.cpp index 4b26a14..19d3b91 100644 --- a/notificationswatchlet/notificationswatchletplugin.cpp +++ b/notificationswatchlet/notificationswatchletplugin.cpp @@ -19,12 +19,14 @@ QStringList NotificationsWatchletPlugin::watchlets() return l; } -WatchletPluginInterface::WatchletInfo NotificationsWatchletPlugin::describeWatchlet(const QString &id) +WatchletPluginInterface::WatchletInfo NotificationsWatchletPlugin::describeWatchlet(const QString &id, const QString &watchModel) { WatchletInfo info; if (id != "com.javispedro.sowatch.notifications") return info; info.name = "Pending notifications"; - info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/notificationswatchlet/icon.png"); + info.icon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/notificationswatchlet/" + watchModel + "-icon.png"); + info.phoneIcon = QUrl::fromLocalFile(SOWATCH_QML_DIR "/notificationswatchlet/icon.png"); + info.visible = true; return info; } diff --git a/notificationswatchlet/notificationswatchletplugin.h b/notificationswatchlet/notificationswatchletplugin.h index 472af5c..a52e638 100644 --- a/notificationswatchlet/notificationswatchletplugin.h +++ b/notificationswatchlet/notificationswatchletplugin.h @@ -16,7 +16,7 @@ public: ~NotificationsWatchletPlugin(); QStringList watchlets(); - WatchletInfo describeWatchlet(const QString &id); + WatchletInfo describeWatchlet(const QString &id, const QString &watchModel); Watchlet* getWatchlet(const QString& id, ConfigKey *settings, Watch* watch); }; -- cgit v1.2.3