mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
MacPDF: Pre-populate "Go to Page..." dialog with current page
This commit is contained in:
parent
e67d8cfb2a
commit
d2bda064da
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue