author | llornkcor <llornkcor> | 2002-11-03 18:14:36 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-03 18:14:36 (UTC) |
commit | 7d282e8e721d4c7c71a6d308d082da7138139484 (patch) (side-by-side diff) | |
tree | cd37bc23214230258054562657a1d5eff49232b7 | |
parent | 8b3893f3b11731151c19274d2c9ed22d7a00a2b3 (diff) | |
download | opie-7d282e8e721d4c7c71a6d308d082da7138139484.zip opie-7d282e8e721d4c7c71a6d308d082da7138139484.tar.gz opie-7d282e8e721d4c7c71a6d308d082da7138139484.tar.bz2 |
fix ofileselector open
-rw-r--r-- | noncore/multimedia/showimg/showimg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp index 0fbffe7..d6f0733 100644 --- a/noncore/multimedia/showimg/showimg.cpp +++ b/noncore/multimedia/showimg/showimg.cpp @@ -490,97 +490,97 @@ void ImageViewer::switchToImageView() iconToolBar->show(); imagePanel->setPosition(0,0); } void ImageViewer::setDocument(const QString& fileref) { delayLoad = fileref; switchToImageView(); QTimer::singleShot( 0, this, SLOT(doDelayedLoad()) ); } void ImageViewer::doDelayedLoad() { show(delayLoad); } void ImageViewer::show() { normalView(); QMainWindow::show(); } void ImageViewer::show(const QString& fileref) { // qDebug("Show "+fileref); bFromDocView = TRUE; closeFileSelector(); DocLnk link(fileref); if ( link.isValid() ) { openFile(link); } else { filename = fileref; updateCaption( fileref ); loadImage( fileref ); } } void ImageViewer::openFile() { MimeTypes types; QStringList image; image << "image/*"; types.insert("Images", image); QString str = OFileDialog::getOpenFileName( 1,QPEApplication::documentDir(),"", types, 0 ); DocLnk link(str); - if ( link.isValid() ) +// if ( link.isValid() ) openFile(link); } void ImageViewer::openFile( const DocLnk &link ) { closeFileSelector(); // DocLnk link(file); qDebug("open "+link.name()); updateCaption( link.name() ); loadImage( link.file() ); if (slideTimer->isActive()) { slideTimer->start(slideDelay * 1000, FALSE); } } void ImageViewer::open() { switchToFileSelector(); } void ImageViewer::closeFileSelector() { switchToImageView(); } void ImageViewer::updateCaption( QString name ) { int sep = name.findRev( '/' ); if ( sep >= 0 ) name = name.mid( sep+1 ); setCaption( name + tr(" - Image Viewer") ); } /* This function loads an image from a file. */ void ImageViewer::loadImage( const char *fileName ) { filename = fileName; if ( filename ) { QApplication::setOverrideCursor( waitCursor ); // this might take time //imagePanel->statusLabel()->setText( tr("Loading image...") ); qApp->processEvents(); bool ok = image.load(filename, 0); if ( ok ) { |