-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 18 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.h | 1 |
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 | |||
@@ -70,12 +70,13 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | |||
70 | /* setup menu and toolbar */ | 70 | /* setup menu and toolbar */ |
71 | setupActions(); | 71 | setupActions(); |
72 | setupToolbar(); | 72 | setupToolbar(); |
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 | ||
78 | PMainWindow::~PMainWindow() { | 79 | PMainWindow::~PMainWindow() { |
79 | } | 80 | } |
80 | 81 | ||
81 | void PMainWindow::slotToggleZoomer() | 82 | void PMainWindow::slotToggleZoomer() |
@@ -430,19 +431,32 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) { | |||
430 | m_stack->addWidget(m_disp,ImageDisplay); | 431 | m_stack->addWidget(m_disp,ImageDisplay); |
431 | } | 432 | } |
432 | ev->accept(); | 433 | ev->accept(); |
433 | QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); | 434 | QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); |
434 | } | 435 | } |
435 | 436 | ||
436 | void PMainWindow::setDocument( const QString& showImg ) { | 437 | void 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 | |||
451 | void 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 | ||
445 | void PMainWindow::slotSelectDir(int id) | 459 | void PMainWindow::slotSelectDir(int id) |
446 | { | 460 | { |
447 | emit changeDir( m_dev[fsMenu->text(id )] ); | 461 | emit changeDir( m_dev[fsMenu->text(id )] ); |
448 | } | 462 | } |
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 | |||
@@ -62,12 +62,13 @@ public slots: | |||
62 | protected slots: | 62 | protected slots: |
63 | void raiseIconView(); | 63 | void raiseIconView(); |
64 | void closeEvent( QCloseEvent* ); | 64 | void closeEvent( QCloseEvent* ); |
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 | ||
69 | private: | 70 | private: |
70 | template<class T> void initT( const char* name, T**, int ); | 71 | template<class T> void initT( const char* name, T**, int ); |
71 | void initInfo(); | 72 | void initInfo(); |
72 | void initDisp(); | 73 | void initDisp(); |
73 | void setupViewWindow(bool full, bool forceDisplay); | 74 | void setupViewWindow(bool full, bool forceDisplay); |