From b55c5d8e93c5239d77e9afc1e15b2c7e9449d40e Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= jaakko.keranen@iki.fi

Date: Sat, 14 Nov 2020 18:34:20 +0200

Subject: [PATCH 1/1] macOS: Disable menu shortcuts while binding keys


src/macos.h | 1 +

src/macos.m | 9 +++++++++

src/ui/bindingswidget.c | 10 ++++++++++

3 files changed, 20 insertions(+)

diff --git a/src/macos.h b/src/macos.h

index ee06b69e..f948a0db 100644

--- a/src/macos.h

+++ b/src/macos.h

@@ -32,4 +32,5 @@ void enableMomentumScroll_MacOS (void);

void registerURLHandler_MacOS (void);

void setupApplication_MacOS (void);

void insertMenuItems_MacOS (const char *menuLabel, int atIndex, const iMenuItem *items, size_t count);

+void enableMenu_MacOS (const char *menuLabel, iBool enable);

void handleCommand_MacOS (const char *cmd);

diff --git a/src/macos.m b/src/macos.m

index 28ebcc43..24a6fecb 100644

--- a/src/macos.m

+++ b/src/macos.m

@@ -491,6 +491,15 @@ void setupApplication_MacOS(void) {

 windowCloseItem.action = @selector(closeTab);

}

+void enableMenu_MacOS(const char *menuLabel, iBool enable) {

+}

void insertMenuItems_MacOS(const char *menuLabel, int atIndex, const iMenuItem *items, size_t count) {

 NSApplication *app = [NSApplication sharedApplication];

 MyDelegate *myDel = (MyDelegate *) app.delegate;

diff --git a/src/ui/bindingswidget.c b/src/ui/bindingswidget.c

index 23fbbe88..a6e9f6a0 100644

--- a/src/ui/bindingswidget.c

+++ b/src/ui/bindingswidget.c

@@ -26,6 +26,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */

#include "command.h"

#include "util.h"

#include "app.h"

+#if defined (iPlatformApple)

+# include "macos.h"

+#endif

iDeclareType(BindingItem)

typedef iListItemClass iBindingItemClass;

@@ -129,6 +132,13 @@ static void setActiveItem_BindingsWidget_(iBindingsWidget *d, size_t pos) {

     item->isWaitingForEvent = iTrue;

     invalidateItem_ListWidget(d->list, d->activePos);

 }

+#if defined (iPlatformApple)

+#endif

}

static iBool processEvent_BindingsWidget_(iBindingsWidget *d, const SDL_Event *ev) {

--

2.25.1

Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.8/patch/b55c5d8e93c5239d77e9afc1e15b2c7e9449d40e.patch
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
62.939942 milliseconds
Gemini-to-HTML Time
1.112527 milliseconds

This content has been proxied by September (ba2dc).