diff --git a/src/apps/marble-kde/KdeMainWindow.h b/src/apps/marble-kde/KdeMainWindow.h --- a/src/apps/marble-kde/KdeMainWindow.h +++ b/src/apps/marble-kde/KdeMainWindow.h @@ -39,7 +39,7 @@ MarbleWidget* marbleWidget() const; public Q_SLOTS: - void setMapTitle(); + void updateWindowTitle(); void changeViewSize( QAction* ); protected: diff --git a/src/apps/marble-kde/KdeMainWindow.cpp b/src/apps/marble-kde/KdeMainWindow.cpp --- a/src/apps/marble-kde/KdeMainWindow.cpp +++ b/src/apps/marble-kde/KdeMainWindow.cpp @@ -69,7 +69,8 @@ setAutoSaveSettings(); connect( marbleWidget(), SIGNAL(themeChanged(QString)), - this, SLOT(setMapTitle())); + this, SLOT(updateWindowTitle())); + updateWindowTitle(); } MainWindow::~MainWindow() @@ -88,12 +89,10 @@ return m_part->controlView()->marbleWidget(); } -void MainWindow::setMapTitle() +void MainWindow::updateWindowTitle() { GeoSceneDocument *mapTheme = marbleWidget()->mapTheme(); - if ( mapTheme ) { - setWindowTitle(i18n("Marble Virtual Globe") + " - " + mapTheme->head()->name()); - } + setWindowTitle(mapTheme ? mapTheme->head()->name() : QString()); } void MainWindow::changeViewSize( QAction* action ) diff --git a/src/apps/marble-qt/QtMainWindow.h b/src/apps/marble-qt/QtMainWindow.h --- a/src/apps/marble-qt/QtMainWindow.h +++ b/src/apps/marble-qt/QtMainWindow.h @@ -82,7 +82,7 @@ void changeRecordingState(); - void updateApplicationTitle(const QString&); + void updateWindowTitle(); // File Menu void openFile(); diff --git a/src/apps/marble-qt/QtMainWindow.cpp b/src/apps/marble-qt/QtMainWindow.cpp --- a/src/apps/marble-qt/QtMainWindow.cpp +++ b/src/apps/marble-qt/QtMainWindow.cpp @@ -183,7 +183,6 @@ m_controlView = new ControlView( this ); - setWindowTitle( tr("Marble - Virtual Globe") ); setWindowIcon( QIcon(":/icons/marble.png") ); setCentralWidget( m_controlView ); @@ -213,10 +212,11 @@ connect( m_controlView->marbleWidget(), SIGNAL(themeChanged(QString)), this, SLOT(updateMapEditButtonVisibility(QString)) ); connect(m_controlView->marbleModel(), SIGNAL(themeChanged(QString)), - this, SLOT(updateApplicationTitle(QString))); + this, SLOT(updateWindowTitle())); connect( m_controlView, SIGNAL(showMapWizard()), this, SLOT(showMapWizard()) ); connect( m_controlView, SIGNAL(mapThemeDeleted()), this, SLOT(fallBackToDefaultTheme()) ); + updateWindowTitle(); setUpdatesEnabled( true ); m_position = QCoreApplication::translate( "Marble", NOT_AVAILABLE ); @@ -1613,12 +1613,10 @@ m_stopRecordingAction->setEnabled( !m_stopRecordingAction->isEnabled() ); } -void MainWindow::updateApplicationTitle(const QString&) +void MainWindow::updateWindowTitle() { GeoSceneDocument *theme = m_controlView->marbleModel()->mapTheme(); - if (theme) { - setWindowTitle(tr("Marble Virtual Globe") + " - " + theme->head()->name()); - } + setWindowTitle(theme ? theme->head()->name() : QString()); } void MainWindow::showMapWizard() diff --git a/src/apps/marble-qt/qtmain.cpp b/src/apps/marble-qt/qtmain.cpp --- a/src/apps/marble-qt/qtmain.cpp +++ b/src/apps/marble-qt/qtmain.cpp @@ -50,6 +50,7 @@ QTranslator translator; translator.load( "marble-" + lang, MarbleDirs::path(QString("lang") ) ); app.installTranslator(&translator); + app.setApplicationDisplayName(MainWindow::tr("Marble - Virtual Globe")); // For non static builds on mac and win // we need to be sure we can find the qt image