mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:00:37 +00:00
Various text/font fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6291 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b5be67ab7d
commit
be2b1ba87b
6 changed files with 3091 additions and 3159 deletions
|
@ -365,8 +365,14 @@ static Class fontPanelClass = Nil;
|
|||
|
||||
// We update our own selected font
|
||||
if (_selectedFont != nil)
|
||||
[self setSelectedFont: [self convertFont: _selectedFont]
|
||||
isMultiple: _multiple];
|
||||
{
|
||||
NSFont *newFont = [self convertFont: _selectedFont];
|
||||
|
||||
if (newFont != nil)
|
||||
{
|
||||
[self setSelectedFont: newFont isMultiple: _multiple];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) removeFontTrait: (id)sender
|
||||
|
@ -377,8 +383,14 @@ static Class fontPanelClass = Nil;
|
|||
|
||||
// We update our own selected font
|
||||
if (_selectedFont != nil)
|
||||
[self setSelectedFont: [self convertFont: _selectedFont]
|
||||
isMultiple: _multiple];
|
||||
{
|
||||
NSFont *newFont = [self convertFont: _selectedFont];
|
||||
|
||||
if (newFont != nil)
|
||||
{
|
||||
[self setSelectedFont: newFont isMultiple: _multiple];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) modifyFont: (id)sender
|
||||
|
@ -388,8 +400,14 @@ static Class fontPanelClass = Nil;
|
|||
|
||||
// We update our own selected font
|
||||
if (_selectedFont != nil)
|
||||
[self setSelectedFont: [self convertFont: _selectedFont]
|
||||
isMultiple: _multiple];
|
||||
{
|
||||
NSFont *newFont = [self convertFont: _selectedFont];
|
||||
|
||||
if (newFont != nil)
|
||||
{
|
||||
[self setSelectedFont: newFont isMultiple: _multiple];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) modifyFontViaPanel: (id)sender
|
||||
|
@ -399,8 +417,14 @@ static Class fontPanelClass = Nil;
|
|||
|
||||
// We update our own selected font
|
||||
if (_selectedFont != nil)
|
||||
[self setSelectedFont: [self convertFont: _selectedFont]
|
||||
isMultiple: _multiple];
|
||||
{
|
||||
NSFont *newFont = [self convertFont: _selectedFont];
|
||||
|
||||
if (newFont != nil)
|
||||
{
|
||||
[self setSelectedFont: newFont isMultiple: _multiple];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -222,6 +222,8 @@ float sizes[] = {4.0, 6.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0,
|
|||
//TODO: We go over every item in the panel and check if a
|
||||
// value is selected. If so we send it on to the manager
|
||||
// newFont = [fm convertFont: fontObject toHaveTrait: NSItalicFontMask];
|
||||
NSLog(@"Multiple font conversion not implemented in NSFontPanel");
|
||||
newFont = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
5705
Source/NSText.m
5705
Source/NSText.m
File diff suppressed because it is too large
Load diff
|
@ -934,8 +934,8 @@ container, returning the modified location. */
|
|||
[super setDelegate: anObject];
|
||||
|
||||
#define SET_DELEGATE_NOTIFICATION(notif_name) \
|
||||
if ([delegate respondsToSelector: @selector(textView##notif_name: )]) \
|
||||
[nc addObserver: delegate \
|
||||
if ([_delegate respondsToSelector: @selector(textView##notif_name: )]) \
|
||||
[nc addObserver: _delegate \
|
||||
selector: @selector(textView##notif_name: ) \
|
||||
name: NSTextView##notif_name##Notification \
|
||||
object: self]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue