-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #116 and jumps to page if provided via argument. #117
Conversation
bepdf/beos/BepdfApplication.cpp
Outdated
status_t result = msg->FindInt32(PAGE_NUM_MSG, &pageNum); | ||
if (result != B_OK) { | ||
if (result != B_NAME_NOT_FOUND) { | ||
BAlert *error = new BAlert(B_TRANSLATE("Error"), B_TRANSLATE("BePDF: Error getting page number!"), B_TRANSLATE("Close"), NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alerts normally don't start with the app's name, here "BePDF:".
The starndard button label to acknowledge an alert is "OK".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried what suggested at #116.
Neither the system BePDF, nor the one compiled with this patch react on the message hey BePDF '_RRC' with "bepdf:page_num"=11
I tried while displaying a PDF with <11 pages and >11 pages.
I just aligned with existing BePDF, should I fix this, too? Would need a change to translations, as the "BePDF:" prefix is used in the message. |
I spent some quality time with hey and even compiled a debug build to find out what is going on, turns out that :
this worked fine here, even jumping to different pages in the already opened document, just like I wanted :*)
I also added sanity checking for the page number and limit it to the document boundaries |
OK, I may have misunderstood the Anyway, it does work fine, also when using the command line options. If the "BePDF:" prefix and "Close" is used in alerts throughout BePDF, we dont have to start changing it here... Let's merge! Thanks for the PR! |
first attempt, todo: