mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:00:46 +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
76dd8f900b
commit
2f09829409
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>
|
2004-09-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSCell.m (-setStringValue:, -setFont:, -setImage:): Use
|
* Source/NSCell.m (-setStringValue:, -setFont:, -setImage:): Use
|
||||||
|
|
|
@ -344,10 +344,7 @@ static NSColor *shadowCol;
|
||||||
@"Attempt to use nil as string value");
|
@"Attempt to use nil as string value");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_cell.type != NSTextCellType)
|
_cell.type = NSTextCellType;
|
||||||
{
|
|
||||||
[self setType: NSTextCellType];
|
|
||||||
}
|
|
||||||
_cell.contents_is_attributed_string = NO;
|
_cell.contents_is_attributed_string = NO;
|
||||||
|
|
||||||
if (_formatter == nil)
|
if (_formatter == nil)
|
||||||
|
@ -742,13 +739,13 @@ static NSColor *shadowCol;
|
||||||
|
|
||||||
- (void) setFont: (NSFont*)fontObject
|
- (void) setFont: (NSFont*)fontObject
|
||||||
{
|
{
|
||||||
if (_cell.type != NSTextCellType)
|
|
||||||
{
|
|
||||||
[self setType: NSTextCellType];
|
|
||||||
}
|
|
||||||
|
|
||||||
// This does not have any influence on attributed strings
|
// This does not have any influence on attributed strings
|
||||||
ASSIGN (_font, fontObject);
|
ASSIGN (_font, fontObject);
|
||||||
|
|
||||||
|
if (_cell.type != NSTextCellType)
|
||||||
|
{
|
||||||
|
_cell.type = NSTextCellType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setSelectable: (BOOL)flag
|
- (void) setSelectable: (BOOL)flag
|
||||||
|
@ -973,10 +970,7 @@ static NSColor *shadowCol;
|
||||||
NSInvalidArgumentException);
|
NSInvalidArgumentException);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_cell.type != NSImageCellType)
|
_cell.type = NSImageCellType;
|
||||||
{
|
|
||||||
[self setType: NSImageCellType];
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSIGN (_cell_image, anImage);
|
ASSIGN (_cell_image, anImage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "AppKit/NSNibLoading.h"
|
#include "AppKit/NSNibLoading.h"
|
||||||
#include "GSGuiPrivate.h"
|
#include "GSGuiPrivate.h"
|
||||||
|
|
||||||
static NSDataLinkPanel *__sharedDataLinkPanel;
|
static NSDataLinkPanel *_sharedDataLinkPanel;
|
||||||
|
|
||||||
@interface GSDataLinkPanelController : NSObject
|
@interface GSDataLinkPanelController : NSObject
|
||||||
{
|
{
|
||||||
|
@ -43,19 +43,21 @@ static NSDataLinkPanel *__sharedDataLinkPanel;
|
||||||
NSString *panelPath;
|
NSString *panelPath;
|
||||||
NSDictionary *table;
|
NSDictionary *table;
|
||||||
|
|
||||||
self = [super init];
|
if((self = [super init]) != 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",
|
panelPath = [GSGuiBundle() pathForResource: @"GSDataLinkPanel"
|
||||||
@"OK", NULL, NULL);
|
ofType: @"gorm"
|
||||||
return nil;
|
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;
|
return self;
|
||||||
|
@ -65,6 +67,12 @@ static NSDataLinkPanel *__sharedDataLinkPanel;
|
||||||
{
|
{
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) dealloc
|
||||||
|
{
|
||||||
|
RELEASE(panel);
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation NSApplication (NSDataLinkPanel)
|
@implementation NSApplication (NSDataLinkPanel)
|
||||||
|
@ -100,13 +108,13 @@ static NSDataLinkPanel *__sharedDataLinkPanel;
|
||||||
//
|
//
|
||||||
+ (NSDataLinkPanel *)sharedDataLinkPanel
|
+ (NSDataLinkPanel *)sharedDataLinkPanel
|
||||||
{
|
{
|
||||||
if(__sharedDataLinkPanel == nil)
|
if(_sharedDataLinkPanel == nil)
|
||||||
{
|
{
|
||||||
id controller = [[GSDataLinkPanelController alloc] init];
|
id controller = [[GSDataLinkPanelController alloc] init];
|
||||||
__sharedDataLinkPanel = [controller panel];
|
_sharedDataLinkPanel = [controller panel];
|
||||||
}
|
}
|
||||||
NSLog(@"%@",__sharedDataLinkPanel);
|
NSLog(@"%@",_sharedDataLinkPanel);
|
||||||
return __sharedDataLinkPanel;
|
return _sharedDataLinkPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue