mirror of
https://github.com/isledecomp/SIEdit.git
synced 2025-04-21 17:21:02 -04:00
app: address review comments
This commit is contained in:
parent
9c97f21e43
commit
07cb8ad89b
3 changed files with 4 additions and 12 deletions
|
@ -40,7 +40,7 @@ int main(int argc, char *argv[])
|
|||
qInstallMessageHandler(DebugHandler);
|
||||
|
||||
QApplication a(argc, argv);
|
||||
a.setApplicationName(QObject::tr("SI Editor"));
|
||||
a.setApplicationName(QCoreApplication::translate("main", "SI Editor"));
|
||||
|
||||
MainWindow w;
|
||||
|
||||
|
|
|
@ -180,15 +180,7 @@ void MainWindow::SetPanel(Panel *panel, si::Object *chunk)
|
|||
void MainWindow::UpdateWindowTitle(QString filename)
|
||||
{
|
||||
TrimOffDirectory(filename);
|
||||
setWindowTitle(QStringLiteral("%1 - %2").arg(QApplication::applicationName(), filename));
|
||||
}
|
||||
|
||||
void MainWindow::AppendModifiedTitleIndicator()
|
||||
{
|
||||
QString title = windowTitle();
|
||||
title.append("*");
|
||||
|
||||
setWindowTitle(title);
|
||||
setWindowTitle(QStringLiteral("%1 - %2[*]").arg(QApplication::applicationName(), filename));
|
||||
}
|
||||
|
||||
void MainWindow::ExtractObject(si::Object *obj)
|
||||
|
@ -227,7 +219,8 @@ void MainWindow::ReplaceObject(si::Object *obj)
|
|||
#endif
|
||||
)) {
|
||||
static_cast<Panel*>(config_stack_->currentWidget())->ResetData();
|
||||
AppendModifiedTitleIndicator();
|
||||
setWindowModified(true);
|
||||
|
||||
} else {
|
||||
QMessageBox::critical(this, QString(), tr("Failed to open to file \"%1\".").arg(s));
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ private:
|
|||
void TrimOffDirectory(QString &s);
|
||||
|
||||
void UpdateWindowTitle(QString filename);
|
||||
void AppendModifiedTitleIndicator();
|
||||
|
||||
static const QString kFileFilter;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue