all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)
@ 2023-10-09 12:03 Mattias Engdegård
  2023-10-09 12:28 ` Gerd Möllmann
  0 siblings, 1 reply; 5+ messages in thread
From: Mattias Engdegård @ 2023-10-09 12:03 UTC (permalink / raw)
  To: 66420; +Cc: Alan Third

On macOS, once a selection has been made, every pop-up menu includes a 'Services' sub-menu from then on.
It contains items such as 'Search with Google' and 'Add to Music as a Spoken Track'.
It's always completely out of place and very annoying.

The buffer menu? It's there. Any menu activated by clicking on the mode line? It's there. Selecting a value in variable customisation? It's there.

The only place where it might be remotely appropriate is the context-menu-mode menu, if enabled, but then only if we actually have an active selection. I'm going to ignore this for the time being since it's much less important than getting rid of it where it doesn't belong.

The patch below removes it. The property is documented to be present in macOS 10.6 and above, which is fairly old (Snow Leopard).

--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -768,6 +768,9 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
                             pressure: 0];
 
   context_menu_value = -1;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+  self.allowsContextMenuPlugIns = NO;
+#endif
   [NSMenu popUpContextMenu: self withEvent: event forView: view];
   retVal = context_menu_value;
   context_menu_value = 0;






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)
  2023-10-09 12:03 bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS) Mattias Engdegård
@ 2023-10-09 12:28 ` Gerd Möllmann
  2023-10-09 12:44   ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Gerd Möllmann @ 2023-10-09 12:28 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 66420, Alan Third

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> On macOS, once a selection has been made, every pop-up menu includes a 'Services' sub-menu from then on.
> It contains items such as 'Search with Google' and 'Add to Music as a Spoken Track'.
> It's always completely out of place and very annoying.
>
> The buffer menu? It's there. Any menu activated by clicking on the mode line? It's there. Selecting a value in variable customisation? It's there.
>
> The only place where it might be remotely appropriate is the context-menu-mode menu, if enabled, but then only if we actually have an active selection. I'm going to ignore this for the time being since it's much less important than getting rid of it where it doesn't belong.
>
> The patch below removes it. The property is documented to be present in macOS 10.6 and above, which is fairly old (Snow Leopard).
>
> --- a/src/nsmenu.m
> +++ b/src/nsmenu.m
> @@ -768,6 +768,9 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
>                              pressure: 0];
>  
>    context_menu_value = -1;
> +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
> +  self.allowsContextMenuPlugIns = NO;
> +#endif
>    [NSMenu popUpContextMenu: self withEvent: event forView: view];
>    retVal = context_menu_value;
>    context_menu_value = 0;

I'm all for it :-)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)
  2023-10-09 12:28 ` Gerd Möllmann
@ 2023-10-09 12:44   ` Stefan Kangas
  2023-10-09 15:16     ` Alan Third
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2023-10-09 12:44 UTC (permalink / raw)
  To: Gerd Möllmann, Mattias Engdegård; +Cc: 66420, Alan Third

Gerd Möllmann <gerd.moellmann@gmail.com> writes:

>> The patch below removes it. The property is documented to be present in macOS 10.6 and above, which is fairly old (Snow Leopard).

That's also the oldest version of macOS that we support, so that should
be fine.

>> --- a/src/nsmenu.m
>> +++ b/src/nsmenu.m
>> @@ -768,6 +768,9 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
>>                              pressure: 0];
>>
>>    context_menu_value = -1;
>> +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
>> +  self.allowsContextMenuPlugIns = NO;
>> +#endif
>>    [NSMenu popUpContextMenu: self withEvent: event forView: view];
>>    retVal = context_menu_value;
>>    context_menu_value = 0;
>
> I'm all for it :-)

+1





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)
  2023-10-09 12:44   ` Stefan Kangas
@ 2023-10-09 15:16     ` Alan Third
  2023-10-09 15:42       ` Mattias Engdegård
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Third @ 2023-10-09 15:16 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Gerd Möllmann, 66420, Mattias Engdegård

On Mon, Oct 09, 2023 at 12:44:40PM +0000, Stefan Kangas wrote:
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> 
> >> The patch below removes it. The property is documented to be
> >> present in macOS 10.6 and above, which is fairly old (Snow
> >> Leopard).
> 
> That's also the oldest version of macOS that we support, so that
> should be fine.

Yeah, I'd suggest removing the check as we don't bother anywhere else
in the code, however it looks like this property isn't available in
GNUstep so probably best to limit it to NS_IMPL_COCOA.
-- 
Alan Third





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)
  2023-10-09 15:16     ` Alan Third
@ 2023-10-09 15:42       ` Mattias Engdegård
  0 siblings, 0 replies; 5+ messages in thread
From: Mattias Engdegård @ 2023-10-09 15:42 UTC (permalink / raw)
  To: Alan Third; +Cc: Gerd Möllmann, 66420-done, Stefan Kangas

9 okt. 2023 kl. 17.16 skrev Alan Third <alan@idiocy.org>:

> Yeah, I'd suggest removing the check as we don't bother anywhere else
> in the code, however it looks like this property isn't available in
> GNUstep so probably best to limit it to NS_IMPL_COCOA.

Thank you, now done on master.






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-09 15:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-09 12:03 bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS) Mattias Engdegård
2023-10-09 12:28 ` Gerd Möllmann
2023-10-09 12:44   ` Stefan Kangas
2023-10-09 15:16     ` Alan Third
2023-10-09 15:42       ` Mattias Engdegård

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.