Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index a784f5b..58f02ef 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp | |||
@@ -320,47 +320,49 @@ void PMainWindow::initDisp() { | |||
320 | 320 | ||
321 | void PMainWindow::slotToggleFullScreen() | 321 | void PMainWindow::slotToggleFullScreen() |
322 | { | 322 | { |
323 | odebug << "Toggle full " << oendl; | 323 | odebug << "Toggle full " << oendl; |
324 | if (!m_disp) return; | 324 | if (!m_disp) return; |
325 | bool current = !m_disp->fullScreen(); | 325 | bool current = !m_disp->fullScreen(); |
326 | m_disp->setFullScreen(current); | 326 | m_disp->setFullScreen(current); |
327 | odebug << "Current = " << current << oendl; | 327 | odebug << "Current = " << current << oendl; |
328 | if (current) { | 328 | if (current) { |
329 | odebug << "full" << oendl; | 329 | odebug << "full" << oendl; |
330 | m_disp->setBackgroundColor(black); | 330 | m_disp->setBackgroundColor(black); |
331 | if (!tFrame) { | 331 | if (!tFrame) { |
332 | tFrame = new QWidget(0,0,WType_TopLevel|WStyle_NoBorder|WStyle_StaysOnTop); | 332 | tFrame = new QWidget(0,0,WStyle_Customize|WStyle_NoBorder); |
333 | tFrame->resize(qApp->desktop()->width(), qApp->desktop()->height()); | 333 | tFrame->resize(qApp->desktop()->width(), qApp->desktop()->height()); |
334 | tFrame->setMinimumSize(qApp->desktop()->width(), qApp->desktop()->height()); | 334 | tFrame->setMinimumSize(qApp->desktop()->width(), qApp->desktop()->height()); |
335 | } | 335 | } |
336 | m_disp->reparent(tFrame,QPoint(0,0)); | 336 | m_disp->reparent(tFrame,QPoint(0,0)); |
337 | m_disp->setVScrollBarMode(QScrollView::AlwaysOff); | 337 | m_disp->setVScrollBarMode(QScrollView::AlwaysOff); |
338 | m_disp->setHScrollBarMode(QScrollView::AlwaysOff); | 338 | m_disp->setHScrollBarMode(QScrollView::AlwaysOff); |
339 | m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); | 339 | m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); |
340 | tFrame->showFullScreen(); | 340 | tFrame->showFullScreen(); |
341 | } else { | 341 | } else { |
342 | setUpdatesEnabled(false); | ||
342 | odebug << "window" << oendl; | 343 | odebug << "window" << oendl; |
343 | m_disp->reparent(0,QPoint(0,0)); | 344 | m_disp->reparent(0,QPoint(0,0)); |
344 | m_disp->showNormal(); | 345 | m_disp->showNormal(); |
345 | /* don't forget it! */ | 346 | /* don't forget it! */ |
346 | tFrame->hide(); | 347 | tFrame->hide(); |
347 | m_disp->setBackgroundColor(white); | 348 | m_disp->setBackgroundColor(white); |
348 | m_stack->addWidget(m_disp,ImageDisplay); | 349 | m_stack->addWidget(m_disp,ImageDisplay); |
349 | m_disp->setVScrollBarMode(QScrollView::Auto); | 350 | m_disp->setVScrollBarMode(QScrollView::Auto); |
350 | m_disp->setHScrollBarMode(QScrollView::Auto); | 351 | m_disp->setHScrollBarMode(QScrollView::Auto); |
351 | m_stack->raiseWidget(m_disp); | 352 | m_stack->raiseWidget(m_disp); |
352 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { | 353 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { |
353 | m_disp->resize(m_disp->minimumSize()); | 354 | m_disp->resize(m_disp->minimumSize()); |
354 | } | 355 | } |
356 | setUpdatesEnabled(true); | ||
355 | } | 357 | } |
356 | } | 358 | } |
357 | 359 | ||
358 | /** | 360 | /** |
359 | * With big Screen the plan could be to 'detach' the image | 361 | * With big Screen the plan could be to 'detach' the image |
360 | * window if visible and to create a ne wone | 362 | * window if visible and to create a ne wone |
361 | * init* already supports it but I make no use of it for | 363 | * init* already supports it but I make no use of it for |
362 | * now. We set filename and raise | 364 | * now. We set filename and raise |
363 | * | 365 | * |
364 | * ### FIXME and talk to alwin | 366 | * ### FIXME and talk to alwin |
365 | */ | 367 | */ |
366 | void PMainWindow::slotShowInfo( const QString& inf ) { | 368 | void PMainWindow::slotShowInfo( const QString& inf ) { |
@@ -418,33 +420,36 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) { | |||
418 | return; | 420 | return; |
419 | } | 421 | } |
420 | if (m_disp && m_disp->fullScreen()) { | 422 | if (m_disp && m_disp->fullScreen()) { |
421 | /* otherwise opie-eye crashes in bigscreen mode! */ | 423 | /* otherwise opie-eye crashes in bigscreen mode! */ |
422 | m_disp->reparent(0,QPoint(0,0)); | 424 | m_disp->reparent(0,QPoint(0,0)); |
423 | m_stack->addWidget(m_disp,ImageDisplay); | 425 | m_stack->addWidget(m_disp,ImageDisplay); |
424 | } | 426 | } |
425 | ev->accept(); | 427 | ev->accept(); |
426 | QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); | 428 | QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); |
427 | } | 429 | } |
428 | 430 | ||
429 | void PMainWindow::raiseIconView() { | 431 | void PMainWindow::raiseIconView() { |
432 | setUpdatesEnabled(false); | ||
430 | if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { | 433 | if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { |
431 | prevButton->hide(); | 434 | prevButton->hide(); |
432 | nextButton->hide(); | 435 | nextButton->hide(); |
433 | upButton->show(); | 436 | upButton->show(); |
434 | fsButton->show(); | 437 | fsButton->show(); |
435 | viewModeButton->show(); | 438 | viewModeButton->show(); |
436 | } | 439 | } |
437 | if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) { | 440 | if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) { |
438 | tFrame->hide(); | 441 | tFrame->hide(); |
439 | } | 442 | } |
440 | m_stack->raiseWidget( IconView ); | 443 | m_stack->raiseWidget( IconView ); |
444 | setUpdatesEnabled(true); | ||
445 | repaint(); | ||
441 | } | 446 | } |
442 | 447 | ||
443 | void PMainWindow::setDocument( const QString& showImg ) { | 448 | void PMainWindow::setDocument( const QString& showImg ) { |
444 | QString file = showImg; | 449 | QString file = showImg; |
445 | DocLnk lnk(showImg); | 450 | DocLnk lnk(showImg); |
446 | if (lnk.isValid() ) | 451 | if (lnk.isValid() ) |
447 | file = lnk.file(); | 452 | file = lnk.file(); |
448 | 453 | ||
449 | slotDisplay( file ); | 454 | slotDisplay( file ); |
450 | } | 455 | } |