Changeset View
Changeset View
Standalone View
Standalone View
kcms/notifications/package/contents/ui/SourcesPage.qml
Show All 28 Lines | |||||
29 | 29 | | |||
30 | Kirigami.Page { | 30 | Kirigami.Page { | ||
31 | id: sourcesPage | 31 | id: sourcesPage | ||
32 | title: i18n("Application Settings") | 32 | title: i18n("Application Settings") | ||
33 | 33 | | |||
34 | Component.onCompleted: { | 34 | Component.onCompleted: { | ||
35 | kcm.sourcesModel.load(); | 35 | kcm.sourcesModel.load(); | ||
36 | 36 | | |||
37 | if (kcm.initialDesktopEntry) { | 37 | var idx = kcm.sourcesModel.persistentIndexForDesktopEntry(kcm.initialDesktopEntry); | ||
38 | appConfiguration.rootIndex = kcm.sourcesModel.persistentIndexForDesktopEntry(kcm.initialDesktopEntry); | 38 | if (!idx.valid) { | ||
39 | } else if (kcm.initialNotifyRcName) { | 39 | idx = kcm.sourcesModel.persistentIndexForNotifyRcName(kcm.initialNotifyRcName); | ||
40 | appConfiguration.rootIndex = kcm.sourcesModel.persistentIndexForNotifyRcName(kcm.initialNotifyRcName); | | |||
41 | } | 40 | } | ||
41 | appConfiguration.rootIndex = idx; | ||||
42 | 42 | | |||
43 | if (kcm.initialEventId && kcm.initialNotifyRcName) { | 43 | if (kcm.initialEventId && kcm.initialNotifyRcName) { | ||
44 | appConfiguration.configureEvents(kcm.initialEventId); | 44 | appConfiguration.configureEvents(kcm.initialEventId); | ||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | kcm.initialDesktopEntry = ""; | 47 | kcm.initialDesktopEntry = ""; | ||
48 | kcm.initialNotifyRcName = ""; | 48 | kcm.initialNotifyRcName = ""; | ||
49 | kcm.initialEventId = ""; | 49 | kcm.initialEventId = ""; | ||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |