From 1301cf02efdacd20fb5ce3e2554ae15b8f146e8a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 25 Feb 2011 16:20:41 +0100 Subject: Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly --- widgets/misc/e-signature-combo-box.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'widgets/misc/e-signature-combo-box.c') diff --git a/widgets/misc/e-signature-combo-box.c b/widgets/misc/e-signature-combo-box.c index e24cb14b7a..63d0b53a8a 100644 --- a/widgets/misc/e-signature-combo-box.c +++ b/widgets/misc/e-signature-combo-box.c @@ -27,10 +27,6 @@ #include -#define E_SIGNATURE_COMBO_BOX_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_SIGNATURE_COMBO_BOX, ESignatureComboBoxPrivate)) - enum { COLUMN_STRING, COLUMN_SIGNATURE @@ -162,7 +158,7 @@ signature_combo_box_dispose (GObject *object) { ESignatureComboBoxPrivate *priv; - priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (object); + priv = E_SIGNATURE_COMBO_BOX (object)->priv; if (priv->signature_list != NULL) { g_signal_handlers_disconnect_by_func ( @@ -183,7 +179,7 @@ signature_combo_box_finalize (GObject *object) { ESignatureComboBoxPrivate *priv; - priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (object); + priv = E_SIGNATURE_COMBO_BOX (object)->priv; g_hash_table_destroy (priv->index); @@ -223,7 +219,7 @@ e_signature_combo_box_init (ESignatureComboBox *combo_box) (GDestroyNotify) g_object_unref, (GDestroyNotify) gtk_tree_row_reference_free); - combo_box->priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (combo_box); + combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box, E_TYPE_SIGNATURE_COMBO_BOX, ESignatureComboBoxPrivate); combo_box->priv->index = index; } @@ -252,7 +248,7 @@ e_signature_combo_box_set_signature_list (ESignatureComboBox *combo_box, if (signature_list != NULL) g_return_if_fail (E_IS_SIGNATURE_LIST (signature_list)); - priv = E_SIGNATURE_COMBO_BOX_GET_PRIVATE (combo_box); + priv = combo_box->priv; if (priv->signature_list != NULL) { g_signal_handlers_disconnect_by_func ( -- cgit