aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/macOS
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard/WireGuard/UI/macOS')
-rw-r--r--WireGuard/WireGuard/UI/macOS/View/KeyValueRow.swift (renamed from WireGuard/WireGuard/UI/macOS/View/KeyValueCell.swift)2
-rw-r--r--WireGuard/WireGuard/UI/macOS/View/TunnelListRow.swift (renamed from WireGuard/WireGuard/UI/macOS/View/TunnelListCell.swift)6
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift4
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift2
4 files changed, 7 insertions, 7 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/View/KeyValueCell.swift b/WireGuard/WireGuard/UI/macOS/View/KeyValueRow.swift
index 47f9263..4e9fa7d 100644
--- a/WireGuard/WireGuard/UI/macOS/View/KeyValueCell.swift
+++ b/WireGuard/WireGuard/UI/macOS/View/KeyValueRow.swift
@@ -3,7 +3,7 @@
import Cocoa
-class KeyValueCell: NSView {
+class KeyValueRow: NSView {
let keyLabel: NSTextField = {
let keyLabel = NSTextField()
keyLabel.isEditable = false
diff --git a/WireGuard/WireGuard/UI/macOS/View/TunnelListCell.swift b/WireGuard/WireGuard/UI/macOS/View/TunnelListRow.swift
index 11bf73c..1a2f6a8 100644
--- a/WireGuard/WireGuard/UI/macOS/View/TunnelListCell.swift
+++ b/WireGuard/WireGuard/UI/macOS/View/TunnelListRow.swift
@@ -3,7 +3,7 @@
import Cocoa
-class TunnelListCell: NSView {
+class TunnelListRow: NSView {
var tunnel: TunnelContainer? {
didSet(value) {
// Bind to the tunnel's name
@@ -12,9 +12,9 @@ class TunnelListCell: NSView {
self?.nameLabel.stringValue = tunnel.name
}
// Bind to the tunnel's status
- statusImageView.image = TunnelListCell.image(for: tunnel?.status)
+ statusImageView.image = TunnelListRow.image(for: tunnel?.status)
statusObservationToken = tunnel?.observe(\TunnelContainer.status) { [weak self] tunnel, _ in
- self?.statusImageView.image = TunnelListCell.image(for: tunnel.status)
+ self?.statusImageView.image = TunnelListRow.image(for: tunnel.status)
}
}
}
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift
index 4a10f7d..8e7db43 100644
--- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift
+++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelDetailTableViewController.swift
@@ -215,14 +215,14 @@ extension TunnelDetailTableViewController: NSTableViewDelegate {
let modelRow = tableViewModelRows[row]
switch modelRow {
case .interfaceFieldRow(let field):
- let cell: KeyValueCell = tableView.dequeueReusableCell()
+ let cell: KeyValueRow = tableView.dequeueReusableCell()
let localizedKeyString = modelRow.isTitleRow() ? modelRow.localizedSectionKeyString() : field.localizedUIString
cell.key = tr(format: "macDetailFieldKey (%@)", localizedKeyString)
cell.value = tunnelViewModel.interfaceData[field]
cell.isKeyInBold = modelRow.isTitleRow()
return cell
case .peerFieldRow(let peerData, let field):
- let cell: KeyValueCell = tableView.dequeueReusableCell()
+ let cell: KeyValueRow = tableView.dequeueReusableCell()
let localizedKeyString = modelRow.isTitleRow() ? modelRow.localizedSectionKeyString() : field.localizedUIString
cell.key = tr(format: "macDetailFieldKey (%@)", localizedKeyString)
cell.value = peerData[field]
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift
index 7eee345..723814e 100644
--- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift
+++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelsListTableViewController.swift
@@ -258,7 +258,7 @@ extension TunnelsListTableViewController: NSTableViewDataSource {
extension TunnelsListTableViewController: NSTableViewDelegate {
func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
- let cell: TunnelListCell = tableView.dequeueReusableCell()
+ let cell: TunnelListRow = tableView.dequeueReusableCell()
cell.tunnel = tunnelsManager.tunnel(at: row)
return cell
}