Commit Graph

770 Commits

Author SHA1 Message Date
Milan Crha c003c99a75 Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly 2011-06-29 18:41:39 +02:00
Matthew Barnes 274697623e 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-06-29 18:41:34 +02:00
Matthew Barnes f099f679dc 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-06-29 18:41:31 +02:00
Milan Crha d7ff1792f7 Bug #635144 - Using external editor duplicates signature 2011-06-29 18:41:30 +02:00
Milan Crha 59b03835d7 Bug #553438 - Deletes lines of a reply when changing address 2011-06-29 18:41:19 +02:00
Matthew Barnes 0d2d76c021 GtkSelectionData is sealed in GTK3.
Have to use accessor functions, no pointer deferencing.
2011-06-29 18:41:16 +02:00
Milan Crha 97fac153c5 Bug #567879 - Add View >> Gallery Option In Email Composer 2011-06-29 18:41:13 +02:00
Milan Crha ca3faa17a9 Free/busy meeting view doesn't work due to non-working extension 2011-06-29 18:41:08 +02:00
Milan Crha 4db00fa9f7 Bug #404570 - Ctrl-R / NNTP doesn't focus the new message 2011-06-29 18:41:05 +02:00
Matthew Barnes 616f0b140b 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-11-09 23:33:20 +01:00
Matthew Barnes 4a929caada 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-11-09 23:33:20 +01:00
Matthew Barnes 02b36ad15e Fix build break. 2010-11-09 23:33:19 +01:00
Matthew Barnes 20651e4f09 Set Date: when building a CamelMimeMessage in composer. 2010-11-09 23:33:19 +01:00
Matthew Barnes f544e10b71 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-11-09 23:33:19 +01: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 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 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
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 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
Matthew Barnes c9ec8c3f4d Merge branch 'express2' 2010-05-26 13:09:33 -04:00
Matthew Barnes f49077cfb5 Merge branch 'gnome-2-30' into express2 2010-05-25 09:14:51 -04:00
Milan Crha 6139fb4d0b Bug #617557 - Quits without asking user to save unfinished messages 2010-05-21 17:33:59 +02:00
Milan Crha 8e3af3094e Bug #617557 - Quits without asking user to save unfinished messages 2010-05-21 17:32:57 +02:00
Michael Meeks d3c7420fb9 get the composer dialog size right on MeeGo 2010-05-21 16:25:26 +01:00
Milan Crha 98adb40685 Bug #304415 - Allow change of signature hash algorithm 2010-05-19 23:09:26 +02:00
Federico Mena Quintero f9352579b4 Use the lite-composer when the shell is in small-screen mode
Remove various utility functions that conditionally create
a lite composer, and just use the normal functions to
create a composer.  The composer will know by itself whether
it needs to adjust for small screens.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-05-07 15:23:25 -05:00
Federico Mena Quintero 2aa44ca3df Merge express2 into relayout-composer 2010-05-07 12:12:48 -05:00
Federico Mena Quintero abd1b7ef77 Use e_msg_composer_get_lite() instead of a global variable or struct fields
This will also make 'grep' easier when we remove the lite stuff
by refactoring.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-04-30 17:38:28 -05:00
Srinivasa Ragavan 4db5d55329 Set transient prop in express mode so that composer appears in the same
zone as the mail window.
2010-04-30 09:33:35 +05:30
Matthew Barnes bc90469e7f Camel is now GObject-based. 2010-04-24 11:05:27 -04:00
Milan Crha 91020b05a3 Bug #360461 - Avoid markup in translatable messages 2010-04-23 11:20:50 +02:00