Files
evolution/widgets/misc/e-activity-proxy.h
Matthew Barnes c881b5bc5e Simplify EActivity.
With unintrusive error dialogs gone, we can cut some unnecessary bits
out of EActivity.

I'm also adding a new enum property called "state", which is one of:

    E_ACTIVITY_RUNNING
    E_ACTIVITY_WAITING
    E_ACTIVITY_CANCELLED
    E_ACTIVITY_COMPLETED

The state of an activity must be explicitly changed.  In particular,
when the user cancels an activity the state should be set only after
confirming the operation has been cancelled and not when cancellation
is requested (e.g. after receiving a G_IO_ERROR_CANCELLED, not when
the GCancellable emits "cancelled").  EActivityBar and EActivityProxy
widgets have been updated to make this distinction clearer in the UI.

E_ACTIVITY_WAITING will be used when activities have to be queued and
dispatched in sequence, which I haven't written yet.
2010-10-22 14:21:22 -04:00

71 lines
2.1 KiB
C

/*
* e-activity-proxy.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the program; if not, see <http://www.gnu.org/licenses/>
*
*
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
*/
#ifndef E_ACTIVITY_PROXY_H
#define E_ACTIVITY_PROXY_H
#include <gtk/gtk.h>
#include <e-util/e-activity.h>
/* Standard GObject macros */
#define E_TYPE_ACTIVITY_PROXY \
(e_activity_proxy_get_type ())
#define E_ACTIVITY_PROXY(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_ACTIVITY_PROXY, EActivityProxy))
#define E_ACTIVITY_PROXY_CLASS(cls) \
(G_TYPE_CHECK_CLASS_CAST \
((cls), E_TYPE_ACTIVITY_PROXY, EActivityProxyClass))
#define E_IS_ACTIVITY_PROXY(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE \
((obj), E_TYPE_ACTIVITY_PROXY))
#define E_IS_ACTIVITY_PROXY_CLASS(cls) \
(G_TYPE_CHECK_CLASS_TYPE \
((cls), E_TYPE_ACTIVITY_PROXY))
#define E_ACTIVITY_PROXY_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS \
((obj), E_TYPE_ACTIVITY_PROXY, EActivityProxyClass))
G_BEGIN_DECLS
typedef struct _EActivityProxy EActivityProxy;
typedef struct _EActivityProxyClass EActivityProxyClass;
typedef struct _EActivityProxyPrivate EActivityProxyPrivate;
struct _EActivityProxy {
GtkEventBox parent;
EActivityProxyPrivate *priv;
};
struct _EActivityProxyClass {
GtkEventBoxClass parent_class;
};
GType e_activity_proxy_get_type (void);
GtkWidget * e_activity_proxy_new (EActivity *activity);
EActivity * e_activity_proxy_get_activity (EActivityProxy *proxy);
void e_activity_proxy_set_activity (EActivityProxy *proxy,
EActivity *activity);
G_END_DECLS
#endif /* E_ACTIVITY_PROXY_H */