mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
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:
parent
d628aac2e3
commit
643cac4468
3 changed files with 21 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue