mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Corrected some issues with class manager and font issues.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19008 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
547fa47c9c
commit
945bf86e50
10 changed files with 112 additions and 8 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
|||
2004-04-03 13:13 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormClassManager.m: Corrected a problem with renaming a class
|
||||
in [GormClassManager renameClassName:toClassName:]. The
|
||||
direct subclasses of the class whose name is being changed must
|
||||
be modified to have their superclass name set to the new name.
|
||||
* GormCustomView.m: Set the custom view to use the bold font to
|
||||
display the view name at the default size set by the user.
|
||||
* GormDocument.m: Corrected an issue with redisplay of the changed
|
||||
class name. Also made some changes to correct some compiler
|
||||
warnings.
|
||||
* GormFontViewController.m: The default action of the font controller
|
||||
is now to set the "encodes default" to off, since this is what
|
||||
the user most often means when selecting a preset font.
|
||||
* GormInternalViewEditor.[hm]:
|
||||
[GormInternalViewEditor changeFont:]. This allows the font to be
|
||||
modified on NSForms.
|
||||
* GormMatrixEditor.[hm]: same as above, except we're changing
|
||||
forms in a matrix. These two classes don't derive from one
|
||||
another so the method had to, unfortunately, be duplicated.
|
||||
|
||||
2004-03-30 15:36 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormPalettesManager.m: [GormPaletteView draggedImage:endedAt:
|
||||
|
|
|
@ -985,6 +985,7 @@
|
|||
if (classInfo != nil && [classInformation objectForKey: name] == nil)
|
||||
{
|
||||
int index = 0;
|
||||
NSArray *subclasses = [self subClassesOf: oldName];
|
||||
|
||||
[self _touch];
|
||||
RETAIN(classInfo);
|
||||
|
@ -995,6 +996,8 @@
|
|||
if ((index = [customClasses indexOfObject: oldName]) != NSNotFound)
|
||||
{
|
||||
NSEnumerator *en = [customClassMap keyEnumerator];
|
||||
NSEnumerator *cen = [subclasses objectEnumerator];
|
||||
id sc = nil;
|
||||
id object = nil;
|
||||
|
||||
NSDebugLog(@"replacing object with %@, %@",name, customClasses);
|
||||
|
@ -1016,6 +1019,14 @@
|
|||
}
|
||||
}
|
||||
NSDebugLog(@"New customClassMap = %@",customClassMap); // and after
|
||||
|
||||
// Iterate over the list of subclasses and replace their referece with the new
|
||||
// name.
|
||||
while((sc = [cen nextObject]) != nil)
|
||||
{
|
||||
[self setSuperClassNamed: name
|
||||
forClassNamed: sc];
|
||||
}
|
||||
}
|
||||
else
|
||||
NSLog(@"customClass not found %@",oldName);
|
||||
|
@ -1024,7 +1035,6 @@
|
|||
return YES;
|
||||
}
|
||||
else return NO;
|
||||
|
||||
}
|
||||
|
||||
- (NSString *)parentOfClass: (NSString *)aClass
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
[self setTextColor: [NSColor whiteColor]];
|
||||
[self setDrawsBackground: YES];
|
||||
[self setAlignment: NSCenterTextAlignment];
|
||||
[self setFont: [NSFont boldSystemFontOfSize: 12]];
|
||||
[self setFont: [NSFont boldSystemFontOfSize: 0]];
|
||||
[self setEditable: NO];
|
||||
[self setClassName: @"CustomView"];
|
||||
return self;
|
||||
|
|
|
@ -3094,7 +3094,7 @@ static NSImage *classesImage = nil;
|
|||
NSDebugLog(@"setSelectionFromEditor %@", anEditor);
|
||||
if ([(NSObject *)anEditor respondsToSelector: @selector(window)])
|
||||
{
|
||||
[[anEditor window] makeFirstResponder: anEditor];
|
||||
[[anEditor window] makeFirstResponder: (id)anEditor];
|
||||
}
|
||||
[nc postNotificationName: IBSelectionChangedNotification
|
||||
object: anEditor];
|
||||
|
@ -3558,7 +3558,14 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
|
|||
[classManager renameClassNamed: item newName: anObject];
|
||||
[gov reloadData];
|
||||
row = [gov rowForItem: anObject];
|
||||
|
||||
// make sure that item is collapsed...
|
||||
[gov expandItem: anObject];
|
||||
[gov collapseItem: anObject];
|
||||
|
||||
// scroll to the item..
|
||||
[gov scrollRowToVisible: row];
|
||||
// [gov selectRow: row byExtendingSelection: NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,8 +103,8 @@ static GormFontViewController *gorm_font_cont = nil;
|
|||
else
|
||||
{
|
||||
[encodeButton setEnabled: YES];
|
||||
[encodeButton setState: NSOnState];
|
||||
}
|
||||
[encodeButton setState: NSOffState];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) view
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
{
|
||||
}
|
||||
- (NSArray*) destroyAndListSubviews;
|
||||
- (void) changeFont: (id)sender;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <AppKit/AppKit.h>
|
||||
#include "GormPrivate.h"
|
||||
#include "GormInternalViewEditor.h"
|
||||
#include "GormFontViewController.h"
|
||||
|
||||
@class GormEditorToParent;
|
||||
|
||||
|
@ -933,4 +934,35 @@ static NSImage *horizontalImage;
|
|||
{
|
||||
[self deleteSelection];
|
||||
}
|
||||
|
||||
- (void) changeFont: (id)sender
|
||||
{
|
||||
NSEnumerator *enumerator = [[self selection] objectEnumerator];
|
||||
id anObject;
|
||||
NSFont *newFont;
|
||||
|
||||
NSDebugLog(@"In %@ changing font for %@",[self className],[self selection]);
|
||||
while ((anObject = [enumerator nextObject]))
|
||||
{
|
||||
if([anObject respondsToSelector: @selector(setTitleFont:)] &&
|
||||
[anObject respondsToSelector: @selector(setTextFont:)])
|
||||
{
|
||||
newFont = [sender convertFont: [anObject font]];
|
||||
newFont = [[GormFontViewController sharedGormFontViewController]
|
||||
convertFont: newFont];
|
||||
[anObject setTitleFont: newFont];
|
||||
[anObject setTextFont: newFont];
|
||||
}
|
||||
else if ([anObject respondsToSelector: @selector(font)] &&
|
||||
[anObject respondsToSelector: @selector(setFont:)])
|
||||
{
|
||||
newFont = [sender convertFont: [anObject font]];
|
||||
newFont = [[GormFontViewController sharedGormFontViewController]
|
||||
convertFont: newFont];
|
||||
[anObject setFont: newFont];
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "GormMatrixEditor.h"
|
||||
#include "GormViewWithSubviewsEditor.h"
|
||||
#include "GormPlacementInfo.h"
|
||||
#include "GormFontViewController.h"
|
||||
|
||||
#define _EO ((NSMatrix*)_editedObject)
|
||||
|
||||
|
@ -640,6 +641,36 @@ static BOOL done_editing;
|
|||
}
|
||||
}
|
||||
|
||||
- (void) changeFont: (id)sender
|
||||
{
|
||||
NSEnumerator *enumerator = [[self selection] objectEnumerator];
|
||||
id anObject;
|
||||
NSFont *newFont;
|
||||
|
||||
NSDebugLog(@"In %@ changing font for %@",[self className],[self selection]);
|
||||
while ((anObject = [enumerator nextObject]))
|
||||
{
|
||||
if([anObject respondsToSelector: @selector(setTitleFont:)] &&
|
||||
[anObject respondsToSelector: @selector(setTextFont:)])
|
||||
{
|
||||
newFont = [sender convertFont: [anObject font]];
|
||||
newFont = [[GormFontViewController sharedGormFontViewController]
|
||||
convertFont: newFont];
|
||||
[anObject setTitleFont: newFont];
|
||||
[anObject setTextFont: newFont];
|
||||
}
|
||||
else if ([anObject respondsToSelector: @selector(font)] &&
|
||||
[anObject respondsToSelector: @selector(setFont:)])
|
||||
{
|
||||
newFont = [sender convertFont: [anObject font]];
|
||||
newFont = [[GormFontViewController sharedGormFontViewController]
|
||||
convertFont: newFont];
|
||||
[anObject setFont: newFont];
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -67,9 +67,10 @@
|
|||
NSView *documentView = [_EO documentView];
|
||||
|
||||
NSDebugLog(@"documentView %@", documentView);
|
||||
documentViewEditor = [document editorForObject: documentView
|
||||
inEditor: self
|
||||
create: YES];
|
||||
documentViewEditor = (GormInternalViewEditor *)[document
|
||||
editorForObject: documentView
|
||||
inEditor: self
|
||||
create: YES];
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
*/
|
||||
- (void) closeSubeditors;
|
||||
- (void) deactivateSubeditors;
|
||||
- (void) changeFont: (id)sender;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue