summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/CExpander.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/CExpander.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/CExpander.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/CExpander.cpp b/noncore/apps/opie-reader/CExpander.cpp
index e398d86..1158a7a 100644
--- a/noncore/apps/opie-reader/CExpander.cpp
+++ b/noncore/apps/opie-reader/CExpander.cpp
@@ -1,7 +1,10 @@
1#include "CExpander.h" 1#include "CExpander.h"
2#ifdef USEQPE
3#include <qpe/global.h>
4#endif
2 5
3size_t CExpander::getHome() { return m_homepos; } 6size_t CExpander::getHome() { return m_homepos; }
4 7
5CExpander::CExpander() : m_homepos(0), fname(NULL), m_scrWidth(240), m_currentstart(1), m_currentend(0) {}; 8CExpander::CExpander() : m_homepos(0), fname(NULL), m_scrWidth(240), m_currentstart(1), m_currentend(0) {};
6 9
7CExpander::~CExpander() { if (fname != NULL) delete [] fname; }; 10CExpander::~CExpander() { if (fname != NULL) delete [] fname; };
@@ -67,16 +70,21 @@ void CExpander::suspend(FILE*& fin)
67void CExpander::unsuspend(FILE*& fin) 70void CExpander::unsuspend(FILE*& fin)
68{ 71{
69 if (bSuspended) 72 if (bSuspended)
70 { 73 {
71 bSuspended = false; 74 bSuspended = false;
72 int delay = time(NULL) - sustime; 75 int delay = time(NULL) - sustime;
73 if (delay < 10) sleep(10-delay); 76 if (delay < 10)
77 {
78 Global::statusMessage("Stalling");
79 sleep(10-delay);
80 }
74 fin = fopen(fname, "rb"); 81 fin = fopen(fname, "rb");
75 for (int i = 0; fin == NULL && i < 5; i++) 82 for (int i = 0; fin == NULL && i < 5; i++)
76 { 83 {
84 Global::statusMessage("Stalling");
77 sleep(5); 85 sleep(5);
78 fin = fopen(fname, "rb"); 86 fin = fopen(fname, "rb");
79 } 87 }
80 if (fin == NULL) 88 if (fin == NULL)
81 { 89 {
82 QMessageBox::warning(NULL, PROGNAME, "Couldn't reopen file"); 90 QMessageBox::warning(NULL, PROGNAME, "Couldn't reopen file");