Compare commits

...

5 Commits

Author SHA1 Message Date
Nefo Fortressia 60fc36c852
chore: migrate issue and PR templates to Gitea format
Also add metadata to the issues and the PR template.

GitLab doesn't use file-based configuration for the PR template,
so the template is added here.

See https://docs.gitea.io/en-us/issue-pull-request-templates/
2021-12-28 10:31:15 +07:00
Nefo Fortressia 4a152416ff
feat: implement creating a new file
Merge branch 'feat/new-file' from
https://gitea.treehouse.systems/fortressia/echidna.git

See #20
2021-12-28 08:59:21 +07:00
Nefo Fortressia 319bc3914b
Merge branch 'main' into feat/new-file 2021-12-28 08:55:01 +07:00
Nefo Fortressia 87fdfc8d9c
feat: implement win.new-file action 2021-11-14 10:29:51 +07:00
Nefo Fortressia 0bd8b34cfe
Merge branch 'refactor/exports' into feat/new-file 2021-11-14 10:05:59 +07:00
5 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# Description
Please write down a clear and concise description of this Merge Request.
# Closes
Please write down the issues that this MR closes.
# Implementation Insight
Please write down how did you implement this in a clear and concise manner.
# TO-DOs
A list of TO-DOs of things you have did before the MR is undrafted.

View File

@ -1,3 +1,15 @@
---
name: Bug Report
about: Report a bug affecting Echidna Code Editor
title: bug:
ref: main
labels:
- bug
- help needed
---
## Description
Please write a clear and concise description of the issue you are getting.

View File

@ -1,3 +1,15 @@
---
name: Feature Request
about: Request a new feature or support that can be implemented into Echidna.
title: "feat: "
ref: main
labels:
- enhancement
---
## Description
Please write a clear and concise description of the issue you are getting.

View File

@ -14,6 +14,7 @@ pub trait FileImplementedEditor {
fn action_open_file(&self);
fn open_file(notebook: &gtk::Notebook, file: gio::File);
fn action_save_file_as(&self);
fn action_new_file(&self);
fn action_save_file(&self);
}
@ -102,6 +103,14 @@ impl FileImplementedEditor for super::EchidnaWindow {
}));
}
fn action_new_file(&self) {
let editor_page = EchidnaCoreEditor::new(None);
self.to_imp()
.notebook
.prepend_closable_page(&editor_page, Some(&gtk::Label::new(Some(&"Untitled"))));
}
fn action_save_file(&self) {
let page: EchidnaCoreEditor = self
.get_current_tab()

View File

@ -122,6 +122,16 @@ impl MenubarImplementedEditor for EchidnaWindow {
window.action_save_file_as();
}));
}
{
let action_new_file = SimpleAction::new("new-file", None);
self.add_action(&action_new_file);
action_new_file.connect_activate(clone!(@weak self as window =>
move |_action, _variant| {
window.action_new_file();
}));
}
{
let action_save = SimpleAction::new("save", None);