audioOutput(0),
#endif
fullscreenFlag(false),
- m_compact(false) {
+ m_compact(false),
+ initialized(false) {
singleton = this;
ChannelAggregator::instance()->start();
checkForUpdate();
+
+ initialized = true;
}
void MainWindow::changeEvent(QEvent *e) {
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_J));
action->setCheckable(true);
action->setIcon(IconUtils::icon("document-save"));
- action->setVisible(false);
connect(action, SIGNAL(toggled(bool)), SLOT(toggleDownloads(bool)));
actions->insert("downloads", action);
statusToolBar = new QToolBar(this);
statusToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
statusToolBar->setIconSize(QSize(16, 16));
- // statusToolBar->addAction(The::globalActions()->value("downloads"));
regionAction = new QAction(this);
regionAction->setStatusTip(tr("Choose your content location"));
} else {
statusToolBar->removeAction(action);
if (statusBar()->isVisible() && !needStatusBar())
- if (fullscreenFlag && views->currentWidget() == mediaView)
- setStatusBarVisibility(false);
+ setStatusBarVisibility(false);
}
}
void MainWindow::writeSettings() {
QSettings settings;
- settings.setValue("geometry", saveGeometry());
+ if (!isReallyFullScreen())
+ settings.setValue("geometry", saveGeometry());
mediaView->saveSplitterState();
#ifdef APP_PHONON
mediaView->stop();
}
-void MainWindow::resizeEvent(QResizeEvent*e) {
+void MainWindow::resizeEvent(QResizeEvent *e) {
Q_UNUSED(e);
#ifdef APP_MAC
- if (mac::CanGoFullScreen(winId())) {
+ if (initialized && mac::CanGoFullScreen(winId())) {
bool isFullscreen = mac::IsFullScreen(winId());
+ qDebug() << __PRETTY_FUNCTION__ << isFullscreen << fullscreenFlag;
if (isFullscreen != fullscreenFlag) {
if (compactViewAct->isChecked()) {
compactViewAct->setChecked(false);
if (compactViewAct->isChecked())
compactViewAct->toggle();
- fullscreenFlag = !fullscreenFlag;
-
#ifdef APP_MAC
WId handle = winId();
if (mac::CanGoFullScreen(handle)) {
}
#endif
+ fullscreenFlag = !fullscreenFlag;
+
if (fullscreenFlag) {
// Enter full screen