aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-activity-client.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-07-28 01:47:19 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-07-28 01:47:19 +0800
commitc3ccc6c5476928a2581888aaca63fa289f5f9f37 (patch)
tree2d3e89dd8b30f8372c6e2feaa386a7b562e95501 /shell/evolution-activity-client.c
parent1f5b5429ebefd67bc0449f0b48670db427975156 (diff)
downloadgsoc2013-evolution-c3ccc6c5476928a2581888aaca63fa289f5f9f37.tar.gz
gsoc2013-evolution-c3ccc6c5476928a2581888aaca63fa289f5f9f37.tar.zst
gsoc2013-evolution-c3ccc6c5476928a2581888aaca63fa289f5f9f37.zip
Remove the source for the timeout *before* invoking the CORBA method, as
* evolution-activity-client.c (impl_destroy): Remove the source for the timeout *before* invoking the CORBA method, as we might get the timeout callback while invoking the CORBA method, thus screwing things up. * evolution-shell-component-client.c (destroy_listener_interface): New helper function. (dispatch_callback): Use it. (impl_destroy): Call it when destroying the listener interface instead of just freeing the servant. svn path=/trunk/; revision=11452
Diffstat (limited to 'shell/evolution-activity-client.c')
-rw-r--r--shell/evolution-activity-client.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/shell/evolution-activity-client.c b/shell/evolution-activity-client.c
index 60e9f949d9..3846719cc7 100644
--- a/shell/evolution-activity-client.c
+++ b/shell/evolution-activity-client.c
@@ -77,6 +77,9 @@ struct _EvolutionActivityClientPrivate {
};
+#define DEBUG() g_print ("*** ActivityClient: %s %p [%ld]\n", __FUNCTION__, activity_client, (long) pthread_self ())
+
+
/* Utility functions. */
/* Create an icon from @pixbuf in @icon_return. */
@@ -188,6 +191,8 @@ update_timeout_callback (void *data)
activity_client = EVOLUTION_ACTIVITY_CLIENT (data);
priv = activity_client->priv;
+ DEBUG ();
+
if (priv->have_pending_update) {
corba_update_progress (activity_client, priv->new_information, priv->new_progress);
priv->have_pending_update = FALSE;
@@ -233,6 +238,14 @@ impl_destroy (GtkObject *object)
activity_client = EVOLUTION_ACTIVITY_CLIENT (object);
priv = activity_client->priv;
+ DEBUG ();
+
+ if (priv->next_update_timeout_id != 0)
+ g_source_remove (priv->next_update_timeout_id);
+
+ g_print ("*** ActivityClient: g_source_remove %d %p [%ld]\n",
+ priv->next_update_timeout_id, activity_client, (long) pthread_self ());
+
CORBA_exception_init (&ev);
if (! CORBA_Object_is_nil (priv->activity_interface, &ev)) {
@@ -248,9 +261,6 @@ impl_destroy (GtkObject *object)
CORBA_exception_free (&ev);
- if (priv->next_update_timeout_id != 0)
- g_source_remove (priv->next_update_timeout_id);
-
g_free (priv->new_information);
g_free (priv);
@@ -294,6 +304,8 @@ init (EvolutionActivityClient *activity_client)
{
EvolutionActivityClientPrivate *priv;
+ DEBUG ();
+
priv = g_new (EvolutionActivityClientPrivate, 1);
priv->activity_interface = CORBA_OBJECT_NIL;
priv->listener = bonobo_listener_new (listener_callback, activity_client);
@@ -330,6 +342,8 @@ evolution_activity_client_construct (EvolutionActivityClient *activity_client,
g_return_val_if_fail (information != NULL, FALSE);
g_return_val_if_fail (suggest_display_return != NULL, FALSE);
+ DEBUG ();
+
priv = activity_client->priv;
g_return_val_if_fail (priv->activity_interface == CORBA_OBJECT_NIL, FALSE);
@@ -384,6 +398,8 @@ evolution_activity_client_new (EvolutionShellClient *shell_client,
activity_client = gtk_type_new (evolution_activity_client_get_type ());
+ DEBUG ();
+
if (! evolution_activity_client_construct (activity_client,
shell_client,
component_id,
@@ -412,6 +428,8 @@ evolution_activity_client_update (EvolutionActivityClient *activity_client,
g_return_val_if_fail (information != NULL, FALSE);
g_return_val_if_fail (progress >= 0.0 && progress <= 1.0, FALSE);
+ DEBUG ();
+
priv = activity_client->priv;
if (priv->next_update_timeout_id == 0) {
@@ -427,6 +445,9 @@ evolution_activity_client_update (EvolutionActivityClient *activity_client,
update_timeout_callback,
activity_client);
+ g_print ("*** ActivityClient: g_timeout_add %d %p [%ld]\n",
+ priv->next_update_timeout_id, activity_client, (long) pthread_self ());
+
priv->have_pending_update = FALSE;
} else {
/* There is a pending timeout, so the last CORBA update
@@ -446,17 +467,19 @@ evolution_activity_client_update (EvolutionActivityClient *activity_client,
}
GNOME_Evolution_Activity_DialogAction
-evolution_activity_client_request_dialog (EvolutionActivityClient *client,
+evolution_activity_client_request_dialog (EvolutionActivityClient *activity_client,
GNOME_Evolution_Activity_DialogType dialog_type)
{
EvolutionActivityClientPrivate *priv;
GNOME_Evolution_Activity_DialogAction retval;
CORBA_Environment ev;
- g_return_val_if_fail (client != NULL, GNOME_Evolution_Activity_DIALOG_ACTION_ERROR);
- g_return_val_if_fail (EVOLUTION_IS_ACTIVITY_CLIENT (client), GNOME_Evolution_Activity_DIALOG_ACTION_ERROR);
+ g_return_val_if_fail (activity_client != NULL, GNOME_Evolution_Activity_DIALOG_ACTION_ERROR);
+ g_return_val_if_fail (EVOLUTION_IS_ACTIVITY_CLIENT (activity_client), GNOME_Evolution_Activity_DIALOG_ACTION_ERROR);
+
+ priv = activity_client->priv;
- priv = client->priv;
+ DEBUG ();
CORBA_exception_init (&ev);