Author: gcasa
Date: Sun Feb  1 21:46:37 2015
New Revision: 38318

URL: http://svn.gna.org/viewcvs/gnustep?rev=38318&view=rev
Log:
Add print panels to theme.

Added:
    libs/gui/trunk/Source/GSThemePrintPanels.m
Modified:
    libs/gui/trunk/ChangeLog
    libs/gui/trunk/Headers/Additions/GNUstepGUI/GSTheme.h
    libs/gui/trunk/Printing/GSWIN32/GSWIN32PrincipalClass.m
    libs/gui/trunk/Source/GNUmakefile
    libs/gui/trunk/Source/GSPrinting.m

Modified: libs/gui/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=38318&r1=38317&r2=38318&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog    (original)
+++ libs/gui/trunk/ChangeLog    Sun Feb  1 21:46:37 2015
@@ -1,4 +1,15 @@
-2015-01-31  Fred Kiefer <[email protected]>
+2015-02-01 Gregory Casamento <[email protected]>
+
+       * 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 <[email protected]>
 
        * Source/GSTextStorage.m
        * Source/NSSpellChecker.m

Modified: libs/gui/trunk/Headers/Additions/GNUstepGUI/GSTheme.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Headers/Additions/GNUstepGUI/GSTheme.h?rev=38318&r1=38317&r2=38318&view=diff
==============================================================================
--- libs/gui/trunk/Headers/Additions/GNUstepGUI/GSTheme.h       (original)
+++ libs/gui/trunk/Headers/Additions/GNUstepGUI/GSTheme.h       Sun Feb  1 
21:46:37 2015
@@ -1434,5 +1434,19 @@
 - (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 */

Modified: libs/gui/trunk/Printing/GSWIN32/GSWIN32PrincipalClass.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Printing/GSWIN32/GSWIN32PrincipalClass.m?rev=38318&r1=38317&r2=38318&view=diff
==============================================================================
--- libs/gui/trunk/Printing/GSWIN32/GSWIN32PrincipalClass.m     (original)
+++ libs/gui/trunk/Printing/GSWIN32/GSWIN32PrincipalClass.m     Sun Feb  1 
21:46:37 2015
@@ -55,18 +55,15 @@
   return [GSWIN32PrintOperation class];
 }
 
-
 +(Class) printPanelClass
 {
   return [GSWIN32PrintPanel class];
 }
 
-
 +(Class) printerClass
 {
   return [GSWIN32Printer class];
 }
-
 
 +(Class) gsPrintOperationClass
 {

Modified: libs/gui/trunk/Source/GNUmakefile
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/GNUmakefile?rev=38318&r1=38317&r2=38318&view=diff
==============================================================================
--- libs/gui/trunk/Source/GNUmakefile   (original)
+++ libs/gui/trunk/Source/GNUmakefile   Sun Feb  1 21:46:37 2015
@@ -232,6 +232,7 @@
 GSThemeMenu.m \
 GSThemeOpenSavePanels.m \
 GSThemePanel.m \
+GSThemePrintPanels.m \
 GSThemeTools.m \
 GSTitleView.m \
 GSToolTips.m \

Modified: libs/gui/trunk/Source/GSPrinting.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/GSPrinting.m?rev=38318&r1=38317&r2=38318&view=diff
==============================================================================
--- libs/gui/trunk/Source/GSPrinting.m  (original)
+++ libs/gui/trunk/Source/GSPrinting.m  Sun Feb  1 21:46:37 2015
@@ -35,6 +35,7 @@
 #import <Foundation/NSUserDefaults.h>
 #import "AppKit/NSPanel.h"
 #import "GNUstepGUI/GSPrinting.h"
+#import "GNUstepGUI/GSTheme.h"
 
 static NSBundle *printingBundle = nil;
 
@@ -227,34 +228,32 @@
 
 +(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;
 }
 
 

Added: libs/gui/trunk/Source/GSThemePrintPanels.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/GSThemePrintPanels.m?rev=38318&view=auto
==============================================================================
--- libs/gui/trunk/Source/GSThemePrintPanels.m  (added)
+++ libs/gui/trunk/Source/GSThemePrintPanels.m  Sun Feb  1 21:46:37 2015
@@ -0,0 +1,52 @@
+/** <title>GSThemeOpenSavePanels</title>
+
+   <abstract>Methods for themes using open and save panels.</abstract>
+
+   Copyright (C) 2015 Free Software Foundation, Inc.
+
+   Author: Gregory Casamento <[email protected]>
+   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 <http://www.gnu.org/licenses/> 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


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to