Simplify mainwindow title logic: remove MainWindowTitleFormat enum

The MainWindow::setTitle() function was passed an enum, which depended
on whether existing_file is set or not. The check can be (and was!) done
directly in setTitle(). Therefore, remove the whole enum.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2017-12-11 17:43:53 +01:00 committed by Dirk Hohndel
parent 931bcc1966
commit 4ac5b9c965
3 changed files with 13 additions and 27 deletions

View file

@ -33,10 +33,7 @@ void init_ui()
PluginManager::instance().loadPlugins();
window = new MainWindow();
if (existing_filename && existing_filename[0] != '\0')
window->setTitle(MWTF_FILENAME);
else
window->setTitle(MWTF_DEFAULT);
window->setTitle();
}
void run_ui()