summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/gutenbrowser.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/gutenbrowser.cpp33
1 files changed, 20 insertions, 13 deletions
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
index be920dd..d0af114 100644
--- a/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
+++ b/noncore/apps/opie-gutenbrowser/gutenbrowser.cpp
@@ -163,3 +163,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags )
qDebug("Suppose we open somethin");
- load(qApp->argv()[i]);
+ if(!load(qApp->argv()[i])) return;
}
@@ -172,2 +172,3 @@ Gutenbrowser::Gutenbrowser(QWidget *,const char*, WFlags )
writeConfig();
+ QTimer::singleShot( 250, this, SLOT(hideView()) );
} //end init
@@ -412,3 +413,3 @@ void Gutenbrowser::ForwardBtn() {
Lview->insertLine( s, -1);
- odebug << s << oendl;
+// odebug << s << oendl;
currentLine++;
@@ -581,3 +582,3 @@ void Gutenbrowser::BeginBtn() {
pageStopArray[i_pageNum ] = currentFilePos;
- odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl;
+// odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl;
}
@@ -652,2 +653,3 @@ void Gutenbrowser::setBookmark() {
cfg.writeEntry( "Page Number", QString::number( i_pageNum) );
+ cfg.write();
bookmarksMenu->insertItem( title);
@@ -693,3 +695,3 @@ void Gutenbrowser::Bookmark( int itemId) {
- load(file_name);
+ if(!load(file_name)) return;
@@ -710,3 +712,3 @@ void Gutenbrowser::Bookmark( int itemId) {
pageStopArray[i_pageNum ] = currentFilePos;
- odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl;
+// odebug << "new page number " << i_pageNum << ", found at " << currentFilePos << "" << oendl;
}
@@ -749,5 +751,7 @@ bool Gutenbrowser::load( const char *fileName) {
odebug << "sizeHint " << sizeHint().height() << " pageSize " << Lview->PageSize() << "" << oendl;
+// pointSize = Lview->fontInfo().pointSize();
+// odebug << "sizeHint " << sizeHint().height() << " point size " << pointSize << "" << oendl;
if( Lview->PageSize() < 4) {
- Lview->setMaximumHeight( sizeHint().height() );
+ // Lview->setMaximumHeight( sizeHint().height() );
Lview->setMinimumHeight( sizeHint().height() );
@@ -755,3 +759,3 @@ bool Gutenbrowser::load( const char *fileName) {
odebug << "sizeHint " << sizeHint().height() << " point size " << pointSize << "" << oendl;
- if(pointSize < 10)
+ if(pointSize < 15)
Lview->setFixedVisibleLines(19);
@@ -764,2 +768,3 @@ bool Gutenbrowser::load( const char *fileName) {
cfg.writeEntry("Current",fileName);
+ cfg.write();
currentLine=0;
@@ -809,3 +814,3 @@ bool Gutenbrowser::load( const char *fileName) {
Lview->setMaxLines(Lview->PageSize()*2);
- odebug << "Gulped " << currentLine << "" << oendl;
+// odebug << "Gulped " << currentLine << "" << oendl;
setCaption(title);
@@ -1038,3 +1043,3 @@ void Gutenbrowser::LibraryBtn() {
// QCopEnvelope ( "QPE/System", "busy()" );
- load( file_name);
+ if( !load( file_name)) return;
} else {
@@ -1082,3 +1087,3 @@ void Gutenbrowser::OpenBtn() {
// QCopEnvelope ( "QPE/System", "busy()" );
- load(file_name);
+ if(!load(file_name)) return;
} else {
@@ -1780,3 +1785,3 @@ void Gutenbrowser::listClickedSlot( QListBoxItem * index) {
if( Lview->isVisible())
- load(file);
+ if(!load(file)) return;
@@ -1808,3 +1813,4 @@ void Gutenbrowser::infoGutenbrowser() {
void Gutenbrowser::setDocument(const QString & frozenBoogers) {
- this->hide();
+// this->hide();
+ qWarning("\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXSET DOCUMENT\n");
if(showMainList) {
@@ -1819,5 +1825,6 @@ void Gutenbrowser::setDocument(const QString & frozenBoogers) {
lnk = DocLnk(frozenBoogers);
+ qWarning("open "+frozenBoogers);
// odebug << lnk.file() << oendl;
title=lnk.comment();
- load( lnk.file());
+ if(!load( lnk.file())) return;
this->show();