From e28b346d704126fce6d5fec6beb7464d0ef092fa Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Thu, 27 Jun 2013 23:24:23 +0200 Subject: [PATCH] =?UTF-8?q?Bind=20Page=20Setup=E2=80=A6=20to=20our=20appli?= =?UTF-8?q?cation=20controller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For unknown reasons, the NSApplication object will not respond to this method, even though it should implement it. --- .../resources/English.lproj/MainMenu.xib | 25 ++++++++++++------- Applications/TextMate/src/AppController.h | 2 ++ Applications/TextMate/src/AppController.mm | 5 ++++ 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Applications/TextMate/resources/English.lproj/MainMenu.xib b/Applications/TextMate/resources/English.lproj/MainMenu.xib index 32e9e346..27b4c2c3 100644 --- a/Applications/TextMate/resources/English.lproj/MainMenu.xib +++ b/Applications/TextMate/resources/English.lproj/MainMenu.xib @@ -2568,14 +2568,6 @@ 39 - - - runPageLayout: - - - - 87 - showHelp: @@ -3824,6 +3816,14 @@ 792 + + + runPageLayout: + + + + 850 + initialFirstResponder @@ -6262,7 +6262,7 @@ - 846 + 850 @@ -6279,6 +6279,7 @@ orderFrontFindPanel: orderFrontGoToLinePanel: performGoToLine: + runPageLayout: showBundleEditor: showBundleItemChooser: showPreferences: @@ -6293,6 +6294,7 @@ id id id + id @@ -6304,6 +6306,7 @@ orderFrontFindPanel: orderFrontGoToLinePanel: performGoToLine: + runPageLayout: showBundleEditor: showBundleItemChooser: showPreferences: @@ -6330,6 +6333,10 @@ performGoToLine: id + + runPageLayout: + id + showBundleEditor: id diff --git a/Applications/TextMate/src/AppController.h b/Applications/TextMate/src/AppController.h index c2414483..7993696c 100644 --- a/Applications/TextMate/src/AppController.h +++ b/Applications/TextMate/src/AppController.h @@ -39,6 +39,8 @@ namespace find_tags - (IBAction)newDocumentAndActivate:(id)sender; - (IBAction)openDocumentAndActivate:(id)sender; + +- (IBAction)runPageLayout:(id)sender; @end @interface AppController (Documents) diff --git a/Applications/TextMate/src/AppController.mm b/Applications/TextMate/src/AppController.mm index 5086d771..a2a24698 100644 --- a/Applications/TextMate/src/AppController.mm +++ b/Applications/TextMate/src/AppController.mm @@ -496,6 +496,11 @@ BOOL HasDocumentWindow (NSArray* windows) // = Printing = // ============ +- (IBAction)runPageLayout:(id)sender +{ + [[NSPageLayout pageLayout] runModal]; +} + - (void)printDocument:(id)sender { NSView* webView = [NSApp targetForAction:@selector(print:)];