From d2bda064da2eac9f748565777b03be0f99efb044 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 24 Sep 2023 22:03:36 -0400 Subject: [PATCH] MacPDF: Pre-populate "Go to Page..." dialog with current page --- Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm index d36f91064c..b4ae0ba9bd 100644 --- a/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm +++ b/Meta/Lagom/Contrib/MacPDF/LagomPDFDocument.mm @@ -152,11 +152,11 @@ [alert addButtonWithTitle:@"Go"]; [alert addButtonWithTitle:@"Cancel"]; - // FIXME: Pre-populate with current page. auto textField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 24)]; NSNumberFormatter* formatter = [[NSNumberFormatter alloc] init]; formatter.numberStyle = NSNumberFormatterNoStyle; // Integers only. [textField setFormatter:formatter]; + [textField setIntValue:[_pdfView page]]; alert.accessoryView = textField; alert.window.initialFirstResponder = textField;