Commits

Ivan Vučica committed c3fa2b8

Renamed program to SlaveOPML under GNUstep. Added some debugging code.

Comments (0)

Files changed (8)

 ASIHTTPRequest/*
 build/*
 obj/*
-OPML.app/*
+SlaveOPML.app/*
 _OriginalResources/*
 #
 # Application
 #
-VERSION = 1.0
-PACKAGE_NAME = OPML
-APP_NAME = OPML
-#OPML_APPLICATION_ICON = apple-green.png
+VERSION = 0.1
+PACKAGE_NAME = SlaveOPML
+APP_NAME = SlaveOPML
+OPML_APPLICATION_ICON = Icon.png
 
 #
 # Resource files
 #
-OPML_RESOURCE_FILES = \
+SlaveOPML_RESOURCE_FILES = \
 ./OPML/OPMLOpenURLDialog.xib \
 ./OPML/OPMLInspectorController.xib \
 ./OPML/en.lproj/OPMLDocument.xib \
 ./OPML/en.lproj/MainMenu.xib \
 ./OPML/OPMLPreferences.xib \
-./Info-gnustep.plist
+./Info-gnustep.plist \
+./Icon.png \
+./Icon.icns \
+./Icon.opml.icns
 
 #
 # Header files
 #
-OPML_HEADER_FILES = \
+SlaveOPML_HEADER_FILES = \
 OPML/OPMLAppDelegate.h		     OPML/OPMLInspectorController.h  OPML/OPMLOutlineXMLElement.h \
 OPML/OPMLDocumentController.h	     OPML/OPMLOpenURLDialog.h	     OPML/OPMLOutline+Private.h		 OPML/OPMLPreferences.h \
 OPML/OPMLDocument.h		     OPML/OPMLOutline.h		     OPML/OPMLOutlineView.h \
 #
 # Class files
 #
-OPML_OBJC_FILES = \
+SlaveOPML_OBJC_FILES = \
 OPML/main.m		       OPML/OPMLDocumentWindowController.m  OPML/OPMLOutlineXMLElement.m \
 OPML/OPMLAppDelegate.m	       OPML/OPMLInspectorController.m	    OPML/OPMLPreferences.m \
 OPML/OPMLDocumentController.m  OPML/OPMLOpenURLDialog.m		    OPML/OPMLOutlineView.m \
Added
New image

Info-gnustep.plist

 {
     ApplicationDescription = "An OPML outliner";
-    ApplicationIcon = "apple-green.png";
-    ApplicationName = OPML;
+    ApplicationIcon = "Icon.png";
+    ApplicationName = SlaveOPML;
     ApplicationRelease = 0.1;
     Authors = (
 	"Ivan Vucica"
     CopyrightDescription = "Released under GNU General Public License v2 or later";
     FullVersionID = 0.1;
     NSExecutable = OPML;
-    NSIcon = "apple-green.png";
+    NSIcon = "Icon.png";
     NSMainNibFile = MainMenu;
     NSPrincipalClass = NSApplication;
     NSRole = Application;
 	{
 	    NSDocumentClass = OPMLDocument;
 	    NSHumanReadableName = "OPML Outline";
-	    NSIcon = "apple-green.png";
+	    NSIcon = "Icon.opml.icns";
 	    NSName = "OPML Outline";
 	    NSRole = Editor;
 	    NSUnixExtensions = (

OPML/OPMLInspectorController.m

     [super dealloc];
     
 } // dealloc
-
+/*
 #if GNUSTEP
 - (void) loadWindow
 {
 
 }
 #endif
-
+*/
 - (void) windowDidLoad
 {
     [super windowDidLoad];

OPML/OPMLOutline+ViewRelated.m

     if(!item)
     {
         // own child count
-        NSLog(@"Root children %ld", [[[self bodyNode] nodesForXPath:@"./outline" error:nil] count]);
         return [[[self bodyNode] nodesForXPath:@"./outline" error:nil] count];
     }
     
         OPMLOutlineXMLElement * element = (OPMLOutlineXMLElement*)item;
 #if !GNUSTEP
         if([element rootDocument] == _xmlDocument)
+#else
+#warning GNUstep: Not checking whether current node is member of the associated document
 #endif
         {
             NSXMLNode * textAttribute = [element attributeForName:@"text"];

OPML/OPMLOutline.m

 {
     OPMLOutline * doc;
     doc = [super initWithData:data options:0 error:error];
-#if GNUSTEP
-#warning Exception occurs on line above, fixme
-#endif
     self = doc;
     if(!self)
         return nil;
     _xmlDocument = self;
     [self setOpmlRoot:[opmlNodes objectAtIndex:0]];
     [self setIncludedOutlines:[NSMutableDictionary dictionary]];
-    
+
+#if GNUSTEP
+    [self _debug_printOutlineElementClasses];
+#endif
+
     if(![self isXMLValidOPMLWithError:error])
     {
         [self release];
         return nil;
     }
     
-    
     return self;
 }
 
 // MARK: -
 // MARK: Methods
 
+#if GNUSTEP
+-(void)_debug_printOutlineElementClasses
+{
+    NSLog(@"debug");
+    //for(NSXMLElement * element in [[self bodyNode] nodesForXPath:@"./outline" error:nil])
+    NSEnumerator *e = [[[self bodyNode] nodesForXPath:@"./outline" error:nil] objectEnumerator];
+    for(NSXMLElement * element = [e nextObject]; element; element = [e nextObject])
+    {
+        NSLog(@"element class: %@", [element class]);
+    }
+}
+#endif
+
 -(BOOL)isXMLValidOPMLWithError:(NSError**)error
 {
     // Checks whether the XML structure is a valid OPML.

OPML/OPMLOutlineXMLElement.m

 #import "OPMLOutlineXMLElement.h"
 
 @implementation OPMLOutlineXMLElement
+- (id)initWithKind:(NSXMLNodeKind)kind options:(NSUInteger)options
+{
+	self = [super initWithKind:kind options:options];
+	NSLog(@"iwk\n");
+	return self;
+}
 - (OPMLOutline*)childOutline
 {
     return _childOutline;