Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/EditContextMenu.qml
Show All 38 Lines | 28 | PlasmaComponents.ContextMenu { | |||
---|---|---|---|---|---|
39 | 39 | | |||
40 | onStatusChanged: { | 40 | onStatusChanged: { | ||
41 | if (status === PlasmaComponents.DialogStatus.Closed) { | 41 | if (status === PlasmaComponents.DialogStatus.Closed) { | ||
42 | closed(); | 42 | closed(); | ||
43 | } | 43 | } | ||
44 | } | 44 | } | ||
45 | 45 | | |||
46 | PlasmaComponents.MenuItem { | 46 | PlasmaComponents.MenuItem { | ||
47 | text: i18n("Copy Link Address") | 47 | text: i18nd("plasma_applet_org.kde.plasma.notifications", "Copy Link Address") | ||
48 | onClicked: __clipboard.content = contextMenu.link | 48 | onClicked: __clipboard.content = contextMenu.link | ||
49 | visible: contextMenu.link !== "" | 49 | visible: contextMenu.link !== "" | ||
50 | } | 50 | } | ||
51 | 51 | | |||
52 | PlasmaComponents.MenuItem { | 52 | PlasmaComponents.MenuItem { | ||
53 | separator: true | 53 | separator: true | ||
54 | visible: contextMenu.link !== "" | 54 | visible: contextMenu.link !== "" | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | PlasmaComponents.MenuItem { | 57 | PlasmaComponents.MenuItem { | ||
58 | text: i18n("Copy") | 58 | text: i18nd("plasma_applet_org.kde.plasma.notifications", "Copy") | ||
59 | icon: "edit-copy" | 59 | icon: "edit-copy" | ||
60 | enabled: typeof target.selectionStart !== "undefined" | 60 | enabled: typeof target.selectionStart !== "undefined" | ||
61 | ? target.selectionStart !== target.selectionEnd | 61 | ? target.selectionStart !== target.selectionEnd | ||
62 | : (target.text || "").length > 0 | 62 | : (target.text || "").length > 0 | ||
63 | onClicked: { | 63 | onClicked: { | ||
64 | if (typeof target.copy === "function") { | 64 | if (typeof target.copy === "function") { | ||
65 | target.copy(); | 65 | target.copy(); | ||
66 | } else { | 66 | } else { | ||
67 | __clipboard.content = target.text; | 67 | __clipboard.content = target.text; | ||
68 | } | 68 | } | ||
69 | } | 69 | } | ||
70 | } | 70 | } | ||
71 | 71 | | |||
72 | PlasmaComponents.MenuItem { | 72 | PlasmaComponents.MenuItem { | ||
73 | id: selectAllAction | 73 | id: selectAllAction | ||
74 | text: i18n("Select All") | 74 | text: i18nd("plasma_applet_org.kde.plasma.notifications", "Select All") | ||
75 | onClicked: target.selectAll() | 75 | onClicked: target.selectAll() | ||
76 | visible: typeof target.selectAll === "function" | 76 | visible: typeof target.selectAll === "function" | ||
77 | } | 77 | } | ||
78 | } | 78 | } |