mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 12:30:59 +00:00
* Source/externs.m: Correct the strings for NSPrintPanel.
* Source/NSAttributedString.m (-setBaseWritingDirection:range:): Add proper implementation for this method. * Source/NSTextView_actions.m (-insertContainerBreak:, -insertLineBreak): Add this methods. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33254 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3bfbeeee07
commit
7fec0a25f1
4 changed files with 63 additions and 7 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2011-06-06 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/externs.m: Correct the strings for NSPrintPanel.
|
||||||
|
* Source/NSAttributedString.m (-setBaseWritingDirection:range:):
|
||||||
|
Add proper implementation for this method.
|
||||||
|
* Source/NSTextView_actions.m (-insertContainerBreak:)
|
||||||
|
(-insertLineBreak): Add this methods.
|
||||||
|
|
||||||
2011-06-05 Fred Kiefer <FredKiefer@gmx.de>
|
2011-06-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/NSPrintPanel.h,
|
* Headers/AppKit/NSPrintPanel.h,
|
||||||
|
|
|
@ -1843,10 +1843,47 @@ static NSMutableDictionary *cachedCSets = nil;
|
||||||
- (void) setBaseWritingDirection: (NSWritingDirection)writingDirection
|
- (void) setBaseWritingDirection: (NSWritingDirection)writingDirection
|
||||||
range: (NSRange)range
|
range: (NSRange)range
|
||||||
{
|
{
|
||||||
[self setAttributes: [NSDictionary dictionaryWithObject:
|
id value;
|
||||||
[NSNumber numberWithInt: writingDirection]
|
unsigned loc = range.location;
|
||||||
forKey: @"WritingDirection"]
|
|
||||||
range: range];
|
if (NSMaxRange(range) > [self length])
|
||||||
|
{
|
||||||
|
[NSException raise: NSRangeException
|
||||||
|
format: @"RangeError in method -setBaseWritingDirection: range: "];
|
||||||
|
}
|
||||||
|
|
||||||
|
while (loc < NSMaxRange(range))
|
||||||
|
{
|
||||||
|
BOOL copiedStyle = NO;
|
||||||
|
NSRange effRange;
|
||||||
|
NSRange newRange;
|
||||||
|
|
||||||
|
value = [self attribute: NSParagraphStyleAttributeName
|
||||||
|
atIndex: loc
|
||||||
|
effectiveRange: &effRange];
|
||||||
|
newRange = NSIntersectionRange(effRange, range);
|
||||||
|
|
||||||
|
if (value == nil)
|
||||||
|
{
|
||||||
|
value = [NSMutableParagraphStyle defaultParagraphStyle];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = [value mutableCopy];
|
||||||
|
copiedStyle = YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
[value setBaseWritingDirection: writingDirection];
|
||||||
|
|
||||||
|
[self addAttribute: NSParagraphStyleAttributeName
|
||||||
|
value: value
|
||||||
|
range: newRange];
|
||||||
|
if (copiedStyle == YES)
|
||||||
|
{
|
||||||
|
RELEASE(value);
|
||||||
|
}
|
||||||
|
loc = NSMaxRange(effRange);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -565,6 +565,17 @@ static NSNumber *float_plus_one(NSNumber *cur)
|
||||||
[self insertText: @"\t"];
|
[self insertText: @"\t"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) insertContainerBreak: (id)sender
|
||||||
|
{
|
||||||
|
unichar ch = NSFormFeedCharacter;
|
||||||
|
[self insertText: [NSString stringWithCharacters: &ch length: 1]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) insertLineBreak: (id)sender
|
||||||
|
{
|
||||||
|
unichar ch = NSLineSeparatorCharacter;
|
||||||
|
[self insertText: [NSString stringWithCharacters: &ch length: 1]];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) deleteForward: (id)sender
|
- (void) deleteForward: (id)sender
|
||||||
{
|
{
|
||||||
|
|
|
@ -354,9 +354,9 @@ NSString *NSPrintSaveJob = @"PrintSaveJob";
|
||||||
NSString *NSPrintSpoolJob = @"PrintSpoolJob";
|
NSString *NSPrintSpoolJob = @"PrintSpoolJob";
|
||||||
|
|
||||||
// Print Panel
|
// Print Panel
|
||||||
NSString *NSPrintPanelAccessorySummaryItemNameKey = @"AccessorySummaryItemName";
|
NSString *NSPrintPanelAccessorySummaryItemNameKey = @"name";
|
||||||
NSString *NSPrintPanelAccessorySummaryItemDescriptionKey = @"AccessorySummaryItemDescription";
|
NSString *NSPrintPanelAccessorySummaryItemDescriptionKey = @"description";
|
||||||
NSString *NSPrintPhotoJobStyleHint = @"PhotoJobStyle";
|
NSString *NSPrintPhotoJobStyleHint = @"Photo";
|
||||||
|
|
||||||
// NSSplitView notifications
|
// NSSplitView notifications
|
||||||
NSString *NSSplitViewDidResizeSubviewsNotification =
|
NSString *NSSplitViewDidResizeSubviewsNotification =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue