Hi all,

I didn't find a way to add a working 'Open recent' menu to a Renaissance
application so here is a trivial working patch. It is specific to
GNUstep as I don't know how that would work on OS X.

Comments ?

Thanks,
Philippe

Index: renaissance/Source/TagLibrary/GSMarkupTagMenu.m
===================================================================
--- renaissance/Source/TagLibrary/GSMarkupTagMenu.m     (révision 35089)
+++ renaissance/Source/TagLibrary/GSMarkupTagMenu.m     (copie de travail)
@@ -52,6 +52,12 @@
 @end
 #endif

+#ifdef GNUSTEP
+@interface NSDocumentController (RecentMenu)
+- (void) _setRecentDocumentsMenu: (NSMenu *)menu;
+@end
+#endif
+
 @implementation GSMarkupTagMenu
 + (NSString *) tagName
 {
@@ -159,6 +165,13 @@
          {
            [NSApp setServicesMenu: platformObject];
          }
+       else if ([type isEqualToString: @"recent"])
+         {
+#ifdef GNUSTEP
+           [[NSDocumentController sharedDocumentController]
+                  _setRecentDocumentsMenu: platformObject];
+#endif
+         }
        else if ([type isEqualToString: @"font"])
          {
            /* The menu has already been created as font menu.  */

_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to