Make open panel work when gmodel fails

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4947 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-09-27 09:24:59 +00:00
parent 3759b7c719
commit e0d7903689
4 changed files with 13 additions and 13 deletions

View file

@ -1,3 +1,9 @@
Mon Sep 27 1999 Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSOpenPanel.m ([+openPanel]): use NSSavePanel's new
_initWithoutGModel method if loading of gmodel fails.
For now, use always the safer _initWithoutGModel.
Thu Sep 23 1999 Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSBrowserCell.m ([-drawInteriorWithFrame:inView:]): Clean

View file

@ -92,7 +92,6 @@ enum {
BOOL is_rotated_from_base;
BOOL is_rotated_or_scaled_from_base;
BOOL needs_display;
BOOL disable_autodisplay;
BOOL post_frame_changes;
BOOL post_bounds_changes;
BOOL autoresize_subviews;

View file

@ -68,18 +68,16 @@ static NSOpenPanel *gnustep_gui_open_panel = nil;
{
if (!gnustep_gui_open_panel)
{
[GMUnarchiver decodeClassName:@"NSSavePanel"
asClassName:@"NSOpenPanel"];
// [GMUnarchiver decodeClassName:@"NSSavePanel"
// asClassName:@"NSOpenPanel"];
if( ![GMModel loadIMFile:@"SavePanel" owner:NSApp] )
{
[NSException raise:NSGenericException
format:@"Unable to load open panel model file"];
}
//if( ![GMModel loadIMFile:@"SavePanel" owner:NSApp] )
[[NSOpenPanel alloc] _initWithoutGModel];
[gnustep_gui_open_panel setTitle:@"Open"];
[GMUnarchiver decodeClassName:@"NSSavePanel"
asClassName:@"NSSavePanel"];
// [GMUnarchiver decodeClassName:@"NSSavePanel"
// asClassName:@"NSSavePanel"];
}
return gnustep_gui_open_panel;

View file

@ -219,7 +219,6 @@ GSSetDragTypes(NSView* obj, NSArray *types)
window = nil;
is_rotated_from_base = NO;
is_rotated_or_scaled_from_base = NO;
disable_autodisplay = NO;
needs_display = YES;
post_frame_changes = NO;
autoresize_subviews = YES;
@ -2282,7 +2281,6 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
[aCoder encodeValueOfObjCType: @encode(BOOL)
at: &is_rotated_or_scaled_from_base];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &needs_display];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &disable_autodisplay];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &post_frame_changes];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &autoresize_subviews];
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &autoresizingMask];
@ -2304,7 +2302,6 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
[aDecoder decodeValueOfObjCType: @encode(BOOL)
at: &is_rotated_or_scaled_from_base];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &needs_display];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &disable_autodisplay];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &post_frame_changes];
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &autoresize_subviews];
[aDecoder decodeValueOfObjCType: @encode(unsigned int) at: &autoresizingMask];