Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/main.qml
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Line(s) | 118 | PlasmaExtras.ScrollArea { | |||
---|---|---|---|---|---|
171 | ] | 171 | ] | ||
172 | } | 172 | } | ||
173 | 173 | | |||
174 | function action_clearNotifications() { | 174 | function action_clearNotifications() { | ||
175 | notifications.clearNotifications() | 175 | notifications.clearNotifications() | ||
176 | } | 176 | } | ||
177 | 177 | | |||
178 | function action_notificationskcm() { | 178 | function action_notificationskcm() { | ||
179 | ProcessRunner.runNotificationsKCM() | 179 | KCMShell.open("kcmnotify"); | ||
180 | } | 180 | } | ||
181 | 181 | | |||
182 | Component.onCompleted: { | 182 | Component.onCompleted: { | ||
183 | plasmoid.setAction("clearNotifications", i18n("Clear Notifications"), "edit-clear") | 183 | plasmoid.setAction("clearNotifications", i18n("Clear Notifications"), "edit-clear") | ||
184 | var clearAction = plasmoid.action("clearNotifications"); | 184 | var clearAction = plasmoid.action("clearNotifications"); | ||
185 | clearAction.visible = Qt.binding(function() { | 185 | clearAction.visible = Qt.binding(function() { | ||
186 | return notificationsApplet.notifications && notificationsApplet.notifications.count > 0 | 186 | return notificationsApplet.notifications && notificationsApplet.notifications.count > 0 | ||
187 | }) | 187 | }) | ||
188 | 188 | | |||
189 | //var allApplications = new Object | 189 | if (KCMShell.authorize("kcmnotify.desktop").length > 0) { | ||
190 | plasmoid.setAction("notificationskcm", i18n("&Configure Event Notifications and Actions..."), "preferences-desktop-notification") | 190 | plasmoid.setAction("notificationskcm", i18n("&Configure Event Notifications and Actions..."), "preferences-desktop-notification") | ||
191 | } | 191 | } | ||
192 | } | 192 | } | ||
193 | } |