diff --git a/ChangeLog b/ChangeLog index 56c33e26f..2d88ebcdf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-10-29 Doug Simons + + * Source/GSThemeMenu.m + * Source/NSPopUpButtonCell.m + Added theme method to identify themes that handle event processing + for PopUp (and PullDown) menus. Use that to prevent duplicate event + handling in NSPopUpButtonCell. This fixes a problem with actions + getting sent twice on Windows with the WinUXTheme. + 2010-10-25 Doug Simons * Source/GSToolbarCustomizationPalette.m: diff --git a/Source/GSThemeMenu.m b/Source/GSThemeMenu.m index 4358eda21..79b0309ab 100644 --- a/Source/GSThemeMenu.m +++ b/Source/GSThemeMenu.m @@ -130,5 +130,11 @@ { // default implementation of this method does nothing. } + +- (BOOL) doesProcessEventsForPopUpMenu +{ + return NO; // themes that handle events in a popUpMenu should return YES +} + @end diff --git a/Source/NSPopUpButtonCell.m b/Source/NSPopUpButtonCell.m index a8151df7f..10baa893e 100644 --- a/Source/NSPopUpButtonCell.m +++ b/Source/NSPopUpButtonCell.m @@ -993,6 +993,8 @@ static NSImage *_pbc_image[5]; // Attach the popUp [self attachPopUpWithFrame: cellFrame inView: controlView]; + if ([[GSTheme theme] doesProcessEventsForPopUpMenu]) + return YES; // the theme handles the events, so we're done p = [[controlView window] convertBaseToScreen: [theEvent locationInWindow]]; p = [menuWindow convertScreenToBase: p];