mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:00:48 +00:00
* Headers/Additions/GNUstepGUI/GSTheme.h: Added method
rightMouseMenu:forEvent: to allow theming of transient and context menus. * Source/GSThemeMenu.m: Implementation of method rightMouseMenu:forEvent: to allow theming of transient and context menus. * Source/NSMenu.m: use the theming code implemented above instead of rendering the menu directly. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30370 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
afd9a10680
commit
c78d98f976
4 changed files with 32 additions and 6 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2010-05-12 18:48-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
|
* Headers/Additions/GNUstepGUI/GSTheme.h: Added method
|
||||||
|
rightMouseMenu:forEvent: to allow theming of transient and
|
||||||
|
context menus.
|
||||||
|
* Source/GSThemeMenu.m: Implementation of method
|
||||||
|
rightMouseMenu:forEvent: to allow theming of transient and
|
||||||
|
context menus.
|
||||||
|
* Source/NSMenu.m: use the theming code implemented above instead
|
||||||
|
of rendering the menu directly.
|
||||||
|
|
||||||
2010-05-12 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2010-05-12 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSWindow.m: Fix a rather long standing incompatibility
|
* Source/NSWindow.m: Fix a rather long standing incompatibility
|
||||||
|
@ -49,6 +60,7 @@
|
||||||
Fix bug where some objects from the nib file were not sent an
|
Fix bug where some objects from the nib file were not sent an
|
||||||
-awakeFromNib message.
|
-awakeFromNib message.
|
||||||
|
|
||||||
|
>>>>>>> .r30369
|
||||||
2010-05-11 Fred Kiefer <FredKiefer@gmx.de>
|
2010-05-11 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/Additions/GNUstepGUI/GSTheme.h:
|
* Headers/Additions/GNUstepGUI/GSTheme.h:
|
||||||
|
|
|
@ -1055,6 +1055,12 @@ withRepeatedImage: (NSImage*)image
|
||||||
*/
|
*/
|
||||||
- (void) setMenu: (NSMenu *)menu forWindow: (NSWindow *)window;
|
- (void) setMenu: (NSMenu *)menu forWindow: (NSWindow *)window;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the context menu when the right mouse button is pressed.
|
||||||
|
*/
|
||||||
|
- (void) rightMouseDisplay: (NSMenu *)menu
|
||||||
|
forEvent: (NSEvent *)theEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes menu events for the theme. The default implementation
|
* Processes menu events for the theme. The default implementation
|
||||||
* does nothing.
|
* does nothing.
|
||||||
|
|
|
@ -79,6 +79,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) rightMouseDisplay: (NSMenu *)menu
|
||||||
|
forEvent: (NSEvent *)theEvent
|
||||||
|
{
|
||||||
|
NSMenuView *mv = [menu menuRepresentation];
|
||||||
|
if ([mv isHorizontal] == NO)
|
||||||
|
{
|
||||||
|
[menu displayTransient];
|
||||||
|
[mv mouseDown: theEvent];
|
||||||
|
[menu closeTransient];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void) processCommand: (void *)context
|
- (void) processCommand: (void *)context
|
||||||
{
|
{
|
||||||
// this is only implemented when we handle native menus.
|
// this is only implemented when we handle native menus.
|
||||||
|
|
|
@ -553,12 +553,8 @@ static BOOL menuBarVisible = YES;
|
||||||
|
|
||||||
- (void) _rightMouseDisplay: (NSEvent*)theEvent
|
- (void) _rightMouseDisplay: (NSEvent*)theEvent
|
||||||
{
|
{
|
||||||
if (_menu.horizontal == NO)
|
[[GSTheme theme] rightMouseDisplay: self
|
||||||
{
|
forEvent: theEvent];
|
||||||
[self displayTransient];
|
|
||||||
[_view mouseDown: theEvent];
|
|
||||||
[self closeTransient];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue