Commit graph

78 commits

Author SHA1 Message Date
fredkiefer
2f9c16ad81 * Source/NSDocument.m (-revertToContentsOfURL:ofType:error:): Add
override calls for deprecated methods.
2018-03-30 17:01:12 +02:00
Ivan Vučica
d3861e224c Better support for setting errors inside -dataOfType:error: and -readFromData:ofType:error:.
Previously, under GNUstep, NSLocalizedFailureReasonKey was ignored when
presented with +[NSAlert alertWithError]. Additionally, error set in
-readFromData:ofType:error: was overwritten by two different methods in the
file reading chain.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38483 72102866-910b-0410-8b05-ffd578937521
2015-05-10 19:10:56 +00:00
Fred Kiefer
72f44c1ded * Source/NSDocument.m: Add some NSError return values.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37619 72102866-910b-0410-8b05-ffd578937521
2014-01-19 21:30:23 +00:00
Wolfgang Lux
7e5f0c199c Set save panel accessory view before calling -prepareSavePanel: to
allow clients to modify the accessory view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35791 72102866-910b-0410-8b05-ffd578937521
2012-11-12 08:14:03 +00:00
Fred Kiefer
86ff6abf69 Replace direct use of the isa pointer with a call to object_getClass()
to make David happy.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33545 72102866-910b-0410-8b05-ffd578937521
2011-07-14 07:17:24 +00:00
Wolfgang Lux
694843b3e1 When NSDocument presents a save panel, make sure the file name has a
valid extension for the document's type.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31793 72102866-910b-0410-8b05-ffd578937521
2010-12-29 11:47:16 +00:00
Wolfgang Lux
9d5e012476 Make print info changes of a document undoable as in Cocoa.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31671 72102866-910b-0410-8b05-ffd578937521
2010-11-27 11:21:31 +00:00
Eric Wasylishen
26fcda321b Replace sel_eq with sel_isEqual
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31285 72102866-910b-0410-8b05-ffd578937521
2010-09-09 23:50:38 +00:00
Wolfgang Lux
20abd629f9 Update the document controller's recent document list when NSDocument
saves a document. This means that the user will	find her fresh
documents in that list the next time.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31184 72102866-910b-0410-8b05-ffd578937521
2010-08-19 16:47:27 +00:00
Wolfgang Lux
b9b154d6bf Fix result type of an NSDocument method, which was incompatible with Cocoa.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31163 72102866-910b-0410-8b05-ffd578937521
2010-08-16 07:25:45 +00:00
Wolfgang Lux
fc76fad1a0 Add support for document types with a wild card extension to
NSDocumentController and NSDocument.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30512 72102866-910b-0410-8b05-ffd578937521
2010-05-31 21:40:13 +00:00
Fred Kiefer
6483053f29 Yet another bit of #include -> #import replacement. Replace includes of Foundation.h.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30034 72102866-910b-0410-8b05-ffd578937521
2010-03-25 09:11:50 +00:00
Fred Kiefer
ef7e4a291b Workaround for Bean NIB loading issue.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30016 72102866-910b-0410-8b05-ffd578937521
2010-03-21 23:27:47 +00:00
Wolfgang Lux
ba58449d3c Fix a whole bunch of potential crashers in NSAttributedString.m and
NSDocument.m where the error return parameter was written to without a
null pointer check.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29580 72102866-910b-0410-8b05-ffd578937521
2010-02-12 14:18:59 +00:00
Wolfgang Lux
b89db86a92 Ensure proper working of autosaving for NSDocument subclasses that
override -writeWithBackupToFile:ofType:saveOperation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29267 72102866-910b-0410-8b05-ffd578937521
2010-01-11 21:26:12 +00:00
Germán Arias
a3ea6e9598 Add missing internationalization and more localizable strings in spanish
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29193 72102866-910b-0410-8b05-ffd578937521
2010-01-03 04:41:36 +00:00
Wolfgang Lux
c7fee635d0 Implement code for exportable, i.e., write-only, document types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28962 72102866-910b-0410-8b05-ffd578937521
2009-11-05 23:14:15 +00:00
Richard Frith-MacDonald
452ffee567 Small theme update, plus documentation fixes and tweaks to avoid warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28538 72102866-910b-0410-8b05-ffd578937521
2009-08-25 07:46:37 +00:00
Fred Kiefer
1871f18f54 * Source/NSDocument.m (-setFileName:): Set the file name to the
absolute file path.
  Patch by Jonathan Gillaspie <jonathan.gillaspie@testplant.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28418 72102866-910b-0410-8b05-ffd578937521
2009-07-28 21:01:53 +00:00
Fred Kiefer
053c28aa92 Check whether there is a returned save panel, this wont be the case
when the user cancels the save operation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28321 72102866-910b-0410-8b05-ffd578937521
2009-06-02 21:40:07 +00:00
Riccardo Mottola
148ad4ca47 Correct override test in NSDocument method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27677 72102866-910b-0410-8b05-ffd578937521
2009-01-25 10:02:22 +00:00
Riccardo Mottola
1c25d7e977 Convert between window and view coordinate system for NSMenuView.
Correct small bugs in last NSDocument rework.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27661 72102866-910b-0410-8b05-ffd578937521
2009-01-23 22:01:40 +00:00
Wolfgang Lux
12ffaa698c Change NSDocument's -windowForSheet implementation to match the actual
OS X implementation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27620 72102866-910b-0410-8b05-ffd578937521
2009-01-17 16:08:30 +00:00
Fred Kiefer
aba6776a65 Complete the implementation of NSDocument.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27436 72102866-910b-0410-8b05-ffd578937521
2008-12-26 20:32:23 +00:00
Wolfgang Lux
606df8c1b1 Ensure that new windows properly show their document edited status.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27292 72102866-910b-0410-8b05-ffd578937521
2008-12-14 19:15:18 +00:00
Wolfgang Lux
91f3b7674b Implement NSDocument autosaving.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27288 72102866-910b-0410-8b05-ffd578937521
2008-12-14 16:39:15 +00:00
Wolfgang Lux
02bce68800 Implement support for document types with multiple allowed file
extensions in NSSavePanel.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27228 72102866-910b-0410-8b05-ffd578937521
2008-12-06 17:06:05 +00:00
Wolfgang Lux
c476e3fa6d Fix bug where a NSDocument would appear unmodified after saving the
document, undoing a number of changes, and then making an equal number
of changes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27219 72102866-910b-0410-8b05-ffd578937521
2008-12-06 13:24:00 +00:00
Wolfgang Lux
fe56e4959d Implement undo: and redo: responder actions in NSWindow as on Mac OS X.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27218 72102866-910b-0410-8b05-ffd578937521
2008-12-06 10:58:38 +00:00
Wolfgang Lux
db8e30700b Fix problems where the string value of a text field control might not
be updated while its cell is edited and where the save panel's text
form ignores the file name passed to -runModalForDirectory:file:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27059 72102866-910b-0410-8b05-ffd578937521
2008-11-14 23:12:33 +00:00
Gregory John Casamento
dc2030262a * Source/NSDocument.m: Correction for bug#24758, add name and
type information to the object before reading the file so that
	it is available during the readFile:ofType: method call.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27017 72102866-910b-0410-8b05-ffd578937521
2008-11-08 15:17:49 +00:00
Adam Fedor
7afdd32ac1 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26619 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:01:49 +00:00
Fred Kiefer
5ddb7aac7c Two small patches by Wolfgang Lux <wolfgang.lux@gmail.com>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25549 72102866-910b-0410-8b05-ffd578937521
2007-11-01 10:15:35 +00:00
Fred Kiefer
193e31e678 Change all files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25536 72102866-910b-0410-8b05-ffd578937521
2007-10-29 21:16:17 +00:00
Fred Kiefer
8ecf8c2aed Patches by Wolfgang Lux <wolfgang.lux@gmail.com>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25526 72102866-910b-0410-8b05-ffd578937521
2007-10-11 20:55:21 +00:00
Fred Kiefer
621cb80663 Small fixes of previous changes.
Patch by Wolfgang Lux <wolfgang.lux@gmail.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25509 72102866-910b-0410-8b05-ffd578937521
2007-10-01 19:25:05 +00:00
Fred Kiefer
86264a8284 Diverse gui patches by Wolfgang Lux <wolfgang.lux@gmail.com>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25451 72102866-910b-0410-8b05-ffd578937521
2007-09-04 23:29:05 +00:00
Riccardo Mottola
ecaea6d777 removed some C99-isms
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25137 72102866-910b-0410-8b05-ffd578937521
2007-05-10 20:25:15 +00:00
Fred Kiefer
f8969f62c9 Add remaining file type change by Wolfgang Lux.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24808 72102866-910b-0410-8b05-ffd578937521
2007-03-07 23:31:07 +00:00
Fred Kiefer
a0c83e671f Document print patch by Wolfgang Lux.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24800 72102866-910b-0410-8b05-ffd578937521
2007-03-07 14:38:51 +00:00
Gregory John Casamento
9194d2c50f 2007-03-03 14:51-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSDocument.m: Added change suggested by Wolfgang Lux.  This
        corrects a potential mismatch between the document type and the type
        specified in the panel.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24758 72102866-910b-0410-8b05-ffd578937521
2007-03-03 19:53:23 +00:00
Fred Kiefer
21542d5c9c Workaround for bug #19031.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24644 72102866-910b-0410-8b05-ffd578937521
2007-02-18 19:49:47 +00:00
Richard Frith-MacDonald
30fd0153be fix include path
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24383 72102866-910b-0410-8b05-ffd578937521
2007-01-19 08:37:42 +00:00
Fred Kiefer
34b0abf4d0 Added MacOS 10.4 methods for NSDocument, NSDocumentController,
NSPrintOperation, NSResponder and NSCell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24378 72102866-910b-0410-8b05-ffd578937521
2007-01-17 12:09:41 +00:00
Richard Frith-MacDonald
57435da7d5 tidyups and minor theme tiling updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23871 72102866-910b-0410-8b05-ffd578937521
2006-10-15 08:34:47 +00:00
Matt Rice
8bf4c36cc2 * Source/NSDocument.m (-initWithContentsOfFile:ofType:): Set the
file name and type before attempting to read the document.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23546 72102866-910b-0410-8b05-ffd578937521
2006-09-17 15:15:42 +00:00
Gregory John Casamento
b4ed61fce1 2006-06-20 20:58 Gregory John Casamento <greg_casamento@yahoo.com>
* Headers/Additions/GNUstepGUI/GSNibCompatibility.h: Added
	declarations for classes and names methods and change return
	type for objects method.
	* Source/GSNibCompatibility.m: Properly return the pointer in
	objects method and also add methods for names, and classes
	maps in the nib file.
	* Source/NSDocument.m: Refuse to write a file for a type which isn't
	native.  If the class method isNativeType: returns YES, then write the
	file in writeToFile:ofType:saveOperation:.
	* Source/NSSliderCell.m: Make the cell non-bordered in initWithCoder:



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23095 72102866-910b-0410-8b05-ffd578937521
2006-06-21 01:02:25 +00:00
Gregory John Casamento
464ee79c8d Nib improvments and a document bugfix.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23059 72102866-910b-0410-8b05-ffd578937521
2006-06-15 04:53:09 +00:00
Gregory John Casamento
45d21c3397 Changes to allow proper document type selection in the save panel for document oriented applications.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23013 72102866-910b-0410-8b05-ffd578937521
2006-06-02 00:31:14 +00:00
Gregory John Casamento
aa206849b2 Implemented accessory view.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23006 72102866-910b-0410-8b05-ffd578937521
2006-05-30 04:54:12 +00:00