mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 05:32:11 +00:00
Corrected an issue and more work on data link.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20044 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1040bb284d
commit
05af0a68bc
3 changed files with 41 additions and 30 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-09-11 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSCell.m: Reverted previous change.
|
||||
The change was causing an issue where if the font was
|
||||
changed on an NSButtonCell which contains both an image and text.
|
||||
The title was being, incorrectly, reset to "title".
|
||||
* Source/NSDataLinkPanel.m: Renamed the shared variable to something
|
||||
more standard.
|
||||
|
||||
2004-09-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSCell.m (-setStringValue:, -setFont:, -setImage:): Use
|
||||
|
|
|
@ -344,10 +344,7 @@ static NSColor *shadowCol;
|
|||
@"Attempt to use nil as string value");
|
||||
}
|
||||
|
||||
if (_cell.type != NSTextCellType)
|
||||
{
|
||||
[self setType: NSTextCellType];
|
||||
}
|
||||
_cell.type = NSTextCellType;
|
||||
_cell.contents_is_attributed_string = NO;
|
||||
|
||||
if (_formatter == nil)
|
||||
|
@ -742,13 +739,13 @@ static NSColor *shadowCol;
|
|||
|
||||
- (void) setFont: (NSFont*)fontObject
|
||||
{
|
||||
if (_cell.type != NSTextCellType)
|
||||
{
|
||||
[self setType: NSTextCellType];
|
||||
}
|
||||
|
||||
// This does not have any influence on attributed strings
|
||||
ASSIGN (_font, fontObject);
|
||||
|
||||
if (_cell.type != NSTextCellType)
|
||||
{
|
||||
_cell.type = NSTextCellType;
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setSelectable: (BOOL)flag
|
||||
|
@ -973,10 +970,7 @@ static NSColor *shadowCol;
|
|||
NSInvalidArgumentException);
|
||||
}
|
||||
|
||||
if (_cell.type != NSImageCellType)
|
||||
{
|
||||
[self setType: NSImageCellType];
|
||||
}
|
||||
_cell.type = NSImageCellType;
|
||||
|
||||
ASSIGN (_cell_image, anImage);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "AppKit/NSNibLoading.h"
|
||||
#include "GSGuiPrivate.h"
|
||||
|
||||
static NSDataLinkPanel *__sharedDataLinkPanel;
|
||||
static NSDataLinkPanel *_sharedDataLinkPanel;
|
||||
|
||||
@interface GSDataLinkPanelController : NSObject
|
||||
{
|
||||
|
@ -43,19 +43,21 @@ static NSDataLinkPanel *__sharedDataLinkPanel;
|
|||
NSString *panelPath;
|
||||
NSDictionary *table;
|
||||
|
||||
self = [super init];
|
||||
panelPath = [GSGuiBundle() pathForResource: @"GSDataLinkPanel"
|
||||
ofType: @"gorm"
|
||||
inDirectory: nil];
|
||||
NSLog(@"Panel path=%@",panelPath);
|
||||
table = [NSDictionary dictionaryWithObject: self forKey: @"NSOwner"];
|
||||
if ([NSBundle loadNibFile: panelPath
|
||||
externalNameTable: table
|
||||
withZone: [self zone]] == NO)
|
||||
if((self = [super init]) != nil)
|
||||
{
|
||||
NSRunAlertPanel(@"Error", @"Could not load data link panel resource",
|
||||
@"OK", NULL, NULL);
|
||||
return nil;
|
||||
panelPath = [GSGuiBundle() pathForResource: @"GSDataLinkPanel"
|
||||
ofType: @"gorm"
|
||||
inDirectory: nil];
|
||||
NSLog(@"Panel path=%@",panelPath);
|
||||
table = [NSDictionary dictionaryWithObject: self forKey: @"NSOwner"];
|
||||
if ([NSBundle loadNibFile: panelPath
|
||||
externalNameTable: table
|
||||
withZone: [self zone]] == NO)
|
||||
{
|
||||
NSRunAlertPanel(@"Error", @"Could not load data link panel resource",
|
||||
@"OK", NULL, NULL);
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -65,6 +67,12 @@ static NSDataLinkPanel *__sharedDataLinkPanel;
|
|||
{
|
||||
return panel;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(panel);
|
||||
[super dealloc];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSApplication (NSDataLinkPanel)
|
||||
|
@ -100,13 +108,13 @@ static NSDataLinkPanel *__sharedDataLinkPanel;
|
|||
//
|
||||
+ (NSDataLinkPanel *)sharedDataLinkPanel
|
||||
{
|
||||
if(__sharedDataLinkPanel == nil)
|
||||
if(_sharedDataLinkPanel == nil)
|
||||
{
|
||||
id controller = [[GSDataLinkPanelController alloc] init];
|
||||
__sharedDataLinkPanel = [controller panel];
|
||||
_sharedDataLinkPanel = [controller panel];
|
||||
}
|
||||
NSLog(@"%@",__sharedDataLinkPanel);
|
||||
return __sharedDataLinkPanel;
|
||||
NSLog(@"%@",_sharedDataLinkPanel);
|
||||
return _sharedDataLinkPanel;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue