Author: gcasa
Date: Tue Feb 3 00:39:08 2015
New Revision: 38322
URL: http://svn.gna.org/viewcvs/gnustep?rev=38322&view=rev
Log:
Allow override of the print panels from the theme or from the printing bundle.
Modified:
libs/gui/trunk/ChangeLog
libs/gui/trunk/Source/NSPageLayout.m
libs/gui/trunk/Source/NSPrintPanel.m
Modified: libs/gui/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=38322&r1=38321&r2=38322&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog (original)
+++ libs/gui/trunk/ChangeLog Tue Feb 3 00:39:08 2015
@@ -1,3 +1,10 @@
+2015-02-02 18:37-EST Gregory John Casamento <[email protected]>
+
+ * 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 <[email protected]>
* Source/GSThemePrintPanels.m: Add default subclass implementation
Modified: libs/gui/trunk/Source/NSPageLayout.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSPageLayout.m?rev=38322&r1=38321&r2=38322&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSPageLayout.m (original)
+++ libs/gui/trunk/Source/NSPageLayout.m Tue Feb 3 00:39:08 2015
@@ -235,8 +235,13 @@
+ (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
Modified: libs/gui/trunk/Source/NSPrintPanel.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSPrintPanel.m?rev=38322&r1=38321&r2=38322&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSPrintPanel.m (original)
+++ libs/gui/trunk/Source/NSPrintPanel.m Tue Feb 3 00:39:08 2015
@@ -90,8 +90,13 @@
+ (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
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs