From e1ed329d0b8be10ac6e019d37b82afcf21990691 Mon Sep 17 00:00:00 2001 From: alwin Date: Fri, 12 Nov 2004 15:57:59 +0000 Subject: - fixed a bug in docview-lister: different files may have same docview name. So mapping filenames to docname isn't usefull. - when opie-eye is started from doctab closing the imagewindow closes the application - when a doc-link is changed while opie-eye is running it get the changes, too. --- (limited to 'noncore/graphics/opie-eye/gui/imageview.cpp') diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index ebdfc60..ac6474c 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp @@ -27,6 +27,7 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name m_gDisplayType = 0; m_gPrevNext = 0; m_hGroup = 0; + closeIfHide = false; } void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, QActionGroup*disptypeGroup) @@ -152,7 +153,19 @@ void ImageView::keyReleaseEvent(QKeyEvent * e) if (!e || e->state()!=0) { return; } - if (e->key()==Qt::Key_Escape && fullScreen()) emit hideMe(); + if (e->key()==Qt::Key_Escape) { + if (fullScreen()) { + emit hideMe(); + } + if (closeIfHide) { + QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); + } + } +} + +void ImageView::setCloseIfHide(bool how) +{ + closeIfHide = how; } void ImageView::slotShowImageInfo() -- cgit v0.9.0.2