From 1ceb4a41b53fca9721a4a8221f31292393780e0a Mon Sep 17 00:00:00 2001 From: Conzer Date: Tue, 3 Dec 2024 13:49:06 -0500 Subject: [PATCH] vscode exploded what '-' --- src/jot.vala | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/jot.vala diff --git a/src/jot.vala b/src/jot.vala new file mode 100644 index 0000000..a0a253b --- /dev/null +++ b/src/jot.vala @@ -0,0 +1,44 @@ +using Gtk; +using Granite; + +public class Jot : Gtk.Application { + private Window main_window; + private Box main_box; + private ListBox notes_list; + private TextView editor; + private NoteManager note_manager; + + public static int main(string[] args) { + var jot = new Jot(); + return jot.run(args); + } + + public Jot() { + Object( + application_id: "app.hackclub.conzie.Jot", + flags: ApplicationFlags.FLAGS_NONE + ); + } + + protected override void activate() { + // Init the notemanager (see notemanager.vala) + note_manager = new NoteManager(); + note_manager.ensure_directory_exists(); + + main_window = new ApplicationWindow(this) { + title = "Jot", + default_width = 800, + default_height = 600 + }; + var header=new HeaderBar() { + show_close_button = true, + title = "Jot", + }; + var new_button = new Button.with_label("New Note"); + new_button.clicked.connect(create_new_note); + header.pack_start(new_button); + + var save_button = new Button.with_label("Save"); + save_button.click + } +} \ No newline at end of file