Files
evolution/shell/Evolution-Activity.idl
Ettore Perazzoli 7657ec4a52 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
2001-07-02 17:06:08 +00:00

107 lines
3.2 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Activity management for Evolution.
*
* Authors:
* Ettore Perazzoli <ettore@ximian.com>
*
* Copyright (C) 2000, 2001 Ximian, Inc.
*/
module GNOME {
module Evolution {
interface Activity : Bonobo::Unknown {
typedef long ActivityId;
enum DialogType {
DIALOG_TYPE_NONE,
DIALOG_TYPE_MESSAGE,
DIALOG_TYPE_WARNING,
DIALOG_TYPE_INPUT,
DIALOG_TYPE_ERROR
};
enum DialogAction {
DIALOG_ACTION_ERROR,
DIALOG_ACTION_DISPLAY,
DIALOG_ACTION_POSTPONE
};
exception InvalidIcon {};
exception IdNotFound {};
/* Events propagated through the listener:
- "ShowDetails": The user wants to know details about the
progressing operation. The component should display additional
information about the operation in progress, or raise a pending
alert dialog.
- "Cancel": The user wants the operation to be cancelled.
*/
/**
* operationStarted:
* @component_id: Id of the component starting the operation.
* @information: Informative string about the operation being performed.
* @cancellable: Whether this operation should be cancellable by
* the user from the shell view.
* @event_listener: Listener which the events for the activity
* widget will be passed to.
* @activity_id: A unique Id for the activity, to be used to update the
* status of the operation.
* @suggest_display: Whether displaying the dialog might be a nice idea.
*/
void operationStarted (in string component_id,
in AnimatedIcon icon,
in string information,
in boolean cancellable,
in Bonobo::Listener event_listener,
out ActivityId activity_id,
out boolean suggest_display)
raises (InvalidIcon);
/**
* operationProgressing:
* @activity: The unique Id for the activity whose status we want to update.
* @information: New informative string. If empty, the informative string
* isn't changed.
* @progress: A float from 0.0 to 1.0 indicating the status of completion.
*
* Update the status of the specified @activity.
*/
void operationProgressing (in ActivityId activity,
in string information,
in float progress)
raises (IdNotFound);
/**
* operationFinished:
* @activity: The unique Id for the activity that has been completed.
*
* Report that the specified @activity has been completed. After this
* method is invoked, @activity is not considered to be a valid Id
* anymore.
*/
void operationFinished (in ActivityId activity);
/**
* requestDialog:
*
* Inform the shell that the specified @activity requires user input
* from a dialog. The returned value specifies whether the shell wants
* the dialog to be shown now (%DIALOG_ACTION_DISPLAY) or postponed
* (%DIALOG_ACTION_POSTPONE). If the return value is
* %DIALOG_ACTION_POSTPONE, the component should wait for the
* "DisplayDialog" event before proceeding further. In that case, the
* shell will flash the label related to this activity, and emit
* "DisplayDialog" through the event source when the user clicks on it.
*/
DialogAction requestDialog (in ActivityId activity,
in DialogType dialog_type);
};
};
};