Author: gcasa
Date: Sat May 31 17:00:47 2014
New Revision: 37931
URL: http://svn.gna.org/viewcvs/gnustep?rev=37931&view=rev
Log:
Fix bug #28644
Modified:
apps/gorm/trunk/ChangeLog
apps/gorm/trunk/GormCore/GormDocument.m
apps/gorm/trunk/GormCore/GormDocumentController.h
apps/gorm/trunk/GormCore/GormDocumentController.m
Modified: apps/gorm/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gorm/trunk/ChangeLog?rev=37931&r1=37930&r2=37931&view=diff
==============================================================================
--- apps/gorm/trunk/ChangeLog (original)
+++ apps/gorm/trunk/ChangeLog Sat May 31 17:00:47 2014
@@ -1,3 +1,12 @@
+2014-05-31 10:58-EDT Gregory John Casamento <[email protected]>
+
+ * GormCore/GormDocumentController.h: add declaration of
+ openDocumentForContentsOfURL:
+ * GormCore/GormDocumentController.m: add implementation of
+ openDocumentForContentsOfURL:
+ * GormCore/GormDocument.m: Add implementation of revertContentsOfURL:..
+ Fix bug#28644
+
2014-05-30 Sebastian Reitenbach <[email protected]>
* Palettes/2Controls/GormColorWellAttributesInspector.h
fix typo in header guard
@@ -12,6 +21,7 @@
* GormCore/GormInspectorsManager.m
Explicitely cast NSIntegers to avoid warning and problems.
+>>>>>>> .r37930
2014-05-27 03:26-EDT Gregory John Casamento <[email protected]>
* GormCore/GormInspectorsManager.m
Modified: apps/gorm/trunk/GormCore/GormDocument.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gorm/trunk/GormCore/GormDocument.m?rev=37931&r1=37930&r2=37931&view=diff
==============================================================================
--- apps/gorm/trunk/GormCore/GormDocument.m (original)
+++ apps/gorm/trunk/GormCore/GormDocument.m Sat May 31 17:00:47 2014
@@ -54,6 +54,7 @@
#include "GormWrapperBuilder.h"
#include "GormWrapperLoader.h"
#include "GormDocumentWindow.h"
+#include "GormDocumentController.h"
@interface GormDisplayCell : NSButtonCell
@end
@@ -3628,6 +3629,19 @@
[filePrefsManager setFileTypeName: type];
}
+- (BOOL) revertToContentsOfURL: (NSURL *)url
+ ofType: (NSString *)type
+ error: (NSError **)error
+{
+ GormDocumentController *dc = [NSDocumentController sharedDocumentController];
+
+ // [dc performSelector:@selector(openDocumentWithContentsOfURL:)
withObject:url afterDelay:2];
+ [self close];
+ [dc openDocumentWithContentsOfURL:url];
+
+ return YES;
+}
+
//// PRIVATE METHODS...
- (NSString *) classForObject: (id)obj
Modified: apps/gorm/trunk/GormCore/GormDocumentController.h
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gorm/trunk/GormCore/GormDocumentController.h?rev=37931&r1=37930&r2=37931&view=diff
==============================================================================
--- apps/gorm/trunk/GormCore/GormDocumentController.h (original)
+++ apps/gorm/trunk/GormCore/GormDocumentController.h Sat May 31 17:00:47 2014
@@ -44,6 +44,7 @@
}
- (void) buildDocumentForType: (GormDocumentType)documentType;
+- (id) openDocumentWithContentsOfURL:(NSURL *)url;
@end
Modified: apps/gorm/trunk/GormCore/GormDocumentController.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gorm/trunk/GormCore/GormDocumentController.m?rev=37931&r1=37930&r2=37931&view=diff
==============================================================================
--- apps/gorm/trunk/GormCore/GormDocumentController.m (original)
+++ apps/gorm/trunk/GormCore/GormDocumentController.m Sat May 31 17:00:47 2014
@@ -200,4 +200,9 @@
[super newDocument: sender];
[self buildDocumentForType: documentType];
}
+
+- (id) openDocumentWithContentsOfURL:(NSURL *)url
+{
+ return [self openDocumentWithContentsOfURL:url display:YES];
+}
@end
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs