Commit Graph

12 Commits

Author SHA1 Message Date
53a3d2f4e1 Use g_simple_async_result_set_check_cancellable().
Always call it immediately after g_simple_async_result_new().
2012-05-13 09:40:23 -04:00
126aa2398a Prefer g_simple_async_result_take_error().
Slightly more efficient and convenient than:

    g_simple_async_result_set_from_error (simple, error);
    g_error_free (error);

One less GError to copy and destroy.
2011-10-06 09:37:01 -04:00
394e580dfd Including <glib.h> directly is rarely needed. 2011-05-28 10:39:52 -04:00
756c8abcb8 Bug #646109 - Fix use of include <config.h> to make sure translations work 2011-05-27 15:23:07 +02:00
ba8f1f78f4 Add e_activity_handle_cancellation().
Convenience function for use in GAsyncReadyCallback functions.

This acknowledges the cancellation, so that the activity's description
changes from "(cancelling)" to "(cancelled)" and the description appears
crossed out in the UI for a moment before disappearing.
2011-05-11 12:59:29 -04:00
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
797acc2445 Drop support for migrating from Evolution < 2.0.
There's too much ancient, crufty code there that we can't realistically
support anymore.  A workaround for those poor users still on 1.x is to
upgrade to some 2.x release first, then upgrade again to 3.x.  An error
dialog explaining this will be shown at startup.
2010-03-29 19:04:00 -04:00
cb983f9915 Bug 612679 - Crash when saving to a directory without permission 2010-03-12 07:10:05 -05:00
1040078ce6 Update API documentation.
Also, start fixing some Gtk-Doc warnings.  There's a lot.
2010-02-09 18:02:51 -05:00
bd31f49bac Coding style and whitespace cleanup. 2009-12-26 00:26:18 -05:00
86ecfc5053 Convert some "Save As" actions to run asynchronously.
This introduces e-shell-utils for miscellaneous utility functions
that integrate with the shell or shell settings.  First function
is e_shell_run_save_dialog(), which automatically remembers the
selected folder in the file chooser dialog.

Also, kill some redundant save dialog functions, as well as some
write-this-string-to-disk functions that block.
2009-11-07 14:01:46 -05:00
aa66a17e40 Test drive EIOActivity with a simple asynchronous function.
Rename e-fsutils to e-file-utils.  This is where we'll add asynchronous
functions for common file I/O operations with EActivity integration.

Start with e_file_replace_contents_async() (and corresponding finish()
function).  This is a simple wrapper for g_file_replace_contents_async()
which also returns an EActivity.  It replaces e_write_file_uri().

Also redesign EIOActivity to -contain- a GAsyncResult rather than
implement the interface for itself.  This is easier for now but I may
change my mind again when I figure out how to tie centralized error
reporting into the EActivity framework.
2009-11-07 14:01:46 -05:00