mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 13:11:55 +00:00
Improvements for PopUp when should process events.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36902 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e3e984b6c8
commit
f229269213
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-07-17 German A. Arias <german@xelalug.org>
|
||||||
|
|
||||||
|
* Source/NSPopUpButtonCell.m (-attachPopUpWithFrame:inView:): Ensure
|
||||||
|
the window responds when run in modal and should process events.
|
||||||
|
|
||||||
2013-07-15 Riccardo Mottola <rm@gnu.org>
|
2013-07-15 Riccardo Mottola <rm@gnu.org>
|
||||||
|
|
||||||
* Images/nsmapping.strings
|
* Images/nsmapping.strings
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#import "AppKit/NSKeyValueBinding.h"
|
#import "AppKit/NSKeyValueBinding.h"
|
||||||
#import "AppKit/NSMenu.h"
|
#import "AppKit/NSMenu.h"
|
||||||
#import "AppKit/NSMenuView.h"
|
#import "AppKit/NSMenuView.h"
|
||||||
|
#import "AppKit/NSPanel.h"
|
||||||
#import "AppKit/NSPopUpButton.h"
|
#import "AppKit/NSPopUpButton.h"
|
||||||
#import "AppKit/NSPopUpButtonCell.h"
|
#import "AppKit/NSPopUpButtonCell.h"
|
||||||
#import "AppKit/NSWindow.h"
|
#import "AppKit/NSWindow.h"
|
||||||
|
@ -909,6 +910,21 @@ static NSImage *_pbc_image[5];
|
||||||
[nc postNotificationName: NSPopUpButtonWillPopUpNotification
|
[nc postNotificationName: NSPopUpButtonWillPopUpNotification
|
||||||
object: controlView];
|
object: controlView];
|
||||||
|
|
||||||
|
/* Ensure the window responds when run in modal and should
|
||||||
|
* process events. Or revert this if theme has changed.
|
||||||
|
*/
|
||||||
|
if ([[GSTheme theme] doesProcessEventsForPopUpMenu] &&
|
||||||
|
![[_menu window] worksWhenModal])
|
||||||
|
{
|
||||||
|
[(NSPanel *)[_menu window] setWorksWhenModal: YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (![[GSTheme theme] doesProcessEventsForPopUpMenu] &&
|
||||||
|
[[_menu window] worksWhenModal])
|
||||||
|
{
|
||||||
|
[(NSPanel *)[_menu window] setWorksWhenModal: NO];
|
||||||
|
}
|
||||||
|
|
||||||
// Convert to Screen Coordinates
|
// Convert to Screen Coordinates
|
||||||
cellFrame = [controlView convertRect: cellFrame toView: nil];
|
cellFrame = [controlView convertRect: cellFrame toView: nil];
|
||||||
cellFrame.origin = [cvWin convertBaseToScreen: cellFrame.origin];
|
cellFrame.origin = [cvWin convertBaseToScreen: cellFrame.origin];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue