diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-27 11:05:39 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-27 11:05:39 +0100 |
commit | 28720e90352185a42c9c2f9fd507d8207b3a8ab9 (patch) | |
tree | 8642dc74a74abfc28c8e1acba3f369790e48b870 /Userland | |
parent | 69d8ad52c497b56d316c4a142efc32883ad0d83d (diff) | |
download | serenity-28720e90352185a42c9c2f9fd507d8207b3a8ab9.zip |
TextEditor: Rename open_sesame() => open_file()
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/TextEditor/TextEditorWidget.cpp | 6 | ||||
-rw-r--r-- | Userland/Applications/TextEditor/TextEditorWidget.h | 2 | ||||
-rw-r--r-- | Userland/Applications/TextEditor/main.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/TextEditor/TextEditorWidget.cpp b/Userland/Applications/TextEditor/TextEditorWidget.cpp index 7883508851..6e7a6ae79e 100644 --- a/Userland/Applications/TextEditor/TextEditorWidget.cpp +++ b/Userland/Applications/TextEditor/TextEditorWidget.cpp @@ -305,7 +305,7 @@ TextEditorWidget::TextEditorWidget() return; } - open_sesame(open_path.value()); + open_file(open_path.value()); }); m_save_as_action = GUI::CommonActions::make_save_as_action([&](auto&) { @@ -582,7 +582,7 @@ void TextEditorWidget::update_title() window()->set_title(builder.to_string()); } -void TextEditorWidget::open_sesame(const String& path) +void TextEditorWidget::open_file(const String& path) { auto file = Core::File::construct(path); if (!file->open(Core::IODevice::ReadOnly) && file->error() != ENOENT) { @@ -629,7 +629,7 @@ void TextEditorWidget::drop_event(GUI::DropEvent& event) GUI::MessageBox::show(window(), "TextEditor can only open one file at a time!", "One at a time please!", GUI::MessageBox::Type::Error); return; } - open_sesame(urls.first().path()); + open_file(urls.first().path()); } } diff --git a/Userland/Applications/TextEditor/TextEditorWidget.h b/Userland/Applications/TextEditor/TextEditorWidget.h index f544bf8937..41dbb80973 100644 --- a/Userland/Applications/TextEditor/TextEditorWidget.h +++ b/Userland/Applications/TextEditor/TextEditorWidget.h @@ -40,7 +40,7 @@ class TextEditorWidget final : public GUI::Widget { C_OBJECT(TextEditorWidget) public: virtual ~TextEditorWidget() override; - void open_sesame(const String& path); + void open_file(const String& path); bool request_close(); GUI::TextEditor& editor() { return *m_editor; } diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp index 1ecf4401f3..676c4dfa4e 100644 --- a/Userland/Applications/TextEditor/main.cpp +++ b/Userland/Applications/TextEditor/main.cpp @@ -83,7 +83,7 @@ int main(int argc, char** argv) } if (file_to_edit) - text_widget.open_sesame(file_to_edit); + text_widget.open_file(file_to_edit); else text_widget.update_title(); |