[gnome-notes/wip/igaldino/model-id-fix: 3/6] note-id: change set-path method scope to public



commit 54d433db0c239a8e335c8eea83eaa378b591a3d7
Author: Isaque Galdino <igaldino gmail com>
Date:   Tue Jul 2 19:28:57 2019 -0300

    note-id: change set-path method scope to public

 src/libbiji/biji-note-id.c | 9 +++++++--
 src/libbiji/biji-note-id.h | 2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/libbiji/biji-note-id.c b/src/libbiji/biji-note-id.c
index f495c50..a60c897 100644
--- a/src/libbiji/biji-note-id.c
+++ b/src/libbiji/biji-note-id.c
@@ -70,15 +70,20 @@ biji_note_id_finalize (GObject *object)
   G_OBJECT_CLASS (biji_note_id_parent_class)->finalize (object);
 }
 
-static void
-biji_note_id_set_path (BijiNoteID *self, const gchar *path)
+void
+biji_note_id_set_path (BijiNoteID *self,
+                       const char *path)
 {
   g_return_if_fail (BIJI_IS_NOTE_ID (self));
 
+  g_free (self->path);
+
   self->path = g_strdup (path);
+  g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PATH]);
 }
 
 
+
 static void
 biji_note_id_set_property  (GObject      *object,
                             guint         property_id,
diff --git a/src/libbiji/biji-note-id.h b/src/libbiji/biji-note-id.h
index e06c478..15e8482 100644
--- a/src/libbiji/biji-note-id.h
+++ b/src/libbiji/biji-note-id.h
@@ -35,6 +35,8 @@ gboolean          biji_note_id_equal                              (BijiNoteID *a
 
 const gchar      *biji_note_id_get_path                           (BijiNoteID *note);
 
+void              biji_note_id_set_path                           (BijiNoteID *self,
+                                                                   const char *path);
 
 void              biji_note_id_set_title                          (BijiNoteID* n, gchar* title);
 


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