Author: gcasa
Date: Mon Feb 2 18:05:16 2015
New Revision: 38321
URL: http://svn.gna.org/viewcvs/gnustep?rev=38321&view=rev
Log:
Correct issue I introduced last night. Continue moving print panel/layout
panel implementation to theme instead of print bundle.
Modified:
libs/gui/trunk/ChangeLog
libs/gui/trunk/Source/GSThemePrintPanels.m
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=38321&r1=38320&r2=38321&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog (original)
+++ libs/gui/trunk/ChangeLog Mon Feb 2 18:05:16 2015
@@ -1,3 +1,12 @@
+2015-02-02 11:59-EST Gregory John Casamento <[email protected]>
+
+ * Source/GSThemePrintPanels.m: Add default subclass implementation
+ so that the panels can be instantiated.
+ * Source/NSPageLayout.m: Change the allocWithZone: method to
+ return the class indicated by the theme.
+ * Source/NSPrintPanel.m: Change the allocWithZone: method to
+ return the class indicated by the theme.
+
2015-02-01 Gregory Casamento <[email protected]>
* Source/GSPrinting.m: Add call to GSTheme code to get the
Modified: libs/gui/trunk/Source/GSThemePrintPanels.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/GSThemePrintPanels.m?rev=38321&r1=38320&r2=38321&view=diff
==============================================================================
--- libs/gui/trunk/Source/GSThemePrintPanels.m (original)
+++ libs/gui/trunk/Source/GSThemePrintPanels.m Mon Feb 2 18:05:16 2015
@@ -30,6 +30,31 @@
#import "AppKit/NSPageLayout.h"
#import "GNUstepGUI/GSTheme.h"
+@interface GSPrintPanel : NSPrintPanel
+@end
+
+@interface GSPageLayout : NSPageLayout
+@end
+
+@implementation GSPrintPanel
+
++ (id) allocWithZone: (NSZone*)zone
+{
+ return NSAllocateObject(self, 0, zone);
+}
+
+@end
+
+@implementation GSPageLayout
+
++ (id) allocWithZone: (NSZone*)zone
+{
+ return NSAllocateObject(self, 0, zone);
+}
+
+@end
+
+
@implementation GSTheme (PrintPanels)
/**
* This method returns the print panel class needed by the
@@ -37,7 +62,7 @@
*/
- (Class) printPanelClass
{
- return [NSPrintPanel class];
+ return [GSPrintPanel class];
}
/**
@@ -46,7 +71,7 @@
*/
- (Class) pageLayoutClass
{
- return [NSPageLayout class];
+ return [GSPageLayout class];
}
@end
Modified: libs/gui/trunk/Source/NSPageLayout.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSPageLayout.m?rev=38321&r1=38320&r2=38321&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSPageLayout.m (original)
+++ libs/gui/trunk/Source/NSPageLayout.m Mon Feb 2 18:05:16 2015
@@ -59,6 +59,7 @@
#import "AppKit/NSPrinter.h"
#import "GSGuiPrivate.h"
#import "GNUstepGUI/GSPrinting.h"
+#import "GNUstepGUI/GSTheme.h"
static NSPageLayout *shared_instance;
@@ -139,6 +140,7 @@
NSPrintInfo *_printInfo;
NSView *_accessoryView;
}
+
-(NSPageLayout*) panel;
//IBActions
@@ -229,20 +231,13 @@
// Class methods
//
/** Load the appropriate bundle for the PageLayout
- (eg: GSLPRPageLayout, GSCUPSPageLayout).
*/
+
+ (id) allocWithZone: (NSZone*) zone
{
- Class principalClass;
-
- principalClass = [[GSPrinting printingBundle] principalClass];
-
- if (principalClass == nil)
- return nil;
-
- return [[principalClass pageLayoutClass] allocWithZone: zone];
-}
-
+ Class cls = [[GSTheme theme] pageLayoutClass];
+ return [cls allocWithZone: zone];
+}
/** Creates ( if needed ) and returns a shared instance of the
NSPageLayout panel.
Modified: libs/gui/trunk/Source/NSPrintPanel.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSPrintPanel.m?rev=38321&r1=38320&r2=38321&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSPrintPanel.m (original)
+++ libs/gui/trunk/Source/NSPrintPanel.m Mon Feb 2 18:05:16 2015
@@ -49,6 +49,7 @@
#import "AppKit/NSView.h"
#import "GSGuiPrivate.h"
#import "GNUstepGUI/GSPrinting.h"
+#import "GNUstepGUI/GSTheme.h"
static NSPrintPanel *shared_instance = nil;
@@ -85,18 +86,12 @@
//
/** Load the appropriate bundle for the PrintPanel
and alloc the class from that in our place
- (eg: GSLPRPrintPanel, GSCUPSPrintPanel).
*/
+
+ (id) allocWithZone: (NSZone*) zone
{
- Class principalClass;
-
- principalClass = [[GSPrinting printingBundle] principalClass];
-
- if (principalClass == nil)
- return nil;
-
- return [[principalClass printPanelClass] allocWithZone: zone];
+ Class cls = [[GSTheme theme] printPanelClass];
+ return [cls 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