aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-06-25 10:54:12 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-06-25 10:54:12 +0800
commit2f67aaaf88cde1291eeec5e0e7e07be914c45263 (patch)
treeb9c050694da2cbb34505baedd7992f2dd94f2c47
parent8cb68557aebb62334f68beeea60cf3bbf5930f9e (diff)
downloadgsoc2013-evolution-2f67aaaf88cde1291eeec5e0e7e07be914c45263.tar.gz
gsoc2013-evolution-2f67aaaf88cde1291eeec5e0e7e07be914c45263.tar.zst
gsoc2013-evolution-2f67aaaf88cde1291eeec5e0e7e07be914c45263.zip
Actually implement the "clicked" signal for the EActivityHandler, and
add some small testing code for it in the test component. svn path=/trunk/; revision=10464
-rw-r--r--shell/ChangeLog11
-rw-r--r--shell/evolution-activity-client.c29
-rw-r--r--shell/evolution-test-component.c13
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");