mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Corrected problem with outline/browser view shrinking when switched.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21243 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d4ce568b41
commit
5ac7372ea2
5 changed files with 36 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-05-21 13:15 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* English.lproj/GormPrefGeneral.gorm: Make the top switch off.
|
||||
* GormCore/GormClassEditor.m: Added code in switchView
|
||||
to properly resize the view so that it doesn't shrink when switching
|
||||
between the outline and browser.
|
||||
* GormPrefs/GormGeneralPref.m: Correct problem setting the
|
||||
radio button.
|
||||
|
||||
2005-05-21 11:06 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* English.lproj/GormPrefGeneral.gorm: Added oulets/actions for
|
||||
|
|
Binary file not shown.
|
@ -156,9 +156,7 @@ NSString *GormSwitchViewPreferencesNotification = @"GormSwitchViewPreferencesNot
|
|||
object: nil];
|
||||
|
||||
// switch...
|
||||
[self setContentViewMargins: NSZeroSize];
|
||||
[self switchView];
|
||||
[self sizeToFit];
|
||||
|
||||
// register for types...
|
||||
[IBResourceManager registerForAllPboardTypes: self
|
||||
|
@ -176,13 +174,30 @@ NSString *GormSwitchViewPreferencesNotification = @"GormSwitchViewPreferencesNot
|
|||
- (void) switchView
|
||||
{
|
||||
NSString *viewType = [[NSUserDefaults standardUserDefaults] stringForKey: @"ClassViewType"];
|
||||
|
||||
[self setContentViewMargins: NSZeroSize];
|
||||
if([viewType isEqual: @"Outline"] || viewType == nil)
|
||||
{
|
||||
NSRect rect = [[self superview] frame];
|
||||
// NSRect old = rect;
|
||||
|
||||
// reset the origin...
|
||||
// rect.origin.x = 0;
|
||||
// rect.origin.y = 0;
|
||||
|
||||
[self setContentView: scrollView];
|
||||
}
|
||||
// [scrollView setFrame: old];
|
||||
// [outlineView setFrame: rect];
|
||||
|
||||
[self sizeToFit];
|
||||
[[self superview] setFrame: rect];
|
||||
// [scrollView setFrame: rect];
|
||||
|
||||
}
|
||||
else if([viewType isEqual: @"Browser"])
|
||||
{
|
||||
[self setContentView: browserView];
|
||||
[self sizeToFit];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -200,6 +215,10 @@ NSString *GormSwitchViewPreferencesNotification = @"GormSwitchViewPreferencesNot
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
[nc removeObserver: self];
|
||||
RELEASE(scrollView);
|
||||
RELEASE(browserView);
|
||||
RELEASE(selectedClass);
|
||||
[super dealloc];
|
||||
}
|
||||
|
|
|
@ -347,6 +347,7 @@ static NSImage *fileImage = nil;
|
|||
/*
|
||||
* Set the objects view as the initial view the user's see on startup.
|
||||
*/
|
||||
// [selectionBox setContentViewMargins: NSZeroSize];
|
||||
[selectionBox setContentView: scrollView];
|
||||
|
||||
/*
|
||||
|
|
|
@ -60,6 +60,7 @@ static NSString *INTTYPE=@"ClassViewType";
|
|||
{
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString *arcType = [defaults stringForKey: ARCTYPE];
|
||||
NSString *intType = [defaults stringForKey: INTTYPE];
|
||||
|
||||
[inspectorButton setState: [defaults integerForKey: SHOWINSPECTOR]];
|
||||
[palettesButton setState: [defaults integerForKey: SHOWPALETTES]];
|
||||
|
@ -85,13 +86,13 @@ static NSString *INTTYPE=@"ClassViewType";
|
|||
[archiveMatrix setState: NSOnState atRow: 2 column: 0];
|
||||
}
|
||||
|
||||
// set the archive matrix...
|
||||
if([arcType isEqual: @"Outline"])
|
||||
// set the interface matrix...
|
||||
if([intType isEqual: @"Outline"])
|
||||
{
|
||||
[interfaceMatrix setState: NSOnState atRow: 0 column: 0];
|
||||
[interfaceMatrix setState: NSOffState atRow: 1 column: 0];
|
||||
}
|
||||
else if([arcType isEqual: @"Browser"])
|
||||
else if([intType isEqual: @"Browser"])
|
||||
{
|
||||
[interfaceMatrix setState: NSOffState atRow: 0 column: 0];
|
||||
[interfaceMatrix setState: NSOnState atRow: 1 column: 0];
|
||||
|
|
Loading…
Reference in a new issue