Changeset View
Changeset View
Standalone View
Standalone View
applets/clipboard/contents/ui/clipboard.qml
Show All 36 Lines | 28 | Item { | |||
---|---|---|---|---|---|
37 | Plasmoid.toolTipSubText: isClipboardEmpty ? i18n("Clipboard is empty") : clipboardSource.data["clipboard"]["current"] | 37 | Plasmoid.toolTipSubText: isClipboardEmpty ? i18n("Clipboard is empty") : clipboardSource.data["clipboard"]["current"] | ||
38 | Plasmoid.toolTipTextFormat: Text.PlainText | 38 | Plasmoid.toolTipTextFormat: Text.PlainText | ||
39 | Plasmoid.icon: "klipper" | 39 | Plasmoid.icon: "klipper" | ||
40 | 40 | | |||
41 | function action_configure() { | 41 | function action_configure() { | ||
42 | clipboardSource.service("", "configureKlipper"); | 42 | clipboardSource.service("", "configureKlipper"); | ||
43 | } | 43 | } | ||
44 | 44 | | |||
45 | onIsClipboardEmptyChanged: { | 45 | function onIsClipboardEmptyChanged() { | ||
46 | if (isClipboardEmpty) { | 46 | if (isClipboardEmpty) { | ||
47 | // We need to hide the applet before changing its status to passive | 47 | // We need to hide the applet before changing its status to passive | ||
48 | // because only the active applet can hide itself | 48 | // because only the active applet can hide itself | ||
49 | if (plasmoid.hideOnWindowDeactivate) | 49 | if (plasmoid.hideOnWindowDeactivate) | ||
50 | plasmoid.expanded = false; | 50 | plasmoid.expanded = false; | ||
51 | Plasmoid.status = PlasmaCore.Types.PassiveStatus; | 51 | Plasmoid.status = PlasmaCore.Types.PassiveStatus; | ||
52 | } else { | 52 | } else { | ||
53 | Plasmoid.status = PlasmaCore.Types.ActiveStatus | 53 | Plasmoid.status = PlasmaCore.Types.ActiveStatus | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |