-rw-r--r-- | noncore/apps/opie-reader/Bkmks.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/BuffDoc.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.cpp | 46 |
3 files changed, 25 insertions, 25 deletions
diff --git a/noncore/apps/opie-reader/Bkmks.cpp b/noncore/apps/opie-reader/Bkmks.cpp index 92ed69f..0cb9ea9 100644 --- a/noncore/apps/opie-reader/Bkmks.cpp +++ b/noncore/apps/opie-reader/Bkmks.cpp @@ -161,25 +161,25 @@ Bkmk* BkmkFile::read() return b; } CList<Bkmk>* BkmkFile::readall() { CList<Bkmk>* bl = NULL; if (f != NULL) { unsigned long newmagic; fread(&newmagic, sizeof(newmagic), 1, f); if (newmagic != magic) { - if (QMessageBox::warning(NULL, "Old bookmark file!", "Which version of QTReader\ndid you upgrade from?", "0_4*", "Any other version") == 0) + if (QMessageBox::warning(NULL, "Old bookmark file!", "Which version of OpieReader\ndid you upgrade from?", "0_4*", "Any other version") == 0) { fseek(f,0,SEEK_SET); bl = readall04(); } else { fseek(f,0,SEEK_SET); bl = readall03(); } isUpgraded = true; } else diff --git a/noncore/apps/opie-reader/BuffDoc.cpp b/noncore/apps/opie-reader/BuffDoc.cpp index e37b136..d4541ea 100644 --- a/noncore/apps/opie-reader/BuffDoc.cpp +++ b/noncore/apps/opie-reader/BuffDoc.cpp @@ -200,25 +200,25 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) } #else if (ret != 0) { delete exp; exp = new Text; ret = exp->openfile(src); } #endif if (ret != 0) { delete exp; - QMessageBox::information(_parent, "QTReader", "Unknown file compression type","Try another file"); + QMessageBox::information(_parent, "OpieReader", "Unknown file compression type","Try another file"); return ret; } // qDebug("Doing final open:%x:%x",exp,filt); lastword.empty(); lastsizes[0] = laststartline = 0; lastispara = false; exp->locate(0); filt->setsource(exp); // qDebug("BuffDoc:file opened"); return 0; } diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp index 0608b66..ef1f4f1 100644 --- a/noncore/apps/opie-reader/QTReaderApp.cpp +++ b/noncore/apps/opie-reader/QTReaderApp.cpp @@ -90,44 +90,44 @@ void QTReaderApp::listBkmkFiles() if (cnt > 0) { //tjw menu->hide(); editBar->hide(); if (m_fontVisible) m_fontBar->hide(); if (regVisible) regBar->hide(); if (searchVisible) searchBar->hide(); m_nRegAction = cRmBkmkFile; editorStack->raiseWidget( bkmkselector ); } else - QMessageBox::information(this, "QTReader", "No bookmark files"); + QMessageBox::information(this, "OpieReader", "No bookmark files"); } QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) : QMainWindow( parent, name, f ), bFromDocView( FALSE ), m_dontSave(false) { // qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); // qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); pBkmklist = NULL; doc = 0; m_fBkmksChanged = false; QString lang = getenv( "LANG" ); m_autogenstr = "^ *[A-Z].*[a-z] *$"; setToolBarsMovable( FALSE ); - setIcon( Resource::loadPixmap( "uqtreader" ) ); + setIcon( Resource::loadPixmap( "opie-reader/uqtreader" ) ); QPEToolBar *bar = new QPEToolBar( this ); bar->setHorizontalStretchable( TRUE ); addToolBar(bar, "tool",QMainWindow::Top, true); //tjw menu = bar; QPEMenuBar *mb = new QPEMenuBar( bar ); QPopupMenu *file = new QPopupMenu( this ); QPopupMenu *format = new QPopupMenu( this ); // QPopupMenu *edit = new QPopupMenu( this ); // bar = new QToolBar( this ); @@ -246,25 +246,25 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) m_buttonAction[0] = new QAction( tr( "Open File" ), QString::null, 0, ag, NULL, true ); m_buttonAction[1] = new QAction( tr( "Autoscroll" ), QString::null, 0, ag, NULL, true ); m_buttonAction[2] = new QAction( tr( "Mark" ), QString::null, 0, ag, NULL, true ); ag->addTo(spacemenu); connect(ag, SIGNAL( selected(QAction*) ), this, SLOT( buttonActionSelected(QAction*) ) ); - a = m_scrollButton = new QAction( tr( "Scroll" ), Resource::loadPixmap( "panel-arrow-down" ), QString::null, 0, this, 0, true ); + a = m_scrollButton = new QAction( tr( "Scroll" ), Resource::loadPixmap( "opie-reader/panel-arrow-down" ), QString::null, 0, this, 0, true ); // connect( a, SIGNAL( activated() ), this, SLOT( autoScroll() ) ); a->setOn(false); connect( a, SIGNAL( toggled(bool) ), this, SLOT( autoScroll(bool) ) ); file->insertSeparator(); a->addTo( bar ); a->addTo( file ); /* a = new QAction( tr( "Find" ), QString::null, 0, this, NULL, true ); // connect( a, SIGNAL( activated() ), this, SLOT( pagedn() ) ); a->addTo( file ); @@ -621,31 +621,31 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data) { QString msg = QString::fromUtf8(_msg); // qDebug("Received:%s", (const char*)msg); QDataStream stream( _data, IO_ReadOnly ); if ( msg == "info(QString)" ) { QString info; stream >> info; - QMessageBox::information(this, "QTReader", info); + QMessageBox::information(this, "OpieReader", info); } else if ( msg == "warn(QString)" ) { QString info; stream >> info; - QMessageBox::warning(this, "QTReader", info); + QMessageBox::warning(this, "OpieReader", info); } else if ( msg == "exit()" ) { m_dontSave = true; close(); } else if ( msg == "pageDown()" ) { reader->dopagedn(); } @@ -742,25 +742,25 @@ void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data) QString info; stream >> info; QRegExp arg(info); size_t pos = reader->pagelocate(); size_t start = pos; CDrawBuffer test(&(reader->m_fontControl)); reader->buffdoc.getline(&test,reader->width()); while (arg.match(toQString(test.data())) == -1) { pos = reader->locate(); if (!reader->buffdoc.getline(&test,reader->width())) { - QMessageBox::information(this, "QTReader", QString("Can't find\n")+info); + QMessageBox::information(this, "OpieReader", QString("Can't find\n")+info); pos = start; break; } } reader->locate(pos); } else if ( msg == "Layout/Strip CR(int)" ) { int info; stream >> info; stripcr(info); } @@ -905,84 +905,84 @@ void QTReaderApp::buttonActionSelected(QAction* _a) QTReaderApp::~QTReaderApp() { } void QTReaderApp::autoScroll(bool _b) { reader->setautoscroll(_b); } void QTReaderApp::TBD() { - QMessageBox::information(this, "QTReader", "Not yet implemented", 1); + QMessageBox::information(this, "OpieReader", "Not yet implemented", 1); } void QTReaderApp::TBDzoom() { - QMessageBox::information(this, "QTReader", "Zooming is done interactively\nTry left/right cursor keys", 1); + QMessageBox::information(this, "OpieReader", "Zooming is done interactively\nTry left/right cursor keys", 1); } void QTReaderApp::clearBkmkList() { delete pBkmklist; pBkmklist = NULL; m_fBkmksChanged = false; } void QTReaderApp::fileOpen() { /* menu->hide(); editBar->hide(); if (regVisible) regBar->hide(); if (searchVisible) searchBar->hide(); */ if (pBkmklist != NULL) { if (m_fBkmksChanged) { - if (QMessageBox::warning(this, "QTReader", "Save bookmarks?", "Save", "Don't bother") == 0) + if (QMessageBox::warning(this, "OpieReader", "Save bookmarks?", "Save", "Don't bother") == 0) savebkmks(); } delete pBkmklist; pBkmklist = NULL; m_fBkmksChanged = false; } reader->disableAutoscroll(); /* editorStack->raiseWidget( fileSelector ); fileSelector->reread(); */ - fileBrowser* fb = new fileBrowser(this,"QTReader",TRUE, + fileBrowser* fb = new fileBrowser(this,"OpieReader",TRUE, 0, // WStyle_Customize | WStyle_NoBorderEx, "*", QFileInfo(reader->m_lastfile).dirPath(true)); if (fb->exec()) { QString fn(fb->fileList[0]); // fb->populateList(); if (!fn.isEmpty() && QFileInfo(fn).isFile()) openFile(fn); } delete fb; reader->setFocus(); } void QTReaderApp::showinfo() { unsigned long fs, ts, pl; if (reader->empty()) { - QMessageBox::information(this, "QTReader", "No file loaded", 1); + QMessageBox::information(this, "OpieReader", "No file loaded", 1); } else { reader->sizes(fs,ts); pl = reader->pagelocate(); m_infoWin->setFileSize(fs); m_infoWin->setTextSize(ts); m_infoWin->setRatio(100-(100*fs + (ts >> 1))/ts); m_infoWin->setLocation(pl); m_infoWin->setRead((100*pl + (ts >> 1))/ts); editorStack->raiseWidget( m_infoWin ); m_infoWin->setFocus(); @@ -1011,25 +1011,25 @@ void QTReaderApp::addAnno(const QString& name, const QString& text, size_t posn) pBkmklist->push_front(Bkmk((const tchar*)text,posn)); #endif m_fBkmksChanged = true; pBkmklist->sort(); } void QTReaderApp::addAnno(const QString& name, const QString& text) { if (m_annoIsEditing) { if (name.isEmpty()) { - QMessageBox::information(this, "QTReader", "Need a name for the bookmark\nPlease try again", 1); + QMessageBox::information(this, "OpieReader", "Need a name for the bookmark\nPlease try again", 1); } else { addAnno(name, text, m_annoWin->getPosn()); } showEditTools(); } else { if (m_annoWin->edited()) { CBuffer buff(text.length()+1); @@ -1068,25 +1068,25 @@ bool QTReaderApp::findNextBookmark(size_t start) m_anno = iter.pContent(); } break; } } return found; } void QTReaderApp::addanno() { if (reader->empty()) { - QMessageBox::information(this, "QTReader", "No file loaded", 1); + QMessageBox::information(this, "OpieReader", "No file loaded", 1); } else { m_annoWin->setName(""); m_annoWin->setAnno(""); m_annoWin->setPosn(reader->pagelocate()); m_annoIsEditing = true; editorStack->raiseWidget( m_annoWin ); m_annoWin->setFocus(); } } @@ -1222,40 +1222,40 @@ void QTReaderApp::settarget() do_regedit(); } void QTReaderApp::do_overlap(const QString& lcn) { bool ok; unsigned long ulcn = lcn.toULong(&ok); if (ok) { reader->m_overlap = ulcn; } else - QMessageBox::information(this, "QTReader", "Must be a number"); + QMessageBox::information(this, "OpieReader", "Must be a number"); } void QTReaderApp::do_mono(const QString& lcn) { bool ok; unsigned long ulcn = lcn.toULong(&ok); if (ok) { reader->m_charpc = ulcn; reader->setfont(); reader->refresh(); // reader->setmono(true); } else - QMessageBox::information(this, "QTReader", "Must be a number"); + QMessageBox::information(this, "OpieReader", "Must be a number"); } /* void QTReaderApp::editPaste() { #ifndef QT_NO_CLIPBOARD editor->paste(); #endif } */ void QTReaderApp::editFind() @@ -1409,25 +1409,25 @@ void QTReaderApp::openFile( const DocLnk &f ) doc = new DocLnk(f); // QMessageBox::information(0, "DocLnk done", doc->file()); // QMessageBox::information(0, "Progress", "Calling setText()"); // QMessageBox::information(0, "Progress", "Textset"); // updateCaption(); showEditTools(); reader->setText(doc->name(), doc->file()); readbkmks(); } else { - QMessageBox::information(this, "QTReader", "File does not exist"); + QMessageBox::information(this, "OpieReader", "File does not exist"); } } void QTReaderApp::showEditTools() { if ( !doc ) close(); // fileSelector->hide(); //tjw menu->show(); editBar->show(); if ( searchVisible ) @@ -1477,30 +1477,30 @@ void QTReaderApp::clear() { // QMessageBox::information(this, "QTReader", "Deleting doc", 1); delete doc; // QMessageBox::information(this, "QTReader", "Deleted doc", 1); doc = 0; } reader->clear(); } void QTReaderApp::updateCaption() { if ( !doc ) - setCaption( tr("QTReader") ); + setCaption( tr("OpieReader") ); else { QString s = doc->name(); if ( s.isEmpty() ) s = tr( "Unnamed" ); - setCaption( s + " - " + tr("QTReader") ); + setCaption( s + " - " + tr("OpieReader") ); } } void QTReaderApp::setDocument(const QString& fileref) { bFromDocView = TRUE; //QMessageBox::information(0, "setDocument", fileref); openFile(DocLnk(fileref)); // showEditTools(); } void QTReaderApp::closeEvent( QCloseEvent *e ) @@ -1523,25 +1523,25 @@ void QTReaderApp::closeEvent( QCloseEvent *e ) regBar->hide(); regVisible = false; return; } if (searchVisible) { searchBar->hide(); searchVisible = false; return; } if (m_fBkmksChanged && pBkmklist != NULL) { - if (QMessageBox::warning(this, "QTReader", "Save bookmarks?", "Save", "Don't bother") == 0) + if (QMessageBox::warning(this, "OpieReader", "Save bookmarks?", "Save", "Don't bother") == 0) savebkmks(); delete pBkmklist; pBkmklist = NULL; m_fBkmksChanged = false; } bFromDocView = FALSE; saveprefs(); e->accept(); } else { showEditTools(); @@ -1578,25 +1578,25 @@ void QTReaderApp::listbkmk() } } if (cnt > 0) { //tjw menu->hide(); editBar->hide(); if (m_fontVisible) m_fontBar->hide(); if (regVisible) regBar->hide(); if (searchVisible) searchBar->hide(); editorStack->raiseWidget( bkmkselector ); } else - QMessageBox::information(this, "QTReader", "No bookmarks in memory"); + QMessageBox::information(this, "OpieReader", "No bookmarks in memory"); } void QTReaderApp::do_autogen() { m_nRegAction = cAutoGen; regEdit->setText(m_autogenstr); do_regedit(); } void QTReaderApp::do_regedit() { // editBar->hide(); @@ -1637,25 +1637,25 @@ void QTReaderApp::jump() sprintf(lcn, "%lu", reader->pagelocate()); regEdit->setText(lcn); do_regedit(); } void QTReaderApp::do_jump(const QString& lcn) { bool ok; unsigned long ulcn = lcn.toULong(&ok); if (ok) reader->locate(ulcn); else - QMessageBox::information(this, "QTReader", "Must be a number"); + QMessageBox::information(this, "OpieReader", "Must be a number"); } void QTReaderApp::do_regaction() { regBar->hide(); regVisible = false; switch(m_nRegAction) { case cAutoGen: do_autogen(regEdit->text()); break; case cAddBkmk: @@ -1677,25 +1677,25 @@ void QTReaderApp::do_regaction() reader->restore(); // editBar->show(); reader->setFocus(); } void QTReaderApp::do_settarget(const QString& _txt) { int ind = _txt.find('/'); if (ind == -1) { m_targetapp = ""; m_targetmsg = ""; - QMessageBox::information(this, "QTReader", "Format is\nappname/messagename"); + QMessageBox::information(this, "OpieReader", "Format is\nappname/messagename"); } else { m_targetapp = _txt.left(ind); m_targetmsg = _txt.right(_txt.length()-ind-1); } } void QTReaderApp::setfont() { for (int i = 1; i <= m_fontSelector->count(); i++) { @@ -1912,25 +1912,25 @@ void QTReaderApp::readbkmks() void QTReaderApp::addbkmk() { m_nRegAction = cAddBkmk; regEdit->setText(reader->firstword()); do_regedit(); } void QTReaderApp::do_addbkmk(const QString& text) { if (text.isEmpty()) { - QMessageBox::information(this, "QTReader", "Need a name for the bookmark\nSelect add again", 1); + QMessageBox::information(this, "OpieReader", "Need a name for the bookmark\nSelect add again", 1); } else { if (pBkmklist == NULL) pBkmklist = new CList<Bkmk>; #ifdef _UNICODE CBuffer buff; int i = 0; for (i = 0; i < text.length(); i++) { buff[i] = text[i].unicode(); } buff[i] = 0; |