mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
MacPDF: Unbreak Go to Next/Previous Page after #22768
This commit is contained in:
parent
eb305c6974
commit
a4b5b9e82a
Notes:
sideshowbarker
2024-07-17 10:31:19 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/a4b5b9e82a Pull-request: https://github.com/SerenityOS/serenity/pull/22791
1 changed files with 4 additions and 0 deletions
|
@ -161,6 +161,10 @@ static NSBitmapImageRep* ns_from_gfx(NonnullRefPtr<Gfx::Bitmap> bitmap_p)
|
|||
|
||||
- (BOOL)validateMenuItem:(NSMenuItem*)item
|
||||
{
|
||||
if ([item action] == @selector(goToNextPage:))
|
||||
return _doc ? (_page_index < (int)_doc->get_page_count() - 1) : NO;
|
||||
if ([item action] == @selector(goToPreviousPage:))
|
||||
return _doc ? (_page_index > 0) : NO;
|
||||
if ([item action] == @selector(toggleShowClippingPaths:)) {
|
||||
[item setState:_preferences.show_clipping_paths ? NSControlStateValueOn : NSControlStateValueOff];
|
||||
return _doc ? YES : NO;
|
||||
|
|
Loading…
Add table
Reference in a new issue