-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Context menu is now showed programatically (it's a surprise tool that will help us later)
- Loading branch information
1 parent
ca843ed
commit bd0dcae
Showing
5 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Sessions Extension/SafariExtensionViewController/TableView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// TableView.swift | ||
// Sessions Extension | ||
// | ||
// Created by Alex Perathoner on 28/02/2021. | ||
// Copyright © 2021 Alex Perathoner. All rights reserved. | ||
// | ||
|
||
import Cocoa | ||
|
||
class TableView: NSTableView { | ||
weak var singleMenu: NSMenu! | ||
|
||
override func rightMouseDown(with event: NSEvent) { | ||
super.rightMouseDown(with: event) | ||
let correctLocation = convert(event.locationInWindow, from: nil) | ||
singleMenu.popUp(positioning: singleMenu.items.first, at: correctLocation, in: self) | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters