-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 3 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 24 |
2 files changed, 12 insertions, 15 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index be58c72..ebdfc60 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp @@ -35,12 +35,13 @@ void ImageView::setMenuActions(QActionGroup*hGroup,QActionGroup*nextprevGroup, Q m_gPrevNext = nextprevGroup; m_hGroup = hGroup; } ImageView::~ImageView() { + odebug << "Destructor imageview" << oendl; delete m_viewManager; } Opie::Core::OKeyConfigManager* ImageView::manager() { if (!m_viewManager) { @@ -74,17 +75,19 @@ void ImageView::stopSlide() void ImageView::nextSlide() { if (!m_slideTimer) { return; } +#if 0 if (isHidden()) { delete m_slideTimer; m_slideTimer = 0; return; } +#endif emit dispNext(); m_slideTimer->start(m_slideValue*1000,true); } void ImageView::initKeys() { odebug << "init imageview keys" << oendl; diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 5eb065f..6660eb2 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -211,22 +211,16 @@ void PMainWindow::slotConfig() { readConfig(); } delete keyWid; m_stack->raiseWidget(w); if (remdisp) { - m_disp->disconnect(this, SLOT(slotReturn())); - m_disp->setDestructiveClose(); - m_stack->removeWidget(m_disp); - m_disp = 0; + m_disp->hide(); } if (reminfo) { - m_info->disconnect(this, SLOT(slotReturn())); - m_info->setDestructiveClose(); - m_stack->removeWidget(m_info); - m_info = 0; + m_info->hide(); } } /* * create a new image info component * and detach the current one @@ -285,20 +279,15 @@ void PMainWindow::slotToggleFullScreen() void PMainWindow::slotFullScreenButton(bool current) { if (autoSave) { m_cfg->writeEntry("fullscreen",current); } if (!m_disp) return; - - if (m_disp->isHidden()) { - /* it must get some setups for switch we can just do if the window is visible. - so we must delete the imageview window and re-create it when displaying new - image */ - return; + if (m_disp->isVisible()) { + setupViewWindow(current, true); } - setupViewWindow(current, true); } void PMainWindow::setupViewWindow(bool current, bool forceDisplay) { if (!m_disp) return; if (current) { @@ -366,13 +355,15 @@ void PMainWindow::slotShowInfo( const QString& inf ) { fsButton->hide(); } m_stack->raiseWidget( ImageInfo ); } void PMainWindow::slotDisplay( const QString& inf ) { + bool nwindow = false; if ( !m_disp ) { + nwindow = true; initDisp(); } m_disp->setImage( inf ); if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { if (m_gPrevNext->isEnabled()==false) { m_gPrevNext->addTo(toolBar); @@ -382,12 +373,15 @@ void PMainWindow::slotDisplay( const QString& inf ) { m_aShowInfo->setEnabled(true); m_aViewfile->setEnabled(false); m_aStartSlide->setEnabled(false); fsButton->hide(); } } + if (!nwindow && m_disp->fullScreen()!=m_aFullScreen->isOn()) { + slotFullScreenToggled(m_aFullScreen->isOn()); + } if (m_disp->fullScreen()) { qwsDisplay()->requestFocus( m_disp->winId(), TRUE); } else { m_stack->raiseWidget( ImageDisplay ); } } |