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



commit fcb047f7e6adc3b3f8ed88884b10847bee7e8d57
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 | 10 ++++++++--
 src/libbiji/biji-note-id.h |  2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/libbiji/biji-note-id.c b/src/libbiji/biji-note-id.c
index f495c50..90ecb5a 100644
--- a/src/libbiji/biji-note-id.c
+++ b/src/libbiji/biji-note-id.c
@@ -70,15 +70,21 @@ 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));
 
+  if (self->path)
+    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]