diff options
author | Lakshmi Shanmugam | 2014-09-04 18:47:00 +0000 |
---|---|---|
committer | Lakshmi Shanmugam | 2014-09-04 18:47:00 +0000 |
commit | 22d8845db15635689e0089ba86e6b85e569dd7f6 (patch) | |
tree | 0292404466af2ee9dbc3f58e32051b123c4ebd5e /bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org | |
parent | 418f8414b42761e68fafc14f5b560d137139645c (diff) | |
download | eclipse.platform.swt-22d8845db15635689e0089ba86e6b85e569dd7f6.tar.gz eclipse.platform.swt-22d8845db15635689e0089ba86e6b85e569dd7f6.tar.xz eclipse.platform.swt-22d8845db15635689e0089ba86e6b85e569dd7f6.zip |
Modified fix for Bug 400478 - Print doesn't have a "print selection"
option on osx
Signed-off-by: Lakshmi Shanmugam <lshanmug@in.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org')
3 files changed, 18 insertions, 5 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras index 3e08ad24c1..6e4b1b125d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras @@ -2387,6 +2387,9 @@ <arg swt_gen="true"></arg> <retval swt_gen="true" swt_java_type="NSPrintInfo"></retval> </method> + <method selector="isSelectionOnly" swt_gen="true"> + <retval swt_gen="true"></retval> + </method> <method selector="jobDisposition" swt_gen="true"> <retval swt_gen="true"></retval> </method> @@ -2407,6 +2410,10 @@ <arg swt_gen="true"></arg> <retval swt_gen="true"></retval> </method> + <method selector="setSelectionOnly:" swt_gen="true"> + <arg swt_gen="true"></arg> + <retval swt_gen="true"></retval> + </method> <method selector="setUpPrintOperationDefaultValues" swt_gen="true"> <retval swt_gen="true"></retval> </method> @@ -4679,7 +4686,6 @@ <constant name="NSPrintSaveJob" swt_gen="true"></constant> <constant name="NSPrintSavePath" swt_gen="true"></constant> <constant name="NSPrintScalingFactor" swt_gen="true"></constant> - <constant name="NSPrintSelectionOnly" swt_gen="true"></constant> <constant name="NSPrintSpoolJob" swt_gen="true"></constant> <constant name="NSRTFPboardType" swt_gen="true"></constant> <constant name="NSSpellingStateAttributeName" swt_gen="true"></constant> diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java index 9c152fa0d4..2ab8681065 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPrintInfo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -53,6 +53,10 @@ public NSPrintInfo initWithDictionary(NSDictionary attributes) { return result == this.id ? this : (result != 0 ? new NSPrintInfo(result) : null); } +public boolean isSelectionOnly() { + return OS.objc_msgSend_bool(this.id, OS.sel_isSelectionOnly); +} + public NSString jobDisposition() { long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_jobDisposition); return result != 0 ? new NSString(result) : null; @@ -82,6 +86,10 @@ public void setPrinter(NSPrinter printer) { OS.objc_msgSend(this.id, OS.sel_setPrinter_, printer != null ? printer.id : 0); } +public void setSelectionOnly(boolean selectionOnly) { + OS.objc_msgSend(this.id, OS.sel_setSelectionOnly_, selectionOnly); +} + public void setUpPrintOperationDefaultValues() { OS.objc_msgSend(this.id, OS.sel_setUpPrintOperationDefaultValues); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java index b6a7b87293..a205c2a1a7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java @@ -1465,6 +1465,7 @@ public static final long /*int*/ sel_isPlanar = sel_registerName("isPlanar"); public static final long /*int*/ sel_isResting = sel_registerName("isResting"); public static final long /*int*/ sel_isRowSelected_ = sel_registerName("isRowSelected:"); public static final long /*int*/ sel_isRunning = sel_registerName("isRunning"); +public static final long /*int*/ sel_isSelectionOnly = sel_registerName("isSelectionOnly"); public static final long /*int*/ sel_isSeparatorItem = sel_registerName("isSeparatorItem"); public static final long /*int*/ sel_isSessionOnly = sel_registerName("isSessionOnly"); public static final long /*int*/ sel_isSheet = sel_registerName("isSheet"); @@ -2016,6 +2017,7 @@ public static final long /*int*/ sel_setSelectedItemIdentifier_ = sel_registerNa public static final long /*int*/ sel_setSelectedRange_ = sel_registerName("setSelectedRange:"); public static final long /*int*/ sel_setSelectedSegment_ = sel_registerName("setSelectedSegment:"); public static final long /*int*/ sel_setSelectedTextAttributes_ = sel_registerName("setSelectedTextAttributes:"); +public static final long /*int*/ sel_setSelectionOnly_ = sel_registerName("setSelectionOnly:"); public static final long /*int*/ sel_setServicesMenu_ = sel_registerName("setServicesMenu:"); public static final long /*int*/ sel_setShouldAntialias_ = sel_registerName("setShouldAntialias:"); public static final long /*int*/ sel_setShowsHelp_ = sel_registerName("setShowsHelp:"); @@ -3063,9 +3065,6 @@ public static final NSString NSPrintSavePath = new NSString(NSPrintSavePath()); public static final native long /*int*/ NSPrintScalingFactor(); public static final NSString NSPrintScalingFactor = new NSString(NSPrintScalingFactor()); /** @method flags=const */ -public static final native long /*int*/ NSPrintSelectionOnly(); -public static final NSString NSPrintSelectionOnly = new NSString(NSPrintSelectionOnly()); -/** @method flags=const */ public static final native long /*int*/ NSPrintSpoolJob(); public static final NSString NSPrintSpoolJob = new NSString(NSPrintSpoolJob()); /** @method flags=const */ |