From e2d8a70eee3c1866630112800400e1429083d9e8 Mon Sep 17 00:00:00 2001 From: Artem Garmash Date: Sun, 14 Feb 2010 23:51:29 +0200 Subject: [PATCH] Don't resize sender name from dispose --- src/el-home-applet.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/el-home-applet.c b/src/el-home-applet.c index 6254576..930b474 100644 --- a/src/el-home-applet.c +++ b/src/el-home-applet.c @@ -720,7 +720,7 @@ contacts_added (OssoABookRoster *roster, } static void -reset_contact (ELHomeApplet *self) +reset_contact (ELHomeApplet *self, gboolean resize) { ELHomeAppletPrivate *priv = self->priv; @@ -742,7 +742,8 @@ reset_contact (ELHomeApplet *self) priv->contact = NULL; } - resize_sender (priv); + if (resize) + resize_sender (priv); } static void @@ -759,13 +760,13 @@ contacts_removed (OssoABookRoster *roster, for (contact_id = ids; *contact_id; contact_id++) { if (strcmp (*contact_id, priv->contact_id) == 0) { - reset_contact (self); + reset_contact (self, TRUE); gtk_widget_queue_draw (GTK_WIDGET (self)); return; } if (strcmp (*contact_id, uid) == 0) { - reset_contact (self); + reset_contact (self, TRUE); resolve_contact (self); gtk_widget_queue_draw (GTK_WIDGET (self)); return; @@ -775,11 +776,11 @@ contacts_removed (OssoABookRoster *roster, } static void -clean_contact (ELHomeApplet *self) +clean_contact (ELHomeApplet *self, gboolean resize) { ELHomeAppletPrivate *priv = self->priv; - reset_contact (self); + reset_contact (self, resize); if (priv->aggregator) { if (priv->aggregator_ready_closure){ @@ -852,7 +853,7 @@ dispose (GObject *self) } clean_state (EL_HOME_APPLET (self)); - clean_contact (EL_HOME_APPLET (self)); + clean_contact (EL_HOME_APPLET (self), FALSE); G_OBJECT_CLASS (el_home_applet_parent_class)->dispose (self); } @@ -1222,7 +1223,7 @@ read_event (ELHomeApplet *self) if (g_strcmp0 (priv->remote_id, remote_id) || new_account || !priv->contact) { - clean_contact (self); + clean_contact (self, TRUE); start_aggregator (self); } else if (priv->contact) { @@ -1287,7 +1288,7 @@ read_event (ELHomeApplet *self) dgettext ("rtcom-messaging-ui", "messaging_ap_conversations")); - clean_contact (self); + clean_contact (self, TRUE); gtk_widget_hide (priv->icon); } -- 1.7.9.5