Allow override of the print panels from the theme or from the printing bundle.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38322 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2015-02-02 23:39:08 +00:00
parent d628aac2e3
commit 643cac4468
3 changed files with 21 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2015-02-02 18:37-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSPageLayout.m
* Source/NSPrintPanel.m: Restore allocWithZone: to previous
implementation to allow overriding of the panels from
either the print bundle or the theme.
2015-02-02 11:59-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSThemePrintPanels.m: Add default subclass implementation

View file

@ -235,8 +235,13 @@ enum {
+ (id) allocWithZone: (NSZone*) zone
{
Class cls = [[GSTheme theme] pageLayoutClass];
return [cls allocWithZone: zone];
Class principalClass;
principalClass = [[GSPrinting printingBundle] principalClass];
if (principalClass == nil)
return nil;
return [[principalClass pageLayoutClass] allocWithZone: zone];
}
/** Creates ( if needed ) and returns a shared instance of the

View file

@ -90,8 +90,13 @@ static NSPrintPanel *shared_instance = nil;
+ (id) allocWithZone: (NSZone*) zone
{
Class cls = [[GSTheme theme] printPanelClass];
return [cls allocWithZone: zone];
Class principalClass;
principalClass = [[GSPrinting printingBundle] principalClass];
if (principalClass == nil)
return nil;
return [[principalClass printPanelClass] allocWithZone: zone];
}
/** Creates ( if needed) and returns a shared instance of the