[balsa] mailbox-node: Use parent-class set by macro
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] mailbox-node: Use parent-class set by macro
- Date: Mon, 29 Jul 2019 19:57:29 +0000 (UTC)
commit eb53a71c153951c719184bef92e729acd4c68aa2
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Mon Jul 29 15:56:29 2019 -0400
mailbox-node: Use parent-class set by macro
Use parent-class set by G_DEFINE_TYPE instead of our own
variable
* src/mailbox-node.c (balsa_mailbox_node_class_init),
(balsa_mailbox_node_dispose), (balsa_mailbox_node_finalize):
ChangeLog | 8 ++++++++
src/mailbox-node.c | 7 ++-----
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a2ba653dd..272579f77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-07-29 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Use parent-class set by G_DEFINE_TYPE instead of our own
+ variable
+
+ * src/mailbox-node.c (balsa_mailbox_node_class_init),
+ (balsa_mailbox_node_dispose), (balsa_mailbox_node_finalize):
+
2019-07-29 Peter Bloomfield <pbloomfield bellsouth net>
rfc2445: Use GDateTime instead of GTimeVal, which is deprecated
diff --git a/src/mailbox-node.c b/src/mailbox-node.c
index 56ecd3fbf..01309321c 100644
--- a/src/mailbox-node.c
+++ b/src/mailbox-node.c
@@ -41,7 +41,6 @@
Folders can additionally scan associated directory or IMAP server to
retrieve their tree of mailboxes.
*/
-static GObjectClass *parent_class = NULL;
typedef struct imap_scan_item_ imap_scan_item;
struct imap_scan_item_ {
@@ -116,8 +115,6 @@ balsa_mailbox_node_class_init(BalsaMailboxNodeClass * klass)
{
GObjectClass *object_class;
- parent_class = g_type_class_peek_parent(klass);
-
object_class = G_OBJECT_CLASS(klass);
balsa_mailbox_node_signals[SAVE_CONFIG] =
@@ -187,7 +184,7 @@ balsa_mailbox_node_dispose(GObject * object)
mn->mailbox = NULL;
}
- G_OBJECT_CLASS(parent_class)->dispose(object);
+ G_OBJECT_CLASS(balsa_mailbox_node_parent_class)->dispose(object);
}
static void
@@ -210,7 +207,7 @@ balsa_mailbox_node_finalize(GObject * object)
mn->server = NULL;
}
- G_OBJECT_CLASS(parent_class)->finalize(G_OBJECT(object));
+ G_OBJECT_CLASS(balsa_mailbox_node_parent_class)->finalize(G_OBJECT(object));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]