aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2004-05-04 09:51:20 +0800
committerHans Petter <hansp@src.gnome.org>2004-05-04 09:51:20 +0800
commit3fc532ba3c45bfd87b82f095668549de57bee818 (patch)
tree1d116f9d8819591c7214f58da84cb226eb1c1d93 /addressbook/gui
parent5e64711ac811e291e81a85c9071ee0270c7a1761 (diff)
downloadgsoc2013-evolution-3fc532ba3c45bfd87b82f095668549de57bee818.tar.gz
gsoc2013-evolution-3fc532ba3c45bfd87b82f095668549de57bee818.tar.zst
gsoc2013-evolution-3fc532ba3c45bfd87b82f095668549de57bee818.zip
Do ref, unref in right order, so the same contact can be set twice without
2004-05-03 Hans Petter Jansson <hpj@ximian.com> * gui/widgets/e-minicard.c (e_minicard_set_property): Do ref, unref in right order, so the same contact can be set twice without ill effects. (e_minicard_finalize): NULL pointers after unreffing their objects. svn path=/trunk/; revision=25775
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/widgets/e-minicard.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index e49b162fc1..bffe91e49e 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -288,6 +288,7 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
{
GnomeCanvasItem *item;
EMinicard *e_minicard;
+ EContact *contact;
GList *l;
item = GNOME_CANVAS_ITEM (object);
@@ -338,11 +339,15 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
set_has_cursor (e_minicard, g_value_get_boolean (value));
break;
case PROP_CONTACT:
+ contact = E_CONTACT (g_value_get_object (value));
+ if (contact)
+ g_object_ref (contact);
+
if (e_minicard->contact)
g_object_unref (e_minicard->contact);
- e_minicard->contact = E_CONTACT(g_value_get_object (value));
- if (e_minicard->contact)
- g_object_ref (e_minicard->contact);
+
+ e_minicard->contact = contact;
+
remodel(e_minicard);
e_canvas_item_request_reflow(item);
e_minicard->changed = FALSE;
@@ -425,11 +430,15 @@ e_minicard_finalize (GObject *object)
e_minicard = E_MINICARD (object);
- if (e_minicard->contact)
+ if (e_minicard->contact) {
g_object_unref (e_minicard->contact);
+ e_minicard->contact = NULL;
+ }
- if (e_minicard->list_icon_pixbuf)
+ if (e_minicard->list_icon_pixbuf) {
g_object_unref (e_minicard->list_icon_pixbuf);
+ e_minicard->list_icon_pixbuf = NULL;
+ }
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
title='2005-11-09 15:48:19 +0800'>2005-11-091-1/+1 * - Reset long term unresponsive maintainerpav2005-07-201-1/+1 * - Add optional patch that changes smbclient invocation to match argumentspav2005-07-202-0/+16 * - Fix pkg-plistsem2005-02-142-11/+15 * Add size data, approved by maintainers.trevor2004-03-191-0/+1 * Date: Wed, 10 Mar 2004 23:30:56 -0800 (PST)edwin2004-03-121-1/+1 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-041-0/+1 * Remove USE_GNOMENG.marcus2003-04-211-1/+0 * De-pkg-comment.knu2003-02-212-1/+1 * Maintainer asked for modification of master_site.edwin2002-12-111-1/+1 * Deploy USE_GNOMENG infrastructurelioux2002-09-031-1/+2 * Enforce X(1) recommendation about X11 naming in some pkg-{descr,comment}olgeni2001-02-012-2/+2