mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
GTextEditor: Add write_to_file(String path) :^)
This commit is contained in:
parent
a5bc20c733
commit
187d7cb400
3 changed files with 40 additions and 2 deletions
|
@ -66,8 +66,9 @@ int main(int argc, char** argv)
|
|||
dbgprintf("FIXME: Implement File/Open");
|
||||
});
|
||||
|
||||
auto save_action = GAction::create("Save document", { Mod_Ctrl, Key_S }, GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/save16.rgb", { 16, 16 }), [] (const GAction&) {
|
||||
dbgprintf("FIXME: Implement File/Save");
|
||||
auto save_action = GAction::create("Save document", { Mod_Ctrl, Key_S }, GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/save16.rgb", { 16, 16 }), [&] (const GAction&) {
|
||||
dbgprintf("Writing document to '%s'\n", path.characters());
|
||||
text_editor->write_to_file(path);
|
||||
});
|
||||
|
||||
auto menubar = make<GMenuBar>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue