aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-10-02 19:54:42 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-10-02 19:54:42 +0800
commit09d4af6fff63dd112b8bb42087f14f7018e2f78c (patch)
tree991537a9ea1d8487334f6fb299098daf425f9db8 /calendar/gui
parent79521efaeecfbaf717e465670fcd2724aea53578 (diff)
downloadgsoc2013-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 'calendar/gui')
-rw-r--r--calendar/gui/comp-editor-factory.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index 95216604c8..dd508987d4 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -129,18 +129,6 @@ comp_editor_factory_class_init (CompEditorFactoryClass *class)
object_class->finalize = comp_editor_factory_finalize;
}
-/* Object initialization function for the component editor factory */
-static void
-comp_editor_factory_init (CompEditorFactory *factory)
-{
- CompEditorFactoryPrivate *priv;
-
- priv = g_new (CompEditorFactoryPrivate, 1);
- factory->priv = priv;
-
- priv->uri_client_hash = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
/* Frees a Request structure */
static void
free_request (Request *r)
@@ -175,14 +163,19 @@ free_client (OpenClient *oc)
g_free (oc);
}
-/* Used from g_hash_table_foreach(); frees a client structure */
+/* Object initialization function for the component editor factory */
static void
-free_client_cb (gpointer key, gpointer value, gpointer data)
+comp_editor_factory_init (CompEditorFactory *factory)
{
- OpenClient *oc;
+ CompEditorFactoryPrivate *priv;
+
+ priv = g_new (CompEditorFactoryPrivate, 1);
+ factory->priv = priv;
- oc = value;
- free_client (oc);
+ priv->uri_client_hash = g_hash_table_new_full (
+ g_str_hash, g_str_equal,
+ (GDestroyNotify) NULL,
+ (GDestroyNotify) free_client);
}
/* Destroy handler for the component editor factory */
@@ -198,7 +191,6 @@ comp_editor_factory_finalize (GObject *object)
factory = COMP_EDITOR_FACTORY (object);
priv = factory->priv;
- g_hash_table_foreach (priv->uri_client_hash, free_client_cb, NULL);
g_hash_table_destroy (priv->uri_client_hash);
priv->uri_client_hash = NULL;
@@ -232,7 +224,6 @@ editor_destroy_cb (GtkObject *object, gpointer data)
return;
g_hash_table_remove (priv->uri_client_hash, oc->uri);
- free_client (oc);
}
/* Starts editing an existing component on a client that is already open */
@@ -442,7 +433,6 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer data)
gtk_widget_destroy (dialog);
g_hash_table_remove (priv->uri_client_hash, oc->uri);
- free_client (oc);
}
/* Creates a new OpenClient structure and queues the component editing/creation