mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-14 14:40:52 +00:00
cleanup inforpanel init and proper centering
This commit is contained in:
parent
77972b4abb
commit
d49d4d6e5f
2 changed files with 12 additions and 22 deletions
|
@ -1,3 +1,8 @@
|
|||
2021-08-18 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* PCInfoContronoller.m
|
||||
Center info panel correctly the first time on load.
|
||||
|
||||
2021-08-10 Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Framework/PCEditorManager.m: Add method -gotoFile:atLine:
|
||||
|
|
|
@ -37,6 +37,13 @@
|
|||
|
||||
infoDict = [NSDictionary dictionaryWithContentsOfFile:file];
|
||||
RETAIN(infoDict);
|
||||
|
||||
if ([NSBundle loadNibNamed:@"Info" owner:self] == NO)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
[versionField setStringValue:[NSString stringWithFormat:@"Version %@", [infoDict objectForKey:@"ApplicationRelease"]]];
|
||||
[infoWindow center];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -56,29 +63,7 @@
|
|||
|
||||
- (void)showInfoWindow:(id)sender
|
||||
{
|
||||
if ([NSBundle loadNibNamed:@"Info" owner:self] == NO)
|
||||
{
|
||||
// PCLogError(self, @"error loading Menu NIB file!");
|
||||
return;
|
||||
}
|
||||
|
||||
[infoWindow makeKeyAndOrderFront:self];
|
||||
[versionField setStringValue:[NSString stringWithFormat:@"Version %@", [infoDict objectForKey:@"ApplicationRelease"]]];
|
||||
|
||||
/*#if defined(GNUSTEP)
|
||||
if (!infoWindow)
|
||||
{
|
||||
infoWindow = [[GSInfoPanel alloc] initWithDictionary:infoDict];
|
||||
}
|
||||
|
||||
[infoWindow setTitle:@"Info"];
|
||||
[infoWindow center];
|
||||
[infoWindow makeKeyAndOrderFront:self];
|
||||
#else
|
||||
NSRunAlertPanel(@"Info",
|
||||
@"OPENSTEP has no support for GSInfoPanel",
|
||||
@"OK",nil,nil,nil);
|
||||
#endif*/
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue