mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 06:20:47 +00:00
Fix all warnings in Gorm
This commit is contained in:
parent
cc3345990d
commit
eb0b0bfbe1
10 changed files with 44 additions and 19 deletions
8
Gorm.m
8
Gorm.m
|
@ -1379,14 +1379,19 @@
|
|||
return classMenu;
|
||||
}
|
||||
|
||||
|
||||
- (void) print: (id) sender
|
||||
{
|
||||
[[self keyWindow] print: sender];
|
||||
}
|
||||
|
||||
- (void) selectAllItems: (id)sender
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation Gorm (GormServer)
|
||||
|
||||
// Methods to support external apps adding and deleting
|
||||
// classes from the current document...
|
||||
- (void) addClass: (NSDictionary *) dict
|
||||
|
@ -1418,4 +1423,5 @@
|
|||
|
||||
[cm removeClassNamed: className];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1908,12 +1908,12 @@
|
|||
{
|
||||
if([self isKnownClass: className])
|
||||
{
|
||||
NSString *title = [NSString stringWithFormat:
|
||||
NSString *title = [NSString stringWithFormat: @"%@",
|
||||
_(@"Reparsing Class")];
|
||||
NSString *msg = [NSString stringWithFormat:
|
||||
_(@"This may break connections to "
|
||||
@"actions/outlets to instances of class '%@' "
|
||||
@"and it's subclasses. Continue?"),
|
||||
NSString *messageFormat = _(@"This may break connections to "
|
||||
@"actions/outlets to instances of class '%@' "
|
||||
@"and it's subclasses. Continue?");
|
||||
NSString *msg = [NSString stringWithFormat: messageFormat,
|
||||
className];
|
||||
NSInteger retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil);
|
||||
|
||||
|
|
|
@ -1083,7 +1083,7 @@ static NSImage *fileImage = nil;
|
|||
{
|
||||
NSEnumerator *enumerator;
|
||||
NSMutableSet *editorSet;
|
||||
id obj;
|
||||
id<IBEditors> obj;
|
||||
NSMutableData *data;
|
||||
NSArchiver *archiver;
|
||||
|
||||
|
@ -1540,7 +1540,7 @@ static NSImage *fileImage = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
[[[links lastObject] destination] activate];
|
||||
[(id<IBEditors>)[[links lastObject] destination] activate];
|
||||
return [[links lastObject] destination];
|
||||
}
|
||||
}
|
||||
|
@ -2588,11 +2588,12 @@ static void _real_close(GormDocument *self,
|
|||
id<IBConnectors> c = nil;
|
||||
BOOL removed = YES;
|
||||
NSInteger retval = -1;
|
||||
NSString *title = [NSString stringWithFormat: _(@"Modifying Class")];
|
||||
NSString *title = [NSString stringWithFormat: @"%@",_(@"Modifying Class")];
|
||||
NSString *msg;
|
||||
NSString *msgFormat = _(@"This will break all connections to "
|
||||
@"actions/outlets to instances of class '%@' and it's subclasses. Continue?");
|
||||
|
||||
msg = [NSString stringWithFormat: _(@"This will break all connections to "
|
||||
@"actions/outlets to instances of class '%@' and it's subclasses. Continue?"), className];
|
||||
msg = [NSString stringWithFormat: msgFormat, className];
|
||||
|
||||
// ask the user if he/she wants to continue...
|
||||
retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil);
|
||||
|
@ -2701,9 +2702,10 @@ static void _real_close(GormDocument *self,
|
|||
id<IBConnectors> c = nil;
|
||||
BOOL renamed = YES;
|
||||
NSInteger retval = -1;
|
||||
NSString *title = [NSString stringWithFormat: _(@"Modifying Class")];
|
||||
NSString *title = [NSString stringWithFormat: @"%@", _(@"Modifying Class")];
|
||||
NSString *msgFormat = _(@"Change class name '%@' to '%@'. Continue?");
|
||||
NSString *msg = [NSString stringWithFormat:
|
||||
_(@"Change class name '%@' to '%@'. Continue?"),
|
||||
msgFormat,
|
||||
className, newName];
|
||||
|
||||
// ask the user if he/she wants to continue...
|
||||
|
@ -3558,7 +3560,7 @@ static void _real_close(GormDocument *self,
|
|||
while ((con = [enumerator nextObject]) != nil)
|
||||
{
|
||||
if ([[con source] isKindOfClass: [NSView class]] == NO)
|
||||
[[con destination] activate];
|
||||
[(id<IBEditors>)[con destination] activate];
|
||||
}
|
||||
[savedEditors removeAllObjects];
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
static GormFontViewController *gorm_font_cont = nil;
|
||||
|
||||
@implementation GormFontViewController
|
||||
|
||||
+ (GormFontViewController *) sharedGormFontViewController
|
||||
{
|
||||
if (gorm_font_cont == nil)
|
||||
|
@ -15,6 +16,7 @@ static GormFontViewController *gorm_font_cont = nil;
|
|||
}
|
||||
return gorm_font_cont;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
self = [super init];
|
||||
|
@ -31,6 +33,7 @@ static GormFontViewController *gorm_font_cont = nil;
|
|||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSFont *) convertFont: (NSFont *)aFont
|
||||
{
|
||||
float size;
|
||||
|
@ -87,6 +90,7 @@ static GormFontViewController *gorm_font_cont = nil;
|
|||
|
||||
return font;
|
||||
}
|
||||
|
||||
- (void) selectFont: (id)sender
|
||||
{
|
||||
NSFontManager *fontManager = [NSFontManager sharedFontManager];
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
- (void) pause: (id)sender
|
||||
{
|
||||
NSDebugLog(@"Pause");
|
||||
[object pause];
|
||||
[(NSSound *)object pause];
|
||||
}
|
||||
|
||||
- (void) record: (id)sender
|
||||
|
|
|
@ -179,7 +179,7 @@
|
|||
// id sub = nil;
|
||||
|
||||
// activate the parent and all subview editors...
|
||||
[editor activate];
|
||||
[(id<IBEditors>)editor activate];
|
||||
/*
|
||||
while((sub = [en nextObject]) != nil)
|
||||
{
|
||||
|
|
|
@ -793,7 +793,7 @@
|
|||
[[self window] postEvent: e atStart: NO];
|
||||
|
||||
{
|
||||
NSRect redrawRect;
|
||||
NSRect redrawRect = NSZeroRect;
|
||||
|
||||
/*
|
||||
* This was a subview resize, so we must clean up by removing
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
#include "NSCell+GormAdditions.h"
|
||||
|
||||
@implementation NSCell (GormAdditions)
|
||||
|
||||
// This is category-smashing...
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wobjc-protocol-method-implementation"
|
||||
|
||||
/*
|
||||
* this methods is directly coming from NSCell.m
|
||||
* The only additions is [textObject setUsesFontPanel: NO]
|
||||
|
@ -57,4 +62,7 @@
|
|||
|
||||
return textObject;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@end
|
||||
|
|
|
@ -44,6 +44,9 @@
|
|||
|
||||
@implementation NSFontManager (GormExtensions)
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wobjc-protocol-method-implementation"
|
||||
|
||||
/**
|
||||
* Override for sendAction in NSFontManager. This method calls the action on the
|
||||
* last edited object if the attempt to send the action to the first responder is
|
||||
|
@ -82,4 +85,6 @@
|
|||
return result;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@end
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
}
|
||||
else if (sender == autorepeatButton)
|
||||
{
|
||||
switch ([sender state])
|
||||
switch ([(NSButton *)sender state])
|
||||
{
|
||||
case 0:
|
||||
[object setAutorepeat: NO];
|
||||
|
@ -93,7 +93,7 @@
|
|||
}
|
||||
else if (sender == valueWrapsButton)
|
||||
{
|
||||
switch ([sender state])
|
||||
switch ([(NSButton *)sender state])
|
||||
{
|
||||
case 0:
|
||||
[object setValueWraps: NO];
|
||||
|
|
Loading…
Reference in a new issue