mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:27:45 +00:00
Spreadsheet: Show the opened filename in the window title
Prior to this commit, there was a set_filename() function that could set the window title, but actually it never did that. It was called only in one place -- by the 'Save as...' action, but it always failed to change anything, because there was a check that tried to reassign the same filename. :/ This patch: 1. removes that check, and therefore 2. renames the function to simply `update_window_title()`, 3. starts calling the function from more places (at startup and after loading a file), 4. changes the window title order (`{app_name} - {filename}` -> `{filename} - {app_name}`) to match the other applications style on the system. :^)
This commit is contained in:
parent
b59773de17
commit
dc65543fa9
3 changed files with 13 additions and 12 deletions
|
@ -27,7 +27,7 @@ public:
|
|||
|
||||
const String& current_filename() const { return m_workbook->current_filename(); }
|
||||
Sheet* current_worksheet_if_available() { return m_selected_view ? m_selected_view->sheet_if_available() : nullptr; }
|
||||
void set_filename(const String& filename);
|
||||
void update_window_title();
|
||||
|
||||
Workbook& workbook() { return *m_workbook; }
|
||||
const Workbook& workbook() const { return *m_workbook; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue