Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions contents/config/config.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/

import QtQuick 2.0
import QtQml 2.2
pragma ComponentBehavior: Bound

import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.configuration 2.0
import org.kde.plasma.workspace.calendar 2.0 as PlasmaCalendar
import QtQuick

import org.kde.plasma.plasmoid
import org.kde.plasma.configuration
import org.kde.plasma.workspace.calendar as PlasmaCalendar

ConfigModel {
id: configModel
Expand All @@ -29,23 +30,26 @@ ConfigModel {
name: i18n("Time Zones")
icon: "preferences-system-time"
source: "configTimeZones.qml"
includeMargins: false
}

property QtObject eventPluginsManager: PlasmaCalendar.EventPluginsManager {
readonly property PlasmaCalendar.EventPluginsManager eventPluginsManager: PlasmaCalendar.EventPluginsManager {
Component.onCompleted: {
populateEnabledPluginsList(Plasmoid.configuration.enabledCalendarPlugins);
}
}

property Instantiator __eventPlugins: Instantiator {
model: eventPluginsManager.model
readonly property Instantiator __eventPlugins: Instantiator {
model: configModel.eventPluginsManager.model
delegate: ConfigCategory {
name: model.display
icon: model.decoration
source: model.configUi
includeMargins: false
visible: Plasmoid.configuration.enabledCalendarPlugins.indexOf(model.pluginId) > -1
required property string display
required property string decoration
required property string configUi
required property string pluginId

name: display
icon: decoration
source: configUi
visible: Plasmoid.configuration.enabledCalendarPlugins.indexOf(pluginId) > -1
}

onObjectAdded: (index, object) => configModel.appendCategory(object)
Expand Down
8 changes: 4 additions & 4 deletions contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<group name="Appearance">
<entry name="showLocalTimezone" type="Bool">
<label>Whether the timezone should be displayed when the clock is showing the local timezone.</label>
<label>Whether the time zone should be displayed when the clock is showing the local time zone.</label>
<default>false</default>
</entry>
<entry name="showSeconds" type="Enum">
Expand Down Expand Up @@ -71,15 +71,15 @@
<default>Local</default>
</entry>
<entry name="lastSelectedTimezone" type="String">
<label>When multiple time zones are configured, this is the one shown on widget restore. Typically the system's current timezone.</label>
<label>When multiple time zones are configured, this is the one shown on widget restore. Typically the system's current time zone.</label>
<default>Local</default>
</entry>
<entry name="wheelChangesTimezone" type="Bool">
<label>Whether the mouse wheel switches between the timezones configured in selectedTimeZones.</label>
<label>Whether the mouse wheel switches between the time zones configured in selectedTimeZones.</label>
<default>false</default>
</entry>
<entry name="displayTimezoneFormat" type="Enum">
<label>Whether the timezone is displayed as a code i.e. "GMT", full text i.e. "London" or UTC offset "+1".</label>
<label>Whether the time zone is displayed as a code i.e. "GMT", full text i.e. "London" or UTC offset "+1".</label>
<choices name="Settings::displayTimezoneFormat">
<choice name="Code" />
<choice name="FullText" />
Expand Down
Loading