[ghex] hex-doc: async: emit file-saved signal on successful save



commit 533f14ff2850d89a55df329e3b09089668b921aa
Author: Logan Rathbone <poprocks gmail com>
Date:   Thu Jun 16 19:04:36 2022 -0400

    hex-doc: async: emit file-saved signal on successful save

 src/hex-document.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/hex-document.c b/src/hex-document.c
index 854d989..907ad4c 100644
--- a/src/hex-document.c
+++ b/src/hex-document.c
@@ -877,6 +877,7 @@ write_ready_cb (GObject *source_object,
 {
        HexBuffer *buf = HEX_BUFFER(source_object);
        GTask *doc_task = G_TASK(user_data);
+       HexDocument *doc = g_task_get_source_object (doc_task);
        gboolean success;
        GError *local_error = NULL;
 
@@ -885,6 +886,8 @@ write_ready_cb (GObject *source_object,
 
        if (success)
        {
+               doc->changed = FALSE;
+               g_signal_emit (doc, hex_signals[FILE_SAVED], 0);
                g_task_return_boolean (doc_task, TRUE);
        }
        else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]