display theme version in inspector.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27454 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-12-29 18:31:14 +00:00
parent 0a18652108
commit 6df9e3a617
2 changed files with 18 additions and 0 deletions

View file

@ -2,6 +2,8 @@
* Source/GSInfoPanel.m:
Update name of current theme when it changes.
* Source/GSThemeInspector.m:
Display theme version number.
2008-12-29 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -96,6 +96,7 @@ static GSThemeInspector *sharedInspector = nil;
- (void) update: (id)sender
{
GSTheme *theme = [GSTheme theme];
NSString *version;
NSString *details;
NSArray *authors;
NSView *content = [self contentView];
@ -125,6 +126,21 @@ static GSThemeInspector *sharedInspector = nil;
[tf setFrame: nameFrame];
[content addSubview: tf];
version = [[theme infoDictionary] objectForKey: @"GSThemeVersion"];
if ([version length] > 0)
{
version = [NSString stringWithFormat: @"Version: %@", version];
tf = new_label(version);
[tf setFont: [NSFont systemFontOfSize: 12]];
[tf sizeToFit];
frame = [tf frame];
frame.origin.x = (cFrame.size.width - frame.size.width) / 2;
frame.origin.y = nameFrame.origin.y - frame.size.height - 25;
[tf setFrame: frame];
[content addSubview: tf];
nameFrame = [tf frame];
}
authors = [[theme infoDictionary] objectForKey: @"GSThemeAuthors"];
if ([authors count] > 0)
{