[gnome-notes/wip/igaldino/model-id-fix: 7/8] note-obj: remove extra note-id from children
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-notes/wip/igaldino/model-id-fix: 7/8] note-obj: remove extra note-id from children
- Date: Sat, 10 Aug 2019 01:14:04 +0000 (UTC)
commit da476c34b3daeb91d870f7277b4e23470e3f89fa
Author: Isaque Galdino <igaldino gmail com>
Date: Tue Jul 2 19:39:12 2019 -0300
note-obj: remove extra note-id from children
src/libbiji/provider/biji-memo-note.c | 27 +--------------------------
src/libbiji/provider/biji-own-cloud-note.c | 6 ++----
2 files changed, 3 insertions(+), 30 deletions(-)
---
diff --git a/src/libbiji/provider/biji-memo-note.c b/src/libbiji/provider/biji-memo-note.c
index a02f30d..5a60bfe 100644
--- a/src/libbiji/provider/biji-memo-note.c
+++ b/src/libbiji/provider/biji-memo-note.c
@@ -26,7 +26,6 @@ struct _BijiMemoNotePrivate
ECalComponent *ecal;
ECalClient *client;
const gchar *description;
- BijiNoteID *id;
};
@@ -222,28 +221,6 @@ memo_note_save (BijiNoteObj *note)
}
}
-
-/* Save title when saving note.
- * No need to do anything here */
-static void
-on_title_changed_cb (BijiMemoNote *self)
-{
-}
-
-
-
-static void
-biji_memo_note_constructed (GObject *obj)
-{
- BijiMemoNote *self = BIJI_MEMO_NOTE (obj);
-
- G_OBJECT_CLASS (biji_memo_note_parent_class)->constructed (obj);
-
- g_signal_connect_swapped (self->priv->id, "notify::title",
- G_CALLBACK (on_title_changed_cb), self);
-}
-
-
static void
biji_memo_note_init (BijiMemoNote *biji_memo_note)
{
@@ -423,7 +400,6 @@ biji_memo_note_class_init (BijiMemoNoteClass *klass)
note_class = BIJI_NOTE_OBJ_CLASS (klass);
object_class->finalize = biji_memo_note_finalize;
- object_class->constructed = biji_memo_note_constructed;
object_class->get_property = biji_memo_note_get_property;
object_class->set_property = biji_memo_note_set_property;
@@ -476,10 +452,9 @@ biji_memo_note_new_from_info (BijiMemoProvider *provider,
ret = g_object_new (BIJI_TYPE_MEMO_NOTE,
"manager", manager,
"id", id,
- "ecal", component,
+ "ecal", component,
NULL);
- ret->priv->id = id;
ret->priv->provider = BIJI_PROVIDER (provider);
ret->priv->description = description;
ret->priv->client = client;
diff --git a/src/libbiji/provider/biji-own-cloud-note.c b/src/libbiji/provider/biji-own-cloud-note.c
index 98e91ea..ff70907 100644
--- a/src/libbiji/provider/biji-own-cloud-note.c
+++ b/src/libbiji/provider/biji-own-cloud-note.c
@@ -33,7 +33,6 @@ struct _BijiOwnCloudNote
{
BijiNoteObj parent_instance;
BijiOwnCloudProvider *prov;
- BijiNoteID *id;
GFile *location;
gchar *basename;
@@ -153,7 +152,7 @@ ocloud_note_set_id (BijiOwnCloudNote *self)
key = g_strdup_printf ("%s/%s",
biji_own_cloud_provider_get_readable_path (self->prov),
self->basename);
- g_object_set (self->id, "path", key, NULL);
+ biji_note_obj_set_path (BIJI_NOTE_OBJ (self), key);
}
static void
@@ -295,7 +294,7 @@ on_title_change (BijiOwnCloudNote *self)
g_return_if_fail (BIJI_IS_OWN_CLOUD_NOTE (self));
g_free (self->basename);
- new_title = biji_note_id_get_title (self->id);
+ new_title = biji_note_obj_get_title (BIJI_NOTE_OBJ (self));
self->basename = g_strdup_printf ("%s.txt", new_title);
self->needs_rename = TRUE;
}
@@ -441,7 +440,6 @@ BijiNoteObj *biji_own_cloud_note_new_from_info (BijiOwnCloudPro
NULL);
ocloud = BIJI_OWN_CLOUD_NOTE (retval);
- ocloud->id = id;
ocloud->prov = prov;
biji_note_obj_set_create_date (retval, info->created);
g_signal_connect_swapped (id, "notify::title",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]