Browse Source

Add copy functionality.

pull/101/head
Abhishek 4 years ago
parent
commit
1226827712
  1. 6
      Clocker/Panel/UI/TimezoneCellView.swift

6
Clocker/Panel/UI/TimezoneCellView.swift

@ -198,6 +198,12 @@ class TimezoneCellView: NSTableCellView {
}
override func mouseDown(with _: NSEvent) {
// Text is copied in the following format: Chicago - 1625185925
let clipboardCopy = "\(customName.stringValue) - \(time.stringValue)"
let pasteboard = NSPasteboard.general
pasteboard.declareTypes([.string], owner: nil)
pasteboard.setString(clipboardCopy, forType: .string)
window?.endEditing(for: nil)
}

Loading…
Cancel
Save