diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 11 | ||||
-rw-r--r-- | shell/evolution-activity-client.c | 29 | ||||
-rw-r--r-- | shell/evolution-test-component.c | 13 |
3 files changed, 41 insertions, 12 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 34181a71aa..13215a7b9d 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,5 +1,16 @@ 2001-06-24 Ettore Perazzoli <ettore@ximian.com> + * evolution-test-component.c (activity_client_clicked_callback): + New callback for the "clicked" signal on the EActivityClient. + Just spit out a warning now, for testing purposes. + (timeout_callback_1): Connect it. + + * evolution-activity-client.c (listener_callback): Emit the + "clicked" signal if we get the "Clicked" event from the Bonobo + listener. + +2001-06-24 Ettore Perazzoli <ettore@ximian.com> + * e-shell-folder-commands.c: #include <gtk/gtklabel.h>. (delete_dialog): Constify @folder_name properly. (delete_cb): Change the first arg to be an EStorageSet as expected diff --git a/shell/evolution-activity-client.c b/shell/evolution-activity-client.c index 96aa4c22b8..9e95eedcac 100644 --- a/shell/evolution-activity-client.c +++ b/shell/evolution-activity-client.c @@ -51,7 +51,7 @@ enum { LAST_SIGNAL }; -static guint activity_client_signals[LAST_SIGNAL] = { 0 }; +static guint signals[LAST_SIGNAL] = { 0 }; struct _EvolutionActivityClientPrivate { /* The ::Activity interface that we QI from the shell. */ @@ -203,10 +203,16 @@ listener_callback (BonoboListener *listener, char *event_name, CORBA_any *any, CORBA_Environment *ev, - gpointer data) + void *data) { - /* FIXME: Implement. */ - g_print ("EvolutionActivityClient: BonoboListener event -- %s\n", event_name); + EvolutionActivityClient *activity_client; + + activity_client = EVOLUTION_ACTIVITY_CLIENT (data); + + if (strcmp (event_name, "Clicked") == 0) + gtk_signal_emit (GTK_OBJECT (activity_client), signals[CLICKED]); + else + g_warning ("EvolutionActivityClient: Unknown event from listener -- %s", event_name); } @@ -258,15 +264,14 @@ class_init (EvolutionActivityClientClass *klass) object_class = GTK_OBJECT_CLASS (klass); object_class->destroy = impl_destroy; - activity_client_signals[CLICKED] = - gtk_signal_new ("clicked", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (EvolutionActivityClientClass, clicked), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + signals[CLICKED] = gtk_signal_new ("clicked", + GTK_RUN_FIRST, + object_class->type, + GTK_SIGNAL_OFFSET (EvolutionActivityClientClass, clicked), + gtk_marshal_NONE__NONE, + GTK_TYPE_NONE, 0); - gtk_object_class_add_signals (object_class, activity_client_signals, LAST_SIGNAL); + gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL); } diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c index f9f199e606..aed0d9089d 100644 --- a/shell/evolution-test-component.c +++ b/shell/evolution-test-component.c @@ -52,6 +52,16 @@ static int timeout_id = 0; static int progress = -1; +/* Callbacks. */ + +static void +activity_client_clicked_callback (EvolutionActivityClient *client, + void *data) +{ + g_warning ("Task bar button clicked!"); +} + + /* Timeout #3: We are done. */ static int timeout_callback_3 (void *data) @@ -109,6 +119,9 @@ timeout_callback_1 (void *data) return FALSE; } + gtk_signal_connect (GTK_OBJECT (activity_client), "clicked", + GTK_SIGNAL_FUNC (activity_client_clicked_callback), NULL); + g_print ("Component becoming busy -- %s\n", COMPONENT_ID); if (suggest_display) g_print (" --> Could display dialog box.\n"); |