aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-activity-client.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-07-03 01:06:08 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-07-03 01:06:08 +0800
commit7657ec4a52ccbe53d039a70f74ec687d9fa662a7 (patch)
treeb5a759a9af265756eab9a762c718a2e6d60014b6 /shell/evolution-activity-client.c
parentb37c291e33769b6019e512c212fdea50d4a2529f (diff)
downloadgsoc2013-evolution-7657ec4a52ccbe53d039a70f74ec687d9fa662a7.tar.gz
gsoc2013-evolution-7657ec4a52ccbe53d039a70f74ec687d9fa662a7.tar.zst
gsoc2013-evolution-7657ec4a52ccbe53d039a70f74ec687d9fa662a7.zip
Don't assert that there is a handler, so we don't crash if user clicks on
* e-storage-set-view.c (popup_folder_menu): Don't assert that there is a handler, so we don't crash if user clicks on a folder whose type we cannot handle for some reason [such as an uninstalled component]. * evolution-test-component.c (activity_client_cancel_callback): New callback for the "cancel" signal on the EvolutionActivityClient object. (activity_client_show_details_callback): New callback for the "show_details" signal. (timeout_callback_1): Connect these two signal handlers. * e-activity-handler.c (task_widget_button_press_event_callback): Ahem, right-click is button 3, not button 2. (show_cancellation_popup): Actually pop up the menu. (get_corba_null_value): New helper function to create a CORBA_any null value. (report_task_event): New helper function to report events to the listener. (task_widget_cancel_callback): Use it. Report "Cancel" instead of "Cancelled". (task_widget_show_details_callback): New, callback for the "Show Details" right-click menu item. * evolution-activity-client.c: Updated to dispatch the "Cancel" and "ShowDetails" events as "cancel" and "show_details" signals. (class_init): Install the signals. (listener_callback): Updated to update the signals corresponding to the "ShowDetails" and "Cancel" events. * Evolution-Activity.idl: Changed the docs about the events sent to the Bonobo::Listener. We now only have "ShowDetails" and "Cancelled". * evolution-test-component.c (timeout_callback_1): Make the activity cancellable so we can test the right-click cancel menu too. * main.c (idle_cb): Actually exit if we cannot reach to the shell. svn path=/trunk/; revision=10684
Diffstat (limited to 'shell/evolution-activity-client.c')
-rw-r--r--shell/evolution-activity-client.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/shell/evolution-activity-client.c b/shell/evolution-activity-client.c
index 9e95eedcac..1bb74f6dda 100644
--- a/shell/evolution-activity-client.c
+++ b/shell/evolution-activity-client.c
@@ -47,7 +47,8 @@ static GtkObjectClass *parent_class = NULL;
#define UPDATE_DELAY 1000
enum {
- CLICKED,
+ SHOW_DETAILS,
+ CANCEL,
LAST_SIGNAL
};
@@ -209,8 +210,10 @@ listener_callback (BonoboListener *listener,
activity_client = EVOLUTION_ACTIVITY_CLIENT (data);
- if (strcmp (event_name, "Clicked") == 0)
- gtk_signal_emit (GTK_OBJECT (activity_client), signals[CLICKED]);
+ if (strcmp (event_name, "ShowDetails") == 0)
+ gtk_signal_emit (GTK_OBJECT (activity_client), signals[SHOW_DETAILS]);
+ else if (strcmp (event_name, "Cancel") == 0)
+ gtk_signal_emit (GTK_OBJECT (activity_client), signals[CANCEL]);
else
g_warning ("EvolutionActivityClient: Unknown event from listener -- %s", event_name);
}
@@ -264,12 +267,21 @@ class_init (EvolutionActivityClientClass *klass)
object_class = GTK_OBJECT_CLASS (klass);
object_class->destroy = impl_destroy;
- 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[SHOW_DETAILS]
+ = gtk_signal_new ("show_details",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EvolutionActivityClientClass, show_details),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
+ signals[CANCEL]
+ = gtk_signal_new ("cancel",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EvolutionActivityClientClass, cancel),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
}