diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-10-02 19:54:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-10-02 19:54:42 +0800 |
commit | 09d4af6fff63dd112b8bb42087f14f7018e2f78c (patch) | |
tree | 991537a9ea1d8487334f6fb299098daf425f9db8 /mail/em-composer-prefs.c | |
parent | 79521efaeecfbaf717e465670fcd2724aea53578 (diff) | |
download | gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.gz gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.tar.zst gsoc2013-evolution-09d4af6fff63dd112b8bb42087f14f7018e2f78c.zip |
** Fixes bug #469657
2007-10-02 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #469657
* addressbook/importers/evolution-ldif-importer.c:
* calendar/gui/comp-editor-factory.c:
* composer/e-msg-composer.c:
* e-util/e-config-listener.c:
* mail/em-composer-prefs.c:
* mail/em-folder-tree-model.c:
* mail/em-format.c:
* mail/em-format-html.c:
* mail/em-migrate.c:
* mail/em-subscribe-editor.c:
* mail/mail-component.c:
* mail/mail-send-recv.c:
* mail/message-list.c:
* mail/importers/elm-importer.c:
* plugins/exchange-operations/exchange-folder-size-display.c:
* plugins/mono/mono-plugin.c:
* shell/e-shell-settings-dialog.c:
* tools/killev.c:
* widgets/table/e-table-extras.c:
* widgets/table/e-table-selection-model.c:
Use destroy functions in GHashTables to simplify memory management.
svn path=/trunk/; revision=34344
Diffstat (limited to 'mail/em-composer-prefs.c')
-rw-r--r-- | mail/em-composer-prefs.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 7805c8a61b..15944bad72 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -121,13 +121,10 @@ static void em_composer_prefs_init (EMComposerPrefs *prefs) { prefs->enabled_pixbuf = e_icon_factory_get_icon ("stock_mark", E_ICON_SIZE_MENU); - prefs->sig_hash = g_hash_table_new (g_direct_hash, g_direct_equal); -} - -static void -row_free (ESignature *sig, GtkTreeRowReference *row, gpointer user_data) -{ - gtk_tree_row_reference_free (row); + prefs->sig_hash = g_hash_table_new_full ( + g_direct_hash, g_direct_equal, + (GDestroyNotify) NULL, + (GDestroyNotify) gtk_tree_row_reference_free); } static void @@ -138,7 +135,6 @@ em_composer_prefs_finalise (GObject *obj) g_object_unref (prefs->gui); g_object_unref (prefs->enabled_pixbuf); - g_hash_table_foreach (prefs->sig_hash, (GHFunc) row_free, NULL); g_hash_table_destroy (prefs->sig_hash); G_OBJECT_CLASS (parent_class)->finalize (obj); @@ -241,11 +237,9 @@ signature_removed (ESignatureList *signatures, ESignature *sig, EMComposerPrefs if (!(row = g_hash_table_lookup (prefs->sig_hash, sig))) return; - g_hash_table_remove (prefs->sig_hash, sig); - model = gtk_tree_view_get_model (prefs->sig_list); path = gtk_tree_row_reference_get_path (row); - gtk_tree_row_reference_free (row); + g_hash_table_remove (prefs->sig_hash, sig); if (!gtk_tree_model_get_iter (model, &iter, path)) { gtk_tree_path_free (path); |