diff --git a/ChangeLog b/ChangeLog index 6d5bd5836..57cd7a886 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,15 @@ -2015-01-31 Fred Kiefer +2015-02-01 Gregory Casamento + + * Source/GSPrinting.m: Add call to GSTheme code to get the + class for the layout and print panels. Printing bundle can + still overide if needed. + * Source/GSThemePrintPanels.m: Add implementation of category + for handling print / layout panels. + * Headers/Additions/GNUstepGUI/GSTheme.h: Add category + for print/layout panels. + * Printing/GSWIN32/GSWIN32PrincipalClass.m: Minor cleanup. + +2015-01-31 Fred Kiefer * Source/GSTextStorage.m * Source/NSSpellChecker.m diff --git a/Headers/Additions/GNUstepGUI/GSTheme.h b/Headers/Additions/GNUstepGUI/GSTheme.h index aa707d0a4..a84573de1 100644 --- a/Headers/Additions/GNUstepGUI/GSTheme.h +++ b/Headers/Additions/GNUstepGUI/GSTheme.h @@ -1434,5 +1434,19 @@ withRepeatedImage: (NSImage*)image - (Class) savePanelClass; @end +@interface GSTheme (PrintPanels) +/** + * This method returns the print panel class needed by the + * native environment. + */ +- (Class) printPanelClass; + +/** + * This method returns the page layout class needed by the + * native environment. + */ +- (Class) pageLayoutClass; +@end + #endif /* OS_API_VERSION */ #endif /* _GNUstep_H_GSTheme */ diff --git a/Printing/GSWIN32/GSWIN32PrincipalClass.m b/Printing/GSWIN32/GSWIN32PrincipalClass.m index 75b6c09ff..9233f5d88 100644 --- a/Printing/GSWIN32/GSWIN32PrincipalClass.m +++ b/Printing/GSWIN32/GSWIN32PrincipalClass.m @@ -55,19 +55,16 @@ return [GSWIN32PrintOperation class]; } - +(Class) printPanelClass { return [GSWIN32PrintPanel class]; } - +(Class) printerClass { return [GSWIN32Printer class]; } - +(Class) gsPrintOperationClass { return [GSWIN32PrintOperation class]; diff --git a/Source/GNUmakefile b/Source/GNUmakefile index e9cfd39a8..6c96de073 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -232,6 +232,7 @@ GSThemeInspector.m \ GSThemeMenu.m \ GSThemeOpenSavePanels.m \ GSThemePanel.m \ +GSThemePrintPanels.m \ GSThemeTools.m \ GSTitleView.m \ GSToolTips.m \ diff --git a/Source/GSPrinting.m b/Source/GSPrinting.m index a4a09ea21..1fe8bfb9a 100644 --- a/Source/GSPrinting.m +++ b/Source/GSPrinting.m @@ -35,6 +35,7 @@ #import #import "AppKit/NSPanel.h" #import "GNUstepGUI/GSPrinting.h" +#import "GNUstepGUI/GSTheme.h" static NSBundle *printingBundle = nil; @@ -227,34 +228,32 @@ static NSBundle *printingBundle = nil; +(Class) pageLayoutClass { - return Nil; + return [[GSTheme theme] pageLayoutClass]; } +(Class) printInfoClass { - return Nil; + return Nil; } - +(Class) printOperationClass { - return Nil; + return Nil; } +(Class) printPanelClass { - return Nil; + return [[GSTheme theme] printPanelClass]; } - +(Class) printerClass { - return Nil; + return Nil; } +(Class) gsPrintOperationClass { - return Nil; + return Nil; } diff --git a/Source/GSThemePrintPanels.m b/Source/GSThemePrintPanels.m new file mode 100644 index 000000000..bd112ceda --- /dev/null +++ b/Source/GSThemePrintPanels.m @@ -0,0 +1,52 @@ +/** GSThemeOpenSavePanels + + Methods for themes using open and save panels. + + Copyright (C) 2015 Free Software Foundation, Inc. + + Author: Gregory Casamento + Date: 2015 + + This file is part of the GNU Objective C User interface library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#import "AppKit/NSPrintPanel.h" +#import "AppKit/NSPageLayout.h" +#import "GNUstepGUI/GSTheme.h" + +@implementation GSTheme (PrintPanels) +/** + * This method returns the print panel class needed by the + * native environment. + */ +- (Class) printPanelClass +{ + return [NSPrintPanel class]; +} + +/** + * This method returns the page layout class needed by the + * native environment. + */ +- (Class) pageLayoutClass +{ + return [NSPageLayout class]; +} + +@end