Made the prefs manager a little more silent.. added some checks to keep users from shooting themselves in the foot.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19743 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-07-16 01:50:40 +00:00
parent cf60ff0dda
commit ad8c3a1261
5 changed files with 31 additions and 10 deletions

View file

@ -1,3 +1,13 @@
2004-07-15 21:43 Gregory John Casamento <greg_casamento@yahoo.com>
* Gorm.m: Added a check in applicationDidFinishLaunching:
to make certain the user is using the right version of GNUstep
by checking for a recent signature change in GSNibContainer.
* ClassInformation.plist: Added redo: and undo: to the list of
methods on the first responder.
* GormFilePrefsManager.m: Changed a lot of the NSLogs to
NSDebugLog.
2004-07-12 23:08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormImageEditor.m: [GormImageEditor initWithObject:inDocument:]

View file

@ -82,7 +82,8 @@
"performMiniaturize:",
"performZoom:",
"print:",
"raiseBaseline:",
"raiseBaseline:",
"redo:",
"revertDocumentToSaved:",
"runPageLayout:",
"runToolbarCustomizationPalette:",
@ -128,6 +129,7 @@
"turnOffKerning:",
"turnOffLigatures:",
"underline:",
"undo:",
"unhide:",
"unhideAllApplications:",
"unscript:",

11
Gorm.m
View file

@ -28,6 +28,7 @@
#include "GormFontViewController.h"
#include "GormSetNameController.h"
#include "GNUstepGUI/GSNibCompatibility.h"
#include "GNUstepBase/GSObjCRuntime.h"
// for templates...
#include <AppKit/NSControl.h>
@ -300,6 +301,7 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification";
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *a = nil;
if ( [defaults boolForKey: @"ShowInspectors"] )
{
@ -316,6 +318,13 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification";
NSLog(@"WARNING: Gorm has detected that you are using user bundles. Please make certain that these are compatible with Gorm as some bundles can cause issues which may corrupt your .gorm files.");
}
}
if(GSGetMethod([GSNibContainer class],@selector(awakeWithContext:),YES,YES) == NULL)
{
NSRunAlertPanel(_(@"Incorrect GNUstep Version"),
_(@"The version of GNUstep you are using is too old for this version of Gorm, please update."),
_(@"OK"), NULL, NULL);
[self terminate: self];
}
}
@ -776,7 +785,7 @@ NSString *GormResizeCellNotification = @"GormResizeCellNotification";
// reset the application after the error.
NSLog(@"Error while testing interface: %@",
[localException reason]);
NSRunAlertPanel(NULL, [NSString stringWithFormat: @"Problem testing interface. Make sure connections are to appropriate objects. Exception: %@",
NSRunAlertPanel(_(@"An Error Occurred"), [NSString stringWithFormat: @"Problem testing interface. Make sure connections are to appropriate objects. Exception: %@",
[localException reason]],
_(@"OK"), NULL, NULL);
[self endTesting: self];

View file

@ -98,13 +98,13 @@ NSString *formatVersion(int version)
NSEnumerator *en = [currentProfile keyEnumerator];
id className = nil;
NSLog(@"set the class versions to the profile selected... %@",targetVersionName);
NSDebugLog(@"set the class versions to the profile selected... %@",targetVersionName);
while((className = [en nextObject]) != nil)
{
Class cls = NSClassFromString(className);
NSDictionary *info = [currentProfile objectForKey: className];
int v = [[info objectForKey: @"version"] intValue];
NSLog(@"Setting version %d for class %@",v,className);
NSDebugLog(@"Setting version %d for class %@",v,className);
[cls setVersion: v];
}
}
@ -116,13 +116,13 @@ NSString *formatVersion(int version)
id className = nil;
// The "Latest Version" key must always exist.
NSLog(@"restore the class versions to the latest version...");
NSDebugLog(@"restore the class versions to the latest version...");
while((className = [en nextObject]) != nil)
{
Class cls = NSClassFromString(className);
NSDictionary *info = [latestVersion objectForKey: className];
int v = [[info objectForKey: @"version"] intValue];
NSLog(@"Setting version %d for class %@",v,className);
NSDebugLog(@"Setting version %d for class %@",v,className);
[cls setVersion: v];
}
}
@ -130,7 +130,7 @@ NSString *formatVersion(int version)
// class profile
- (void) loadProfile: (NSString *)profileName
{
NSLog(@"Loading profile %@",profileName);
NSDebugLog(@"Loading profile %@",profileName);
currentProfile = [versionProfiles objectForKey: targetVersionName];
}
@ -151,7 +151,7 @@ NSString *formatVersion(int version)
- (void) selectArchiveType: (id)sender
{
ASSIGN(archiveTypeName, [[sender selectedItem] title]);
NSLog(@"Set Archive type... %@",sender);
NSDebugLog(@"Set Archive type... %@",sender);
}
// Loading and saving the file.

View file

@ -30,7 +30,7 @@
#define BUILTIN_PALETTES @"BuiltinPalettes"
#define USER_PALETTES @"UserPalettes"
@interface GormPalettePanel : NSPanel
@interface GormPalettePanel : NSPanel
@end
@implementation GormPalettePanel
@ -44,7 +44,7 @@
}
@end
@interface GormPaletteView : NSView
@interface GormPaletteView : NSView
{
NSPasteboard *dragPb;
}