static void dispose (GObject *object) { AppletAgent *self = APPLET_AGENT (object); AppletAgentPrivate *priv = APPLET_AGENT_GET_PRIVATE (self); if (!priv->disposed) { GHashTableIter iter; Request *r; GSList *kiter; /* Mark any outstanding requests as canceled */ g_hash_table_iter_init (&iter, priv->requests); while (g_hash_table_iter_next (&iter, NULL, (gpointer) &r)) { r->canceled = TRUE; /* cancel the request's outstanding keyring operations */ for (kiter = r->keyring_calls; kiter; kiter = g_slist_next (kiter)) { KeyringCall *call = kiter->data; gnome_keyring_cancel_request (call->keyring_id); } } g_hash_table_destroy (priv->requests); priv->disposed = TRUE; } G_OBJECT_CLASS (applet_agent_parent_class)->dispose (object); }
static void dispose (GObject *object) { AppletAgent *self = APPLET_AGENT (object); AppletAgentPrivate *priv = APPLET_AGENT_GET_PRIVATE (self); if (!priv->disposed) { GHashTableIter iter; Request *r; /* Mark any outstanding requests as canceled */ g_hash_table_iter_init (&iter, priv->requests); while (g_hash_table_iter_next (&iter, NULL, (gpointer) &r)) g_cancellable_cancel (r->cancellable); g_hash_table_destroy (priv->requests); priv->disposed = TRUE; } G_OBJECT_CLASS (applet_agent_parent_class)->dispose (object); }