Skip to content

Commit

Permalink
Applications: Use "Document - AppName" window title format
Browse files Browse the repository at this point in the history
  • Loading branch information
xTibor authored and awesomekling committed Mar 13, 2020
1 parent b4381be commit f347dd5
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Applications/FileManager/PropertiesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ PropertiesDialog::~PropertiesDialog() {}
void PropertiesDialog::update()
{
m_icon->set_icon(const_cast<Gfx::Bitmap*>(m_model.icon_for_file(m_mode, m_name).bitmap_for_size(32)));
set_title(String::format("Properties of \"%s\"", m_name.characters()));
set_title(String::format("%s - Properties", m_name.characters()));
}

void PropertiesDialog::permission_changed(mode_t mask, bool set)
Expand Down
2 changes: 1 addition & 1 deletion Applications/FileManager/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ int main(int argc, char** argv)
main_toolbar.add_action(*view_as_columns_action);

directory_view.on_path_change = [&](const String& new_path) {
window->set_title(String::format("File Manager: %s", new_path.characters()));
window->set_title(String::format("%s - File Manager", new_path.characters()));
location_textbox.set_text(new_path);
auto new_index = directories_model->index(new_path, GUI::FileSystemModel::Column::Name);
if (new_index.is_valid()) {
Expand Down
2 changes: 1 addition & 1 deletion Applications/Help/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int main(int argc, char* argv[])
html_view.set_document(html_document);

String page_and_section = model->page_and_section(tree_view.selection().first());
window->set_title(String::format("Help: %s", page_and_section.characters()));
window->set_title(String::format("%s - Help", page_and_section.characters()));
};

tree_view.on_selection_change = [&] {
Expand Down
2 changes: 1 addition & 1 deletion Applications/HexEditor/HexEditorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ void HexEditorWidget::set_path(const FileSystemPath& file)
void HexEditorWidget::update_title()
{
StringBuilder builder;
builder.append("Hex Editor: ");
builder.append(m_path);
if (m_document_dirty)
builder.append(" (*)");
builder.append(" - Hex Editor");
window()->set_title(builder.to_string());
}

Expand Down
2 changes: 1 addition & 1 deletion Applications/IRCClient/IRCAppWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ IRCAppWindow::~IRCAppWindow()

void IRCAppWindow::update_title()
{
set_title(String::format("IRC Client: %s@%s:%d", m_client->nickname().characters(), m_client->hostname().characters(), m_client->port()));
set_title(String::format("%s@%s:%d - IRC Client", m_client->nickname().characters(), m_client->hostname().characters(), m_client->port()));
}

void IRCAppWindow::setup_client()
Expand Down
2 changes: 1 addition & 1 deletion Applications/QuickShow/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int main(int argc, char** argv)
widget.set_bitmap(*bitmap);

auto update_window_title = [&](int scale) {
window->set_title(String::format("QuickShow: %s %s %d%%", widget.path().characters(), widget.bitmap()->size().to_string().characters(), scale));
window->set_title(String::format("%s %s %d%% - QuickShow", widget.path().characters(), widget.bitmap()->size().to_string().characters(), scale));
};

window->set_double_buffering_enabled(true);
Expand Down
2 changes: 1 addition & 1 deletion Applications/SoundPlayer/SoundPlayerWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void SoundPlayerWidget::open_file(String path)
m_play->set_enabled(true);
m_stop->set_enabled(true);

m_window.set_title(String::format("SoundPlayer - \"%s\"", loader->file()->filename().characters()));
m_window.set_title(String::format("%s - SoundPlayer", loader->file()->filename().characters()));
m_status->set_text(String::format(
"Sample rate %uHz, %u %s, %u bits per sample",
loader->sample_rate(),
Expand Down
2 changes: 1 addition & 1 deletion Applications/TextEditor/TextEditorWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,10 @@ void TextEditorWidget::set_path(const FileSystemPath& file)
void TextEditorWidget::update_title()
{
StringBuilder builder;
builder.append("Text Editor: ");
builder.append(m_path);
if (m_document_dirty)
builder.append(" (*)");
builder.append(" - Text Editor");
window()->set_title(builder.to_string());
}

Expand Down
2 changes: 1 addition & 1 deletion DevTools/Inspector/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int main(int argc, char** argv)

remote_process.on_update = [&] {
if (!remote_process.process_name().is_null())
window->set_title(String::format("Inspector: %s (%d)", remote_process.process_name().characters(), remote_process.pid()));
window->set_title(String::format("%s (%d) - Inspector", remote_process.process_name().characters(), remote_process.pid()));
};

auto& tree_view = splitter.add<GUI::TreeView>();
Expand Down
2 changes: 1 addition & 1 deletion Games/Solitaire/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main(int argc, char** argv)
window->set_rect(300, 100, SolitaireWidget::width, SolitaireWidget::height);

auto widget = SolitaireWidget::construct(window, [&](uint32_t score) {
window->set_title(String::format("Solitaire - Score: %u", score));
window->set_title(String::format("Score: %u - Solitaire", score));
});

auto menu_bar = make<GUI::MenuBar>();
Expand Down

0 comments on commit f347dd5

Please sign in to comment.