[anjuta] message-view: use g_type_class_add_private() to add private struct
- From: Carl-Anton Ingmarsson <carlantoni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] message-view: use g_type_class_add_private() to add private struct
- Date: Sun, 24 Feb 2013 18:25:35 +0000 (UTC)
commit 4580ef2cbd79aede525fdecaf08d091b4204b5d7
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Sun Feb 24 14:58:14 2013 +0100
message-view: use g_type_class_add_private() to add private struct
...instead of allocating it separately in anjuta_msgman_instance_init()
plugins/message-view/anjuta-msgman.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/message-view/anjuta-msgman.c b/plugins/message-view/anjuta-msgman.c
index 3c02172..2f264a5 100644
--- a/plugins/message-view/anjuta-msgman.c
+++ b/plugins/message-view/anjuta-msgman.c
@@ -221,8 +221,10 @@ anjuta_msgman_finalize (GObject *obj)
static void
anjuta_msgman_instance_init (AnjutaMsgman * msgman)
{
+ msgman->priv = G_TYPE_INSTANCE_GET_PRIVATE (msgman, ANJUTA_TYPE_MSGMAN,
+ AnjutaMsgmanPriv);
+
gtk_notebook_set_scrollable (GTK_NOTEBOOK (msgman), TRUE);
- msgman->priv = g_new0(AnjutaMsgmanPriv, 1);
msgman->priv->views = NULL;
msgman->priv->tab_popup = create_tab_popup_menu(msgman);
msgman->priv->tabber = anjuta_tabber_new (GTK_NOTEBOOK (msgman));
@@ -257,6 +259,9 @@ anjuta_msgman_class_init (AnjutaMsgmanClass * klass)
notebook_class->switch_page = anjuta_msgman_switch_page;
+ g_type_class_add_private (klass, sizeof (AnjutaMsgmanPriv));
+
+
/**
* AnjutaMsgMan::view-changed:
* @msgman: #AnjutaMsgMan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]