From 5203d67e8d991d1bae948760ad1e83679a84dd92 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Mon, 6 Sep 2004 21:41:32 +0000 Subject: [PATCH] Code cleanup. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20010 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 13 ++++++++++++- Gorm.m | 6 +++--- GormInspectorsManager.m | 28 +--------------------------- GormInternalViewEditor.m | 1 - GormMatrixEditor.m | 6 ++---- GormViewKnobs.m | 1 - GormWindowEditor.m | 10 ++++++++-- 7 files changed, 26 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index fbaf9398..71e849cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,15 @@ -2004-09-06 08:52 Gregory John Casamento +2004-09-06 17:39 Gregory John Casamento + + * Gorm.m: + * GormInspectorsManager.m: + * GormInternalViewEditor.m: + * GormMatrixEditor.m: + * GormViewKnobs.m: + * GormWindowEditor.m: Removed some old FIXME comments which + were no longer appropriate or which have already been + addressed. + +2004-09-06 15:30 Gregory John Casamento * GormDocument.m: Temporary fix for crash. Corrects a problem with document deallocation, until I can find a more diff --git a/Gorm.m b/Gorm.m index ea5b1d1b..e6a58ad4 100644 --- a/Gorm.m +++ b/Gorm.m @@ -69,9 +69,9 @@ static BOOL _isInInterfaceBuilder = NO; } else { - /* FIXME/TODO. What do we do if we are an attributed string. + /* TODO: What do we do if we are an attributed string. Think about what happens when the user ends editing. - Allows editing text attributes... Formatter... TODO. */ + Allows editing text attributes... Formatter. */ } [textObject setEditable: _cell.is_editable]; [textObject setSelectable: _cell.is_selectable || _cell.is_editable]; @@ -843,7 +843,7 @@ static BOOL _isInInterfaceBuilder = NO; - (void) selectAllItems: (id)sender { - /* FIXME */ + /* TODO: Select all items in the current selection owner. */ return; } diff --git a/GormInspectorsManager.m b/GormInspectorsManager.m index a8fb1549..b5572023 100644 --- a/GormInspectorsManager.m +++ b/GormInspectorsManager.m @@ -190,21 +190,6 @@ [panel orderFront: self]; } } - else if ([name isEqual: NSWindowDidResignKeyNotification] == YES) - { - if (current == 1) - { - /* FIXME - need to fix window focus handling for this to work */ - // [NSApp stopConnecting]; - } - } - else if ([name isEqual: IBWillCloseDocumentNotification] == YES) - { - // FIXME - // show an empty selection of the document closes - // [self setEmptyInspector]; - // [panel orderOut: self]; - } } - (id) init @@ -319,22 +304,11 @@ selector: @selector(handleNotification:) name: IBWillEndTestingInterfaceNotification object: nil]; - [nc addObserver: self - selector: @selector(handleNotification:) - name: NSWindowDidResignKeyNotification - object: panel]; [nc addObserver: self selector: @selector(updateInspectorPopUp:) name: NSPopUpButtonWillPopUpNotification object: popup]; - [nc addObserver: self - selector: @selector(handleNotification:) - name: NSPopUpButtonWillPopUpNotification - object: popup]; - [nc addObserver: self - selector: @selector(handleNotification:) - name: IBWillCloseDocumentNotification - object: [(id)NSApp activeDocument]]; + [popup setTarget: self]; [popup setAction: @selector(updateInspectorPopUp:)]; return self; diff --git a/GormInternalViewEditor.m b/GormInternalViewEditor.m index a0fa0854..801bb349 100644 --- a/GormInternalViewEditor.m +++ b/GormInternalViewEditor.m @@ -889,7 +889,6 @@ static NSImage *horizontalImage; [NSArray arrayWithObject: editor]]; } } - // FIXME we should maybe open ourself } return YES; diff --git a/GormMatrixEditor.m b/GormMatrixEditor.m index 2e184910..fd1495b9 100644 --- a/GormMatrixEditor.m +++ b/GormMatrixEditor.m @@ -116,9 +116,7 @@ static BOOL done_editing; } /* Called when we double-click on a text/editable cell or form. Overlay - a text field so the user can edit the title. - FIXME: Only works with NSForms now, doesn't handle different fonts - or cell sizes, etc. Needs some work.*/ + a text field so the user can edit the title. */ - (void) editTitleWithEvent: (NSEvent *)theEvent { int row, col; @@ -134,7 +132,7 @@ static BOOL done_editing; if (isForm == NO && [selected type] != NSTextCellType) return; - /* FIXME: Seems wierd to do this. */ + // get the superview we are to edit from. edit_view = [_EO superview]; [_EO getRow: &row column: &col ofCell: selected]; diff --git a/GormViewKnobs.m b/GormViewKnobs.m index 5f3afac5..16611d16 100644 --- a/GormViewKnobs.m +++ b/GormViewKnobs.m @@ -201,7 +201,6 @@ GormDrawKnobsForRect(NSRect aRect) } /* Draw these around an NSBox whose contents are being edited. - FIXME: Need some more representative indication of an edited view. */ void GormDrawOpenKnobsForRect(NSRect aRect) diff --git a/GormWindowEditor.m b/GormWindowEditor.m index 1a83095f..1a454864 100644 --- a/GormWindowEditor.m +++ b/GormWindowEditor.m @@ -266,11 +266,17 @@ */ - (void) draggedImage: (NSImage*)i endedAt: (NSPoint)p deposited: (BOOL)f { - NSDebugLog(@"draggedImage"); /* - * FIXME - handle this. * Notification that a drag failed/succeeded. */ + + NSDebugLog(@"draggedImage"); + + if(f == NO) + { + NSRunAlertPanel(NULL, _(@"Window drag failed."), + _(@"OK"), NULL, NULL); + } } - (unsigned int) draggingSourceOperationMaskForLocal: (BOOL)flag