mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
GMLPlayground: Let WindowServer handle the title's modification symbol
This commit is contained in:
parent
1fba3640cb
commit
5c4ffbcb46
1 changed files with 1 additions and 12 deletions
|
@ -114,17 +114,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
DeprecatedString file_path;
|
||||
auto update_title = [&] {
|
||||
StringBuilder builder;
|
||||
if (file_path.is_empty())
|
||||
builder.append("Untitled"sv);
|
||||
else
|
||||
builder.append(file_path);
|
||||
|
||||
if (window->is_modified())
|
||||
builder.append("[*]"sv);
|
||||
|
||||
builder.append(" - GML Playground"sv);
|
||||
window->set_title(builder.to_deprecated_string());
|
||||
window->set_title(DeprecatedString::formatted("{}[*] - GML Playground", file_path.is_empty() ? "Untitled"sv : file_path.view()));
|
||||
};
|
||||
|
||||
editor->on_change = [&] {
|
||||
|
@ -137,7 +127,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
editor->on_modified_change = [&](bool modified) {
|
||||
window->set_modified(modified);
|
||||
update_title();
|
||||
};
|
||||
|
||||
auto load_file = [&](auto file) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue