mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-09 05:34:05 +02:00
Reorder notification context menu to place relevant items on top
Closes #81
This commit is contained in:
parent
28db1f4253
commit
d116ac5e56
@ -19,6 +19,7 @@ public ContextMenuNotification(FormNotification form, bool enableCustomMenu){
|
||||
|
||||
public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser browser, IFrame frame, IContextMenuParams parameters, IMenuModel model){
|
||||
model.Clear();
|
||||
base.OnBeforeContextMenu(browserControl, browser, frame, parameters, model);
|
||||
|
||||
if (enableCustomMenu){
|
||||
model.AddItem((CefMenuCommand)MenuSkipTweet, "Skip tweet");
|
||||
@ -37,14 +38,12 @@ public override void OnBeforeContextMenu(IWebBrowser browserControl, IBrowser br
|
||||
}
|
||||
}
|
||||
|
||||
base.OnBeforeContextMenu(browserControl, browser, frame, parameters, model);
|
||||
RemoveSeparatorIfLast(model);
|
||||
|
||||
#if DEBUG
|
||||
AddSeparator(model);
|
||||
AddDebugMenuItems(model);
|
||||
#endif
|
||||
|
||||
RemoveSeparatorIfLast(model);
|
||||
|
||||
form.InvokeSafe(() => form.ContextMenuOpen = true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user