[anjuta] document-manager: don't allocate AnjutaDocmanPriv ourselves
- From: Carl-Anton Ingmarsson <carlantoni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] document-manager: don't allocate AnjutaDocmanPriv ourselves
- Date: Wed, 10 Apr 2013 21:41:00 +0000 (UTC)
commit 9afaac5a09ccdaf9304b4e0e83c936d8cd8067ec
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Wed Apr 10 23:24:32 2013 +0200
document-manager: don't allocate AnjutaDocmanPriv ourselves
Instead we register it as a private structure using g_type_class_add_private().
plugins/document-manager/anjuta-docman.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/plugins/document-manager/anjuta-docman.c b/plugins/document-manager/anjuta-docman.c
index f88e20d..e861659 100644
--- a/plugins/document-manager/anjuta-docman.c
+++ b/plugins/document-manager/anjuta-docman.c
@@ -1065,7 +1065,8 @@ anjuta_docman_instance_init (AnjutaDocman *docman)
GtkCellRenderer *cell;
GtkWidget *close_image, *close_button;
- docman->priv = g_new0 (AnjutaDocmanPriv, 1);
+ docman->priv = G_TYPE_INSTANCE_GET_PRIVATE (docman, ANJUTA_TYPE_DOCMAN,
+ AnjutaDocmanPriv);
docman->priv->combo_model = gtk_list_store_new (2, G_TYPE_OBJECT, G_TYPE_STRING);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (docman->priv->combo_model), 1,
@@ -1133,7 +1134,9 @@ anjuta_docman_class_init (AnjutaDocmanClass *klass)
object_class->finalize = anjuta_docman_finalize;
object_class->dispose = anjuta_docman_dispose;
- /* Signals */
+ g_type_class_add_private (klass, sizeof(AnjutaDocmanPriv));
+
+ /* Signals */
docman_signals [DOC_ADDED] =
g_signal_new ("document-added",
ANJUTA_TYPE_DOCMAN,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]