mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
GSLPR Updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20209 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0cddf71bd1
commit
d85cafebe1
6 changed files with 23 additions and 53 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-10-08 09:17 Chad Hardin <cehardin@mac.com>
|
||||
|
||||
* Printing/GSLPR/GSLPRPageLayout.m: Fixed a #define
|
||||
* Printing/GSLPR/GSLPRPrintInfo.m: Made it so the code calls
|
||||
NSPrinter's printerWithName rather than GSLPR's, because the former
|
||||
caches NSPrinter objects.
|
||||
* Printing/GSLPR/GSLPRPrinter.h: Moved a method out of a (Private)
|
||||
catagory and place it into the header file, directly into the class.
|
||||
* Printing/GSLPR/GSLPRPrinter.m: Simplified the class by taking out
|
||||
an unnecesary initializer.
|
||||
|
||||
2004-10-08 Chad Hardin <cehardin@mac.com>
|
||||
|
||||
* Printing/GSLPR/GSLPRPrintOperation: Removed useless #defines and
|
||||
|
|
|
@ -44,4 +44,4 @@
|
|||
|
||||
@end
|
||||
|
||||
#endif // _GNUstep_H_NSPageLayout
|
||||
#endif // _GNUstep_H_GSLPRPageLayout
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GSLPRPRINCIPALCLASS_H_
|
||||
#define _GSLPRPRINCIPALCLASS_H_
|
||||
#ifndef _GNUstep_H_GSLPRPrincipalClass
|
||||
#define _GNUstep_H_GSLPRPrincipalClass
|
||||
|
||||
#include <GNUstepGUI/GSPrinting.h>
|
||||
|
||||
|
@ -36,5 +36,5 @@
|
|||
|
||||
@end
|
||||
|
||||
#endif // _GSLPRPRINCIPALCLASS_H_
|
||||
#endif // _GNUstep_H_GSLPRPrincipalClass
|
||||
|
||||
|
|
|
@ -78,16 +78,16 @@
|
|||
|
||||
if( name == nil )
|
||||
{
|
||||
name = [[GSLPRPrinter printerNames] objectAtIndex: 0];
|
||||
name = [[NSPrinter printerNames] objectAtIndex: 0];
|
||||
}
|
||||
else
|
||||
{
|
||||
if( [GSLPRPrinter printerWithName: name] == nil )
|
||||
if( [NSPrinter printerWithName: name] == nil )
|
||||
{
|
||||
name = [[GSLPRPrinter printerNames] objectAtIndex: 0];
|
||||
}
|
||||
}
|
||||
return [GSLPRPrinter printerWithName: name];
|
||||
return [NSPrinter printerWithName: name];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
{
|
||||
}
|
||||
|
||||
+(NSDictionary*) printersDictionary;
|
||||
@end
|
||||
|
||||
#endif // _GNUstep_H_GSLPRPrinter
|
||||
|
|
|
@ -63,18 +63,6 @@
|
|||
|
||||
|
||||
|
||||
@interface GSLPRPrinter (Private)
|
||||
|
||||
+(NSDictionary*) printersDictionary;
|
||||
|
||||
-(id) initWithName: (NSString*) name
|
||||
withType: (NSString*) type
|
||||
withHost: (NSString*) host
|
||||
withNote: (NSString*) note
|
||||
withPPDPath: (NSString*) ppdPath;
|
||||
@end
|
||||
|
||||
|
||||
@implementation GSLPRPrinter
|
||||
|
||||
//
|
||||
|
@ -124,10 +112,11 @@
|
|||
initWithName: name
|
||||
withType: [printerEntry objectForKey: @"Type"]
|
||||
withHost: [printerEntry objectForKey: @"Host"]
|
||||
withNote: [printerEntry objectForKey: @"Note"]
|
||||
withPPDPath: [printerEntry objectForKey: @"PPDPath"]];
|
||||
withNote: [printerEntry objectForKey: @"Note"]];
|
||||
|
||||
[printer parsePPDAtPath: [printerEntry objectForKey: @"PPDPath"]];
|
||||
|
||||
return [printer autorelease];
|
||||
return AUTORELEASE(printer);
|
||||
}
|
||||
|
||||
|
||||
|
@ -151,13 +140,8 @@
|
|||
[super encodeWithCoder: coder];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@implementation GSLPRPrinter (Private)
|
||||
//
|
||||
// Load the printer setup from NSUserDefaults
|
||||
//
|
||||
|
@ -213,30 +197,4 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Initialisation method
|
||||
//
|
||||
// To keep loading of PPDs relatively fast, not much checking is done on it.
|
||||
-(id) initWithName: (NSString*) name
|
||||
withType: (NSString*) type
|
||||
withHost: (NSString*) host
|
||||
withNote: (NSString*) note
|
||||
withPPDPath: (NSString*) ppdPath
|
||||
{
|
||||
NSDebugMLLog(@"GSPrinting", @"");
|
||||
|
||||
self = [super initWithName: name
|
||||
withType: type
|
||||
withHost: host
|
||||
withNote: note];
|
||||
|
||||
[self parsePPDAtPath: ppdPath];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue