Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index f443ccb..295f93f 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -48,2 +48,4 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) readConfig(); + m_setDocCalled = false; + m_polishDone = false; @@ -421,7 +423,9 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) { */ - if ( m_stack->visibleWidget() == m_info || - m_stack->visibleWidget() == m_disp ) { - ev->ignore(); - raiseIconView(); - return; + if (!m_setDocCalled) { + if ( m_stack->visibleWidget() == m_info || + m_stack->visibleWidget() == m_disp ) { + ev->ignore(); + raiseIconView(); + return; + } } @@ -438,4 +442,2 @@ void PMainWindow::setDocument( const QString& showImg ) { - bool first_start = m_disp==0; - QString file = showImg; @@ -445,5 +447,7 @@ void PMainWindow::setDocument( const QString& showImg ) slotDisplay( file ); - if (first_start && m_aFullScreen->isOn()) { +#if 0 + if (!m_polishDone) { QTimer::singleShot(0,this,SLOT(check_view_fullscreen())); } +#endif } @@ -691,3 +695,2 @@ void PMainWindow::listviewselected(QAction*which) int val = 1; -// QString name; @@ -695,9 +698,6 @@ void PMainWindow::listviewselected(QAction*which) val = 3; -// name = "opie-eye/opie-eye-textview"; } else if (which==m_aDirShort) { val = 2; -// name = "opie-eye/opie-eye-thumbonly"; } else if (which==m_aDirLong) { val = 1; -// name = "opie-eye/opie-eye-thumb"; } @@ -710 +710,24 @@ void PMainWindow::readConfig() } + +void PMainWindow::polish() +{ + if (m_disp) { + odebug << "======================\n" + << "Called via setdocument\n" + << "======================" << oendl; + m_setDocCalled = true; + m_view->setDoccalled(true); + m_disp->setCloseIfHide(true); + } else { + m_setDocCalled = false; + m_view->setDoccalled(false); + } + m_polishDone = true; + QMainWindow::polish(); + if (m_setDocCalled) { + if (m_aFullScreen->isOn()) { + QTimer::singleShot(0,this,SLOT(check_view_fullscreen())); + } else if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { + } + } +} |