* 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:
Gregory John Casamento 2009-03-21 14:23:41 +00:00
parent c15df7fc8b
commit 56c852e9be
4 changed files with 33 additions and 2 deletions

View file

@ -1,3 +1,13 @@
2009-03-21 09:57-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* 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.
2009-03-20 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/gopen.m: Extend to open URLs as well as files.

View file

@ -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

View file

@ -894,7 +894,18 @@ static GSValidationCenter *vc = nil;
NSEnumerator *e;
id itemIdentifier;
int i = 0;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *tableKey =
[NSString stringWithFormat: @"NSToolbar Config %@",_identifier];
NSDictionary *config = [defaults objectForKey: tableKey];
NSToolbarDisplayMode displayMode = 0;
if(config)
{
displayMode = (NSToolbarDisplayMode)[[config objectForKey: @"displayMode"] intValue];
[self setDisplayMode: displayMode];
}
// Switch off toolbar view reload
_build = YES;