=> b55c5d8e93c5239d77e9afc1e15b2c7e9449d40e
[1mdiff --git a/src/macos.h b/src/macos.h[m [1mindex ee06b69e..f948a0db 100644[m [1m--- a/src/macos.h[m [1m+++ b/src/macos.h[m [36m@@ -32,4 +32,5 @@[m [mvoid enableMomentumScroll_MacOS (void);[m void registerURLHandler_MacOS (void);[m void setupApplication_MacOS (void);[m void insertMenuItems_MacOS (const char *menuLabel, int atIndex, const iMenuItem *items, size_t count);[m [32m+[m[32mvoid enableMenu_MacOS (const char *menuLabel, iBool enable);[m void handleCommand_MacOS (const char *cmd);[m [1mdiff --git a/src/macos.m b/src/macos.m[m [1mindex 28ebcc43..24a6fecb 100644[m [1m--- a/src/macos.m[m [1m+++ b/src/macos.m[m [36m@@ -491,6 +491,15 @@[m [mvoid setupApplication_MacOS(void) {[m windowCloseItem.action = @selector(closeTab);[m }[m [m [32m+[m[32mvoid enableMenu_MacOS(const char *menuLabel, iBool enable) {[m [32m+[m[32m NSApplication *app = [NSApplication sharedApplication];[m [32m+[m[32m NSMenu *appMenu = [app mainMenu];[m [32m+[m[32m NSString *label = [NSString stringWithUTF8String:menuLabel];[m [32m+[m[32m NSMenuItem *menuItem = [appMenu itemAtIndex:[appMenu indexOfItemWithTitle:label]];[m [32m+[m[32m [menuItem setEnabled:enable];[m [32m+[m[32m [label release];[m [32m+[m[32m}[m [32m+[m void insertMenuItems_MacOS(const char *menuLabel, int atIndex, const iMenuItem *items, size_t count) {[m NSApplication *app = [NSApplication sharedApplication];[m MyDelegate *myDel = (MyDelegate *) app.delegate;[m [1mdiff --git a/src/ui/bindingswidget.c b/src/ui/bindingswidget.c[m [1mindex 23fbbe88..a6e9f6a0 100644[m [1m--- a/src/ui/bindingswidget.c[m [1m+++ b/src/ui/bindingswidget.c[m [36m@@ -26,6 +26,9 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #include "command.h"[m #include "util.h"[m #include "app.h"[m [32m+[m[32m#if defined (iPlatformApple)[m [32m+[m[32m# include "macos.h"[m [32m+[m[32m#endif[m [m iDeclareType(BindingItem)[m typedef iListItemClass iBindingItemClass;[m [36m@@ -129,6 +132,13 @@[m [mstatic void setActiveItem_BindingsWidget_(iBindingsWidget *d, size_t pos) {[m item->isWaitingForEvent = iTrue;[m invalidateItem_ListWidget(d->list, d->activePos);[m }[m [32m+[m[32m#if defined (iPlatformApple)[m [32m+[m[32m /* Native menus must be disabled while grabbing keys so the shortcuts don't trigger. */[m [32m+[m[32m const iBool enableNativeMenus = (d->activePos == iInvalidPos);[m [32m+[m[32m enableMenu_MacOS("Edit", enableNativeMenus);[m [32m+[m[32m enableMenu_MacOS("View", enableNativeMenus);[m [32m+[m[32m enableMenu_MacOS("Identity", enableNativeMenus);[m [32m+[m[32m#endif[m }[m [m static iBool processEvent_BindingsWidget_(iBindingsWidget *d, const SDL_Event *ev) {[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).