-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 | |||
@@ -68,16 +68,17 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | |||
68 | 68 | ||
69 | listviewMenu = 0; | 69 | listviewMenu = 0; |
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() |
82 | { | 83 | { |
83 | m_aZoomer->setOn(!m_aZoomer->isOn()); | 84 | m_aZoomer->setOn(!m_aZoomer->isOn()); |
@@ -428,23 +429,36 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) { | |||
428 | /* otherwise opie-eye crashes in bigscreen mode! */ | 429 | /* otherwise opie-eye crashes in bigscreen mode! */ |
429 | m_disp->reparent(0,QPoint(0,0)); | 430 | m_disp->reparent(0,QPoint(0,0)); |
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 | } |
449 | 463 | ||
450 | void PMainWindow::dirChanged() | 464 | void PMainWindow::dirChanged() |
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 | |||
@@ -60,16 +60,17 @@ public slots: | |||
60 | virtual void slotFullScreenToggled(bool); | 60 | virtual void slotFullScreenToggled(bool); |
61 | 61 | ||
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); |
74 | 75 | ||
75 | private: | 76 | private: |