mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-25 19:02:07 -05:00
TextEditor: Initialize menubar before opening initial file
Otherwise we can't toggle the syntax highlighting actions based on the opened file (since the actions have not been created yet.)
This commit is contained in:
parent
28720e9035
commit
6817d0701e
1 changed files with 4 additions and 4 deletions
|
@ -82,15 +82,15 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
text_widget.initialize_menubar(menubar);
|
||||
app->set_menubar(menubar);
|
||||
|
||||
if (file_to_edit)
|
||||
text_widget.open_file(file_to_edit);
|
||||
else
|
||||
text_widget.update_title();
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
text_widget.initialize_menubar(menubar);
|
||||
app->set_menubar(menubar);
|
||||
|
||||
window->show();
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue