From fb377338a5721e0fbd9aed4b858c31233185f5ac Mon Sep 17 00:00:00 2001 From: Marius Meisenzahl Date: Sat, 1 Jan 2022 18:54:19 +0100 Subject: [PATCH 1/2] CodecardController: Fix autosave --- src/Controllers/CodecardController.vala | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Controllers/CodecardController.vala b/src/Controllers/CodecardController.vala index a8d1676..fa116e6 100644 --- a/src/Controllers/CodecardController.vala +++ b/src/Controllers/CodecardController.vala @@ -38,19 +38,12 @@ public class Controllers.CodecardController { public void save () { if (settings.autosave) { - var file = new Gtk.SourceFile (); - try { if (!model.directory.query_exists ()) { model.directory.make_directory_with_parents (); } - file.location = model.file; - - if (file != null && !file.is_readonly ()) { - var file_saver = new Gtk.SourceFileSaver (model.buffer as Gtk.SourceBuffer, file); - file_saver.save_async.begin (Priority.DEFAULT, null, null); - } + FileUtils.set_contents (model.file.get_path (), model.buffer.text); } catch (Error e) { stderr.printf ("Could not autosave: %s\n", e.message); } From 68bb5a7cf619ff0a24973f0ac5859bf08543316e Mon Sep 17 00:00:00 2001 From: Marius Meisenzahl Date: Sat, 1 Jan 2022 18:58:48 +0100 Subject: [PATCH 2/2] Update version --- data/com.manexim.codecard.appdata.xml.in | 17 +++++++++++++++++ meson.build | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/data/com.manexim.codecard.appdata.xml.in b/data/com.manexim.codecard.appdata.xml.in index 67fec5b..e0cb878 100644 --- a/data/com.manexim.codecard.appdata.xml.in +++ b/data/com.manexim.codecard.appdata.xml.in @@ -16,6 +16,23 @@ com.manexim.codecard + + +

New:

+
    +
+

Improved:

+
    +
+

Fixed:

+
    +
  • Fix for autosave
  • +
+

Translations:

+
    +
+
+

Initial release

diff --git a/meson.build b/meson.build index 9674cbe..3a06a26 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('com.manexim.codecard', 'vala', 'c', version: '1.0.0') +project('com.manexim.codecard', 'vala', 'c', version: '1.0.1') # Include the translations module i18n = import('i18n')