[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: Re: GNUstep and Linux Fund]

From: Fred Kiefer
Subject: Re: [Fwd: Re: GNUstep and Linux Fund]
Date: Thu, 12 Nov 2009 08:33:18 +0100
User-agent: Thunderbird (X11/20090817)

Hans Baier schrieb:
> Apart from that, one thing about GNUstep annoys me very much:
> The absence of context menus. I don't know currently how OS X handles that,
> but often I would find myself right-clicking on something, but the
> application menu pops up.

The behaviour you describe is the one you find in most GNUstep
applications, but this is because the application programmers decided to
do so.
In NSView you will find the following method:

- (void) rightMouseDown: (NSEvent *) theEvent
  NSMenu *m;
  m = [self menuForEvent: theEvent];
  if (m)
      [NSMenu popUpContextMenu: m
              withEvent: theEvent
              forView: self];
      [super rightMouseDown: theEvent];

This allows to display any menu (set via setMenu:) as the popup menu of
the view. It is up to the application programmer to use or ignore this


reply via email to

[Prev in Thread] Current Thread [Next in Thread]