From c1b0786d0a464e90167e7c8ddeb46d96574dd04d Mon Sep 17 00:00:00 2001 From: far Date: Fri, 6 Nov 1998 04:01:33 +0000 Subject: [PATCH] * Model/GNUmakefile enable build of test app, fix resource files ref. * Model/test.gmodel remove ref to IMCustomView. * Model/GMAppKit.m add test for XRAW backend. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3175 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Model/GMAppKit.m | 6 +++--- Model/GNUmakefile | 4 ++-- Model/test.gmodel | 6 +++--- Model/test.m | 15 ++++++--------- Source/NSApplication.m | 2 +- Source/NSWindow.m | 4 ++-- Testing/testpb.m | 7 +++++++ 8 files changed, 30 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d07d2bf9..d82cb5e2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Nov 5 1998 Felipe A. Rodriguez + + * Model/GNUmakefile enable build of test app, fix resource files ref. + * Model/test.gmodel remove ref to IMCustomView. + * Model/GMAppKit.m add test for XRAW backend. + Wed Nov 4 1998 Felipe A. Rodriguez * NSApplication.h/NSApplication.m remove unused ivar recycledEventsQueue. diff --git a/Model/GMAppKit.m b/Model/GMAppKit.m index 5419b66ce..12e7e70b1 100644 --- a/Model/GMAppKit.m +++ b/Model/GMAppKit.m @@ -94,7 +94,7 @@ void __dummy_GMAppKit_functionForLinking() {} NSMenu* mainMenu = [self mainMenu]; [mainMenu update]; -#if XDPS_BACKEND_LIBRARY +#if XDPS_BACKEND_LIBRARY || XRAW_BACKEND_LIBRARY [mainMenu display]; #endif @@ -454,7 +454,7 @@ void __dummy_GMAppKit_functionForLinking() {} - (void)encodeWithModelArchiver:(GMArchiver*)archiver { -#if XDPS_BACKEND_LIBRARY +#if XDPS_BACKEND_LIBRARY || XRAW_BACKEND_LIBRARY [super encodeWithModelArchiver:archiver]; #endif @@ -468,7 +468,7 @@ void __dummy_GMAppKit_functionForLinking() {} - (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver { -#if XDPS_BACKEND_LIBRARY +#if XDPS_BACKEND_LIBRARY || XRAW_BACKEND_LIBRARY self = [super initWithModelUnarchiver:unarchiver]; #endif diff --git a/Model/GNUmakefile b/Model/GNUmakefile index 65cad5241..a5ee389af 100644 --- a/Model/GNUmakefile +++ b/Model/GNUmakefile @@ -34,7 +34,7 @@ ifeq ($(GUI_LIB), nx) TOOL_NAME = nib2gmodel endif -# APP_NAME = test +APP_NAME = test libgmodel_OBJC_FILES = IMCustomObject.m IMConnectors.m IMLoading.m GMAppKit.m libgmodel_HEADER_FILES_DIR = ../Headers/AppKit @@ -43,7 +43,7 @@ libgmodel_HEADER_FILES = IMConnectors.h IMCustomObject.h IMLoading.h GMAppKit.h test_OBJC_FILES = test.m Controller.m test_MAIN_MODEL_FILE = test.gmodel -test_RESOURCES = test.gmodel +test_RESOURCE_FILES = test.gmodel nib2gmodel_OBJC_FILES = IBClasses.m Translator.m nib2gmodel.m diff --git a/Model/test.gmodel b/Model/test.gmodel index 4f72b4744..4485a6c4f 100644 --- a/Model/test.gmodel +++ b/Model/test.gmodel @@ -62,7 +62,7 @@ backgroundColor = "Object 8"; backingType = 0; contentView = "Object 10"; - frame = "{x = 0; y = 0; width = 193; height = 208}"; + frame = "{x = 100; y = 100; width = 193; height = 208}"; frameAutosaveName = nil; hidesOnDeactivate = NO; isAutodisplay = NO; @@ -92,7 +92,7 @@ backgroundColor = "Object 8"; backingType = 2; contentView = "Object 12"; - frame = "{x = 258; y = 511; width = 422; height = 304}"; + frame = "{x = 100; y = 100; width = 422; height = 304}"; frameAutosaveName = nil; hidesOnDeactivate = NO; isAutodisplay = YES; @@ -455,7 +455,7 @@ saturation = 0.000000; }; "Object 30" = {isa = NSPopUpButton; pullsDown = NO; }; - "Object 31" = {className = MyView; isa = IMCustomView; }; + "Object 31" = {className = MyView; isa = NSView; }; "Object 32" = { backgroundColor = "Object 8"; backingType = 2; diff --git a/Model/test.m b/Model/test.m index 707702714..01f8d662f 100644 --- a/Model/test.m +++ b/Model/test.m @@ -13,17 +13,18 @@ } @end - int main (int argc, char** argv, char** env) { - id pool; - NSArray* arguments; - NSProcessInfo* processInfo; +id pool = [NSAutoreleasePool new]; +NSArray* arguments; +NSProcessInfo* processInfo; - pool = [NSAutoreleasePool new]; #if LIB_FOUNDATION_LIBRARY [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; #endif +#ifndef NX_CURRENT_COMPILER_RELEASE + initialize_gnustep_backend(); +#endif #if 0 processInfo = [NSProcessInfo processInfo]; @@ -34,10 +35,6 @@ int main (int argc, char** argv, char** env) } #endif -#ifndef NX_CURRENT_COMPILER_RELEASE - initialize_gnustep_backend(); -#endif - #if 0 if (![GMModel loadIMFile:[arguments objectAtIndex:1] owner:[NSApplication sharedApplication]]) { diff --git a/Source/NSApplication.m b/Source/NSApplication.m index d49269eb0..dbec66d2f 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -149,7 +149,7 @@ NSString* mainModelFile; { if (![GMModel loadIMFile:mainModelFile owner:[NSApplication sharedApplication]]) - NSLog (@"Cannot load the main model file '%@", mainModelFile); + NSLog (@"Cannot load the main model file '%@", mainModelFile); } // post notification that // launch will finish diff --git a/Source/NSWindow.m b/Source/NSWindow.m index a809aac52..83c2f7288 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -124,8 +124,8 @@ static BOOL _needsFlushWindows = YES; int style; NSDebugLog(@"NSWindow -init\n"); - // default style - style = NSTitledWindowMask | NSClosableWindowMask // mask + // default window + style = NSTitledWindowMask | NSClosableWindowMask // style mask | NSMiniaturizableWindowMask | NSResizableWindowMask; return [self initWithContentRect:NSZeroRect diff --git a/Testing/testpb.m b/Testing/testpb.m index 5c45e343c..d742e5d63 100755 --- a/Testing/testpb.m +++ b/Testing/testpb.m @@ -2,6 +2,7 @@ #include #include #include +#include #include BOOL @@ -10,6 +11,12 @@ initialize_gnustep_backend(void) /* Dummy replacement for the xdps function */ return YES; } +void NSHighlightRect(NSRect aRect) // dummy define +{} +void NSRectFill(NSRect aRect) // dummy define +{} +void NSBeep(void) // dummy define +{} @interface GMModel: NSObject {