summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp18
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.h1
2 files changed, 17 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 67eb277..f443ccb 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -73,6 +73,7 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
73 setupMenu(); 73 setupMenu();
74 m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true)); 74 m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true));
75 m_aAutoRotate->setEnabled(!m_aUnscaled->isOn()); 75 m_aAutoRotate->setEnabled(!m_aUnscaled->isOn());
76 odebug << "mainwindow constructor done" << oendl;
76} 77}
77 78
78PMainWindow::~PMainWindow() { 79PMainWindow::~PMainWindow() {
@@ -433,13 +434,26 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) {
433 QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); 434 QTimer::singleShot(0, qApp, SLOT(closeAllWindows()));
434} 435}
435 436
436void PMainWindow::setDocument( const QString& showImg ) { 437void PMainWindow::setDocument( const QString& showImg )
438{
439 bool first_start = m_disp==0;
440
437 QString file = showImg; 441 QString file = showImg;
438 DocLnk lnk(showImg); 442 DocLnk lnk(showImg);
439 if (lnk.isValid() ) 443 if (lnk.isValid() )
440 file = lnk.file(); 444 file = lnk.file();
441
442 slotDisplay( file ); 445 slotDisplay( file );
446 if (first_start && m_aFullScreen->isOn()) {
447 QTimer::singleShot(0,this,SLOT(check_view_fullscreen()));
448 }
449}
450
451void PMainWindow::check_view_fullscreen()
452{
453 if (!m_view) return;
454 if (!m_view->hasFocus()&&m_aFullScreen->isOn()) {
455 qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
456 }
443} 457}
444 458
445void PMainWindow::slotSelectDir(int id) 459void PMainWindow::slotSelectDir(int id)
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h
index 5707568..465e352 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.h
+++ b/noncore/graphics/opie-eye/gui/mainwindow.h
@@ -65,6 +65,7 @@ protected slots:
65 void showToolbar(bool); 65 void showToolbar(bool);
66 void listviewselected(QAction*); 66 void listviewselected(QAction*);
67 void slotFullScreenButton(bool); 67 void slotFullScreenButton(bool);
68 void check_view_fullscreen();
68 69
69private: 70private:
70 template<class T> void initT( const char* name, T**, int ); 71 template<class T> void initT( const char* name, T**, int );