Commit Graph

1207 Commits

Author SHA1 Message Date
Matthew Barnes c6fd77460f Coding style and whitespace cleanup. 2011-03-05 12:34:28 -05:00
Milan Crha 7c993081e4 Bug #641805 - Clicking links in mail composer opens URL twice 2011-02-28 17:59:40 +01:00
Milan Crha 1301cf02ef Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly 2011-02-25 16:20:41 +01:00
Matthew Barnes 7a1677520d Remove NULL checks for GObject methods.
As of GLib 2.28 all GObject virtual methods, including constructed(),
are safe to chain up to unconditionally.  Remove unnecessary checks.
2011-02-12 12:54:08 -05:00
Matthew Barnes 9a8f21c44b Composer: Add Edit -> Preferences
Opens the Preferences window to the Composer Preferences section.
2011-02-03 14:11:02 -05:00
Matthew Barnes 93a51af225 Fix image dropping in composer while in HTML mode.
Dragging image data or an image URI to the message body while in HTML
mode should insert the image inline, not attach it.  Without this the
Picture Gallery feature is pointless.
2011-02-02 22:48:43 -05:00
Milan Crha a10247b540 Bug #635144 - Using external editor duplicates signature 2011-02-01 18:09:00 +01:00
Matthew Barnes 753c60fc67 Drop backward-compatibility cruft. 2011-01-25 10:28:26 -05:00
Matthew Barnes 54ae8f0a7d Bug 640091 - Improve error handling during send post-processing
If a newly-composed message was successfully sent but an error occurred
during post-processing (outgoing filters or appending to a Sent folder),
close the composer window and show an alert in the main window.
2011-01-21 17:40:22 -05:00
Milan Crha d7bfcbbde7 Bug #553438 - Deletes lines of a reply when changing address 2011-01-18 15:19:36 +01:00
Matthew Barnes f4d3b320a2 GtkSelectionData is sealed in GTK3.
Have to use accessor functions, no pointer deferencing.
2011-01-09 10:24:06 -05:00
Milan Crha e861630f11 Bug #567879 - Add View >> Gallery Option In Email Composer 2010-12-21 21:11:10 +01:00
Milan Crha 22b2d26d04 Free/busy meeting view doesn't work due to non-working extension 2010-12-06 14:23:20 +01:00
Milan Crha f5562e9697 Bug #404570 - Ctrl-R / NNTP doesn't focus the new message 2010-11-29 16:04:05 +01:00
Matthew Barnes ccc2b3a14b EActivity: Add an "alert-sink" property.
This is just for convenience, EActivity does not use this property.

Especially useful in async function callbacks when the operation
failed and now you have to do something useful with the GError.
2010-10-31 22:54:30 -04:00
Matthew Barnes 82925c6be9 Pass an EAlertSink to e_alert_sink_submit_alert().
Passing a random GtkWidget and then searching its ancestors for an
EAlertSink turned out to be not as useful as I thought.  Most of the
time we know about and have access to the widget that implements
EAlertSink, so just pass it directly as an EAlertSink.
2010-10-31 22:54:30 -04:00
Matthew Barnes 68d834a39b Fix build break. 2010-10-31 12:48:15 -04:00
Matthew Barnes 4170492c5a Set Date: when building a CamelMimeMessage in composer. 2010-10-30 22:08:48 -04:00
Matthew Barnes 6709cd6e58 Skip writing to Outbox when sending.
When sending a message from a composer window, it seems pointless to
write message to Outbox only to immediately read it back and mark it
for deletion.  Instead, bypass the Outbox folder when sending, and if
an error occurs, offer to save the message to Outbox instead.
2010-10-30 21:01:11 -04:00
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
Matthew Barnes d4e5485e02 Bug 632127 - Composer is editable while sending message 2010-10-14 16:32:29 -04:00
Matthew Barnes 1e663aa132 Replace EBinding with GBinding.
GObject now does property bindings itself.

Requires GLib >= 2.26.
2010-10-14 07:12:52 -04:00
Matthew Barnes 4118d671d4 Composer: Show cancellable operations and errors inline.
'Send' and 'Save Draft' are now asynchronous and run outside of
Evolution's MailMsg infrastructure.

Add an EActivityBar to the composer window so these asynchronous
operations can be tracked and cancelled even in the absense of a main
window.  Also add an EAlertBar to the composer window so error messages
can be shown directly in the window.

Instead of calling e_alert_dialog_run_for_args(), call e_alert_submit()
and pass the EMsgComposer as the widget argument.  The EMsgComposer will
decide whether to show an EAlertDialog or use the EAlertBar, depending
on the GtkMessageType of the alert.
2010-10-12 13:59:00 -04:00
Milan Crha 1c6f2d154e Bug #631320 - GtkObject is gone in GTK3 2010-10-06 19:26:08 +02:00
Matthew Barnes 0e4c54eddc Messin around with EAlerts.
Trying out a new interface called EAlertSink.  The idea is to centralize
how errors are shown to the user.  A GtkWindow subclass would implement
the EAlertSink interface, which consists of a single method:

    void  (*submit_alert)  (EAlertSink *alert_sink, EAlert *alert);

The subclass has complete control over what to do with the EAlert,
although I imagine we'll wind up implementing various alert-handling
policies as standalone widgets such as EAlertDialog.  I'd like to try
an EAlertInfoBar.

Code that would otherwise display an error dialog itself would instead
pass the EAlert to an appropriate EAlertSink and be done with it.

Nothing is final yet.  Still hacking on EAlert trying to find an API
that feels right for these use cases.
2010-09-29 21:11:44 -04:00
Matthew Barnes 31b57ed038 Adapt to Camel API changes. 2010-09-28 11:35:55 -04:00
Matthew Barnes a91eeb6471 Pass GCancellable to Camel. 2010-09-28 11:35:55 -04:00
Matthew Barnes afe6f502c3 Use new GDK keysym names if available.
In GTK+ 2.21.8, the keysym names were renamed from GDK_* to GDK_KEY_*.

I've added backward-compatibility macors to gtk-compat.h, which can be
dumped as soon as we require GTK+ >= 2.22.0.
2010-09-17 18:39:59 -04:00
Matthew Barnes e6067ccb6c Bug 616073 - Various translation issues 2010-09-10 18:51:26 -04:00
Matthew Barnes d5dae027a8 Bug 629049 - Memory leak in e_composer_pose_header_set_account() 2010-09-08 09:09:55 -04:00
Milan Crha 101305e1c7 Various memory leaks 2010-09-07 18:39:46 +02:00
Matthew Barnes 429234ff21 Convert composer autosave to an EExtension.
Given the way the autosave feature was awkwardly bolted on to the
composer, an EExtension seemed like a natural fit.  And it helped
clean up some object lifecycle hacks (and bugs).

What we have now is a new module consisting of two EExtensions:

   EComposerAutosave extends EMsgComposer and determines when to
   kick off an asynchronous autosave operation.

   EComposerRegistry extends EShell and offers to restore orphaned
   autosave files on startup (which is also asynchronous now).

e-autosave-utils.c holds the actual asynchronous functions and a few
other miscellaneous utility functions.

Source code for the new module lives in /modules/composer-autosave.
2010-09-02 13:37:31 -04:00
Matthew Barnes 035fbcd841 Composer autosave cleanups.
This simplifies the async autosave logic and improves error handling.

Hoping this will solve bug #616987 but I've yet to reproduce it myself.
2010-08-30 14:26:00 -04:00
Matthew Barnes 4c05b9e925 Coding style and whitespace cleanup. 2010-08-29 11:22:28 -04:00
Matthew Barnes ecf3434da0 GObject boilerplate cleanup.
Prefer thread-safe G_DEFINE_TYPE and G_DEFINE_INTERFACE macros over
manual GType registration.

This is just a start... lots more to do.
2010-08-24 14:37:02 -04:00
Matthew Barnes 6cb0cbd0be Pass an EShell to EMsgComposer instances.
Reduce the composer's dependency on e_shell_get_default().
2010-08-13 20:56:33 -04:00
Matthew Barnes 4032075425 Bug 624913 - Disallow drag-and-drop within the same attachment bar
Adds a boolean "dragging" property to the EAttachmentView interface,
which becomes TRUE when the user start a drag from the attachment view.
e_attachment_view_drag_motion() and e_attachment_view_drag_drop() both
return FALSE when this property is set.

Also, do not register the entire EMsgComposer window as a drag
destination.  Just intercept drag signals from the GtkHTML widget.

Requires gtkhtml commit 344eb5e to fully work correctly.
2010-08-13 08:09:37 -04:00
Matthew Barnes 5f49fa2561 Bug 323142 - Signature missing when handling mailto: URI with body part 2010-08-12 12:22:14 -04:00
Matthew Barnes a79893c002 EMsgComposer cleanups. 2010-08-12 12:17:45 -04:00
Milan Crha 410b996d54 Bug #624891 - Various compiler warnings in git/master 2010-07-22 11:13:10 +02:00
Matthew Barnes eb29179da6 Coding style and whitespace cleanup. 2010-07-11 22:25:06 -04:00
Matthew Barnes a0383d484b Bug 623702 - SEGV on redirecting message 2010-07-10 10:10:05 -04:00
Matthew Barnes 137b0743dd Migrate from CamelException to GError. 2010-07-08 14:37:52 -04:00
Michael Meeks 36f1f29b9a Fix transience problems with ENameSelectorDialogs ... 2010-07-08 16:10:59 +01:00
Milan Crha 179db75ce0 Bug #620815 - Memory leaks with Evolution 2010-06-24 20:43:16 +02:00
Matthew Barnes c37352e589 Composer: Append drag dest targets to the GtkHTML widget.
This is so that GtkHTML doesn't have to register drag destination
targets that that it can't handle itself, like "text/calendar" and
"text/x-vcard".
2010-06-23 10:51:51 -04:00
Matthew Barnes 402166be54 Composer: Only hide single From account in express mode.
At least until we have another way to insert signatures.

Obvious solution: Insert -> Signature -> (list of your signatures)
2010-06-20 17:34:27 -04:00
Matthew Barnes 5d0878967e Coding style and whitespace cleanup. 2010-06-20 08:06:19 -04:00
Milan Crha dfb3b918b0 Bug #617557 - Quits without asking user to save unfinished messages
The second attempt.
2010-06-15 15:10:05 +02:00
Matthew Barnes ffc019e36f Coding style and whitespace cleanups. 2010-06-06 20:09:08 -04:00