diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2004-10-12 02:58:44 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2004-10-12 02:58:44 +0800 |
commit | d86c247a2ee0546f11ebe8cb762e782cca287a35 (patch) | |
tree | 777d62ec336061ac7fa0916ed0868487300a43d1 | |
parent | bab4ad240f77663e1b9b8707fcc2ecaf30ca091a (diff) | |
download | gsoc2013-evolution-d86c247a2ee0546f11ebe8cb762e782cca287a35.tar gsoc2013-evolution-d86c247a2ee0546f11ebe8cb762e782cca287a35.tar.gz gsoc2013-evolution-d86c247a2ee0546f11ebe8cb762e782cca287a35.tar.bz2 gsoc2013-evolution-d86c247a2ee0546f11ebe8cb762e782cca287a35.tar.lz gsoc2013-evolution-d86c247a2ee0546f11ebe8cb762e782cca287a35.tar.xz gsoc2013-evolution-d86c247a2ee0546f11ebe8cb762e782cca287a35.tar.zst gsoc2013-evolution-d86c247a2ee0546f11ebe8cb762e782cca287a35.zip |
Don't unref the view - removing it from the hash table will do this for
2004-10-11 Hans Petter Jansson <hpj@ximian.com>
* gui/component/addressbook-view.c (source_list_changed_cb): Don't
unref the view - removing it from the hash table will do this for us.
Remove from hash table after removing the notebook page.
(addressbook_view_init): Unref views when removed from the hash
table.
svn path=/trunk/; revision=27539
-rw-r--r-- | addressbook/ChangeLog | 8 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-view.c | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 5015a9d2f0..25830df7b8 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,11 @@ +2004-10-11 Hans Petter Jansson <hpj@ximian.com> + + * gui/component/addressbook-view.c (source_list_changed_cb): Don't + unref the view - removing it from the hash table will do this for us. + Remove from hash table after removing the notebook page. + (addressbook_view_init): Unref views when removed from the hash + table. + 2004-10-06 Not Zed <NotZed@Ximian.com> * gui/component/addressbook-view.c (popup_event_callback): diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c index 61a219f62e..0a51af0c43 100644 --- a/addressbook/gui/component/addressbook-view.c +++ b/addressbook/gui/component/addressbook-view.c @@ -498,11 +498,10 @@ source_list_changed_cb (ESourceList *source_list, AddressbookView *view) view remove it from our hash table. */ v = g_hash_table_lookup (priv->uid_to_view, uid); - g_hash_table_remove (priv->uid_to_view, uid); gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook), GTK_WIDGET (v))); - g_object_unref (v); + g_hash_table_remove (priv->uid_to_view, uid); } } g_list_free (uids); @@ -1067,7 +1066,7 @@ addressbook_view_init (AddressbookView *view) priv->gconf_client = addressbook_component_peek_gconf_client (addressbook_component_peek ()); - priv->uid_to_view = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, NULL); + priv->uid_to_view = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_object_unref); priv->uid_to_editor = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_free); priv->notebook = gtk_notebook_new (); |