* e-shell-offline-handler.c (e_shell_offline_handler_put_components_offline): Ref/unref the handler so the signal handlers can unref it safely. Also, if `prepare_for_offline()' fails, don't say that there was an internal error, as that's confusing. Just say we couldn't put the components off-line. [Fix #3758, clicking on the online/offline button crashed Evolution.] * Evolution-Offline.idl: Don't derive OfflineProgressListener from Bonobo::Unknown. svn path=/trunk/; revision=10742
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
/*
|
|
* Interface to allow components to switch between on-line and off-line mode.
|
|
*
|
|
* Authors:
|
|
* Ettore Perazzoli <ettore@ximian.com>
|
|
*
|
|
* Copyright (C) 2001 Ximian, Inc.
|
|
*/
|
|
|
|
#include <Bonobo.h>
|
|
|
|
module GNOME {
|
|
module Evolution {
|
|
|
|
struct Connection {
|
|
string hostName;
|
|
string type;
|
|
};
|
|
typedef sequence<Connection> ConnectionList;
|
|
|
|
interface OfflineProgressListener {
|
|
/* Update the shell about the progress of going off-line. The
|
|
operation is considered completed when the ConnectionList is empty. */
|
|
void updateProgress (in ConnectionList current_active_connections);
|
|
};
|
|
|
|
interface Offline : Bonobo::Unknown {
|
|
/* Whether the component is currently off-line. */
|
|
attribute boolean isOffline;
|
|
|
|
/* Ask the component to prepare to go into off-line mode. The
|
|
component must return a list of the current active connections.
|
|
After this call, the shell is expected to either invoke
|
|
`::goOffline()' (actually complete the operation and go off-line) or
|
|
`::goOnline()' (operation cancelled). */
|
|
void prepareForOffline (out ConnectionList active_connection_list);
|
|
|
|
/* Ask the component to go into off-line mode. This always comes after
|
|
a `::prepareForOffline' only. */
|
|
void goOffline (in OfflineProgressListener listener);
|
|
|
|
/* Tell the component to go into on-line mode. */
|
|
void goOnline ();
|
|
};
|
|
|
|
};
|
|
};
|