author | llornkcor <llornkcor> | 2002-09-14 02:39:44 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-09-14 02:39:44 (UTC) |
commit | 2f55be65436cb05a8580f4a436f94bce9de48da7 (patch) (side-by-side diff) | |
tree | 5edbb3683681bd14f263a6b7fe259dbcffa51f22 | |
parent | 2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975 (diff) | |
download | opie-2f55be65436cb05a8580f4a436f94bce9de48da7.zip opie-2f55be65436cb05a8580f4a436f94bce9de48da7.tar.gz opie-2f55be65436cb05a8580f4a436f94bce9de48da7.tar.bz2 |
opie specific resource change and messagbox caption to opiereader
-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 @@ -165,17 +165,17 @@ 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(); 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 @@ -204,17 +204,17 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) 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); 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 @@ -94,17 +94,17 @@ void QTReaderApp::listBkmkFiles() 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")); @@ -113,17 +113,17 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) 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 ); @@ -250,17 +250,17 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) 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 ); /* @@ -625,23 +625,23 @@ void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data) // 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(); } @@ -746,17 +746,17 @@ void QTReaderApp::msgHandler(const QCString& _msg, const QByteArray& _data) 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)" ) { @@ -909,22 +909,22 @@ 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; } @@ -936,29 +936,29 @@ void QTReaderApp::fileOpen() 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(); @@ -968,17 +968,17 @@ void QTReaderApp::fileOpen() 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); @@ -1015,17 +1015,17 @@ void QTReaderApp::addAnno(const QString& name, const QString& text, size_t posn) } 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 @@ -1072,17 +1072,17 @@ bool QTReaderApp::findNextBookmark(size_t start) } 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 ); @@ -1226,32 +1226,32 @@ 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 @@ -1413,17 +1413,17 @@ void QTReaderApp::openFile( const DocLnk &f ) // 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(); @@ -1481,22 +1481,22 @@ void QTReaderApp::clear() 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)); @@ -1527,17 +1527,17 @@ void QTReaderApp::closeEvent( QCloseEvent *e ) 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(); @@ -1582,17 +1582,17 @@ void QTReaderApp::listbkmk() //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(); } @@ -1641,17 +1641,17 @@ void QTReaderApp::jump() 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) { @@ -1681,17 +1681,17 @@ void QTReaderApp::do_regaction() 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); } } @@ -1916,17 +1916,17 @@ void QTReaderApp::addbkmk() 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++) |