summaryrefslogtreecommitdiffstats
path: root/build-aux/osx/build/modulesets/patches/gtk-mac-integration
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:32:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:32:59 +0000
commitadb934701975f6b0214475d1a8d0d1ce727b9d4d (patch)
tree5688c745d10b64c8856586864ec416a6bdae881d /build-aux/osx/build/modulesets/patches/gtk-mac-integration
parentInitial commit. (diff)
downloadgedit-adb934701975f6b0214475d1a8d0d1ce727b9d4d.tar.xz
gedit-adb934701975f6b0214475d1a8d0d1ce727b9d4d.zip
Adding upstream version 3.38.1.upstream/3.38.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build-aux/osx/build/modulesets/patches/gtk-mac-integration')
-rw-r--r--build-aux/osx/build/modulesets/patches/gtk-mac-integration/0001-Fix-unhandled-exception-from-attempting-to-access-me.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/build-aux/osx/build/modulesets/patches/gtk-mac-integration/0001-Fix-unhandled-exception-from-attempting-to-access-me.patch b/build-aux/osx/build/modulesets/patches/gtk-mac-integration/0001-Fix-unhandled-exception-from-attempting-to-access-me.patch
new file mode 100644
index 0000000..87151bb
--- /dev/null
+++ b/build-aux/osx/build/modulesets/patches/gtk-mac-integration/0001-Fix-unhandled-exception-from-attempting-to-access-me.patch
@@ -0,0 +1,39 @@
+From cd3a21ff115cd6c6c11ce39aa62eaf912c78b060 Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls@ceridwen.us>
+Date: Mon, 30 Dec 2013 12:20:26 -0800
+Subject: [PATCH] Fix unhandled exception from attempting to access menu
+ itemAtIndex:-1
+
+---
+ src/cocoa_menu_item.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/src/cocoa_menu_item.c b/src/cocoa_menu_item.c
+index 793c254..dd46586 100644
+--- a/src/cocoa_menu_item.c
++++ b/src/cocoa_menu_item.c
+@@ -550,12 +550,16 @@ cocoa_menu_item_add_item (NSMenu* cocoa_menu, GtkWidget* menu_item, int index)
+ /* Clean up adjacent separators: */
+ if ([cocoa_menu numberOfItems] > 0)
+ {
+- if (([cocoa_menu numberOfItems] == index ||
+- [[cocoa_menu itemAtIndex: index] isSeparatorItem]) &&
+- [[cocoa_menu itemAtIndex: index - 1] isSeparatorItem])
++ if (index == 0)
++ {
++ if ([[cocoa_menu itemAtIndex: index] isSeparatorItem])
++ [cocoa_menu removeItemAtIndex: index];
++ }
++ else if (([cocoa_menu numberOfItems] == index ||
++ [[cocoa_menu itemAtIndex: index] isSeparatorItem]) &&
++ [[cocoa_menu itemAtIndex: index - 1] isSeparatorItem])
+ [cocoa_menu removeItemAtIndex: index - 1];
+- if (index == 0 && [[cocoa_menu itemAtIndex: index] isSeparatorItem])
+- [cocoa_menu removeItemAtIndex: index];
++
+ }
+ }
+
+--
+1.8.3.rc0
+