Skip to content

Commit

Permalink
Alert box improvements.
Browse files Browse the repository at this point in the history
Fixes #9.
  • Loading branch information
waddlesplash committed Jul 9, 2014
1 parent 05f14da commit b8d19cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions bepdf/beos/PDFSearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

// Haiku
#include <Alert.h>

// xpdf
#include <TextOutputDev.h>

Expand All @@ -28,6 +31,7 @@
#include "PDFView.h"
#include "TextConversion.h"
#include "Thread.h"
#include "utils/StringLocalization.h"

///////////////////////////////////////////////////////////

Expand Down Expand Up @@ -195,6 +199,10 @@ FindThread::Run() {

// not found
notFound:
{
BAlert *alert = new BAlert("Error", TRANSLATE("Search string not found."), TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT);
alert->Go();
}
goto done;

// found on a different page
Expand Down
4 changes: 2 additions & 2 deletions bepdf/beos/PDFWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2133,9 +2133,9 @@ class SaveFileThread : public SaveThread {
mMainView->GetPageRenderer()->GetAnnotsList(),
mMainView->GetAcroForm());
if (writer.WriteTo(mPath.String())) {
alert = new BAlert(TRANSLATE("Information"), TRANSLATE("PDF file successfully written!"), TRANSLATE("OK"));
alert = new BAlert("Information", TRANSLATE("PDF file successfully written!"), TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT);
} else {
alert = new BAlert(TRANSLATE("Error"), TRANSLATE("Could not write PDF file!"), TRANSLATE("OK"));
alert = new BAlert("Error", TRANSLATE("Could not write PDF file!"), TRANSLATE("OK"), 0, 0, B_WIDTH_AS_USUAL, B_STOP_ALERT);
}

alert->Go();
Expand Down

0 comments on commit b8d19cd

Please sign in to comment.