mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 06:00:37 +00:00
* Panels/English.lproj/GSToolbarCustomizationPalette.gorm: Add
Default item to popup and make the connection to the show: method to allow setting the toolbar display mode. * Source/GSToolbarCustomizationPalette.m: Enable changing of text, text & icon, icon only on the toolbar. * Source/NSToolbar.m: Change _build method to load the displayMode setting. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28110 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c15df7fc8b
commit
56c852e9be
4 changed files with 33 additions and 2 deletions
|
@ -34,7 +34,7 @@
|
|||
#include "AppKit/NSWindow.h"
|
||||
#include "AppKit/NSToolbar.h"
|
||||
#include "AppKit/NSToolbarItem.h"
|
||||
|
||||
#include "AppKit/NSPopUpButton.h"
|
||||
#include "NSToolbarFrameworkPrivate.h"
|
||||
#include "GSToolbarCustomizationPalette.h"
|
||||
|
||||
|
@ -238,10 +238,12 @@
|
|||
NSArray *itemIdentifiers = nil;
|
||||
NSEnumerator *e = nil;
|
||||
NSString *identifier = nil;
|
||||
NSToolbarDisplayMode tag = [toolbar displayMode];
|
||||
id delegate = [toolbar delegate];
|
||||
|
||||
[_allowedItems removeAllObjects];
|
||||
[_defaultItems removeAllObjects];
|
||||
[_displayPopup selectItemWithTag: tag];
|
||||
|
||||
if (delegate == nil)
|
||||
{
|
||||
|
@ -304,4 +306,12 @@
|
|||
RELEASE(self);
|
||||
}
|
||||
|
||||
- (void) show: (id) sender
|
||||
{
|
||||
NSToolbarDisplayMode displayMode = (NSToolbarDisplayMode)
|
||||
[[sender selectedItem] tag];
|
||||
[_toolbar setDisplayMode: displayMode];
|
||||
[_toolbar _saveConfig];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue