diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-22 04:21:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-23 02:21:22 +0800 |
commit | c881b5bc5e61d04b18d4ab46ad70533e7340d15b (patch) | |
tree | e70a3ed0d2f93dacfe20d856de4d29578beb2e50 /e-util/e-io-activity.h | |
parent | f0714755e2fa8b06425907c2cf189abd3a1b7119 (diff) | |
download | gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.gz gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.bz2 gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.lz gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.xz gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.tar.zst gsoc2013-evolution-c881b5bc5e61d04b18d4ab46ad70533e7340d15b.zip |
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.
Diffstat (limited to 'e-util/e-io-activity.h')
-rw-r--r-- | e-util/e-io-activity.h | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/e-util/e-io-activity.h b/e-util/e-io-activity.h deleted file mode 100644 index 20a7a06082..0000000000 --- a/e-util/e-io-activity.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * e-io-activity.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_IO_ACTIVITY_H -#define E_IO_ACTIVITH_H - -#include <gio/gio.h> -#include <e-util/e-activity.h> - -/* Standard GObject macros */ -#define E_TYPE_IO_ACTIVITY \ - (e_io_activity_get_type ()) -#define E_IO_ACTIVITY(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST \ - ((obj), E_TYPE_IO_ACTIVITY, EIOActivity)) -#define E_IO_ACTIVITY_CLASS(cls) \ - (G_TYPE_CHECK_CLASS_CAST \ - ((cls), E_TYPE_IO_ACTIVITY, EIOActivityClass)) -#define E_IS_IO_ACTIVITY(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE \ - ((obj), E_TYPE_IO_ACTIVITY)) -#define E_IS_IO_ACTIVITY_CLASS(cls) \ - (G_TYPE_CHECK_CLASS_TYPE \ - ((cls), E_TYPE_IO_ACTIVITY)) -#define E_IS_IO_ACTIVITY_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS \ - ((obj), E_TYPE_IO_ACTIVITY, EIOActivityClass)) - -G_BEGIN_DECLS - -typedef struct _EIOActivity EIOActivity; -typedef struct _EIOActivityClass EIOActivityClass; -typedef struct _EIOActivityPrivate EIOActivityPrivate; - -struct _EIOActivity { - EActivity parent; - EIOActivityPrivate *priv; -}; - -struct _EIOActivityClass { - EActivityClass parent_class; -}; - -GType e_io_activity_get_type (void); -EActivity * e_io_activity_new (const gchar *primary_text, - GAsyncResult *async_result, - GCancellable *cancellable); -GAsyncResult * e_io_activity_get_async_result (EIOActivity *io_activity); -void e_io_activity_set_async_result (EIOActivity *io_activity, - GAsyncResult *async_result); - -G_END_DECLS - -#endif /* E_IO_ACTIVITY_H */ |