GNOME Bugzilla – Bug 604952
Cleanup dependencies in the mail backend
Last modified: 2009-12-21 16:08:36 UTC
These are some more changes in preparation for the eds-mail split.
Created attachment 150029 [details] [review] Move forward_to() implementation to MailSession (remove dep on composer) Previously, the CamelSesssion's forward_to vfunc was implemented in em-composer-utils. However, there wasn't really any composer-related functionality that this function depended on, so in order to remove MailSession's dependency on composer-related functionality, this function was moved into mail-session.c. So now, instead of calling em_utils_forward_message_raw(), you should just call camel_session_forward_to() instead. This change necessitated moving a couple of "guess_account"-related functions into em-utils, but that's ok for now -- it matches the existing em_utils_guess_account() function that's already there.
Created attachment 150030 [details] [review] Remove em_utils_show_error_silent() from MailSession When we split the front- and back-end, we really can't have any dependency on EShell from the MailSession, so this function has to go. Currently I just ripped out the offending function call and display an error dialog directly. In the future, we need to find a nicer way to coordinate error-reporting between the frontend and backend.
Created attachment 150031 [details] [review] Move the gross hack for EAccountComboBox up a level This hack really needs to be fixed correctly, but I can't think of a good solution for now. So at the very least, move the hack up a level where it won't cause dependency problems for the mail-to-eds split.
Created attachment 150032 [details] [review] The shell backend is responsibile for setting the MailSession online Previously the mail session set itself online inside mail_session_init() by checking whether the shell was online. This removes one more dependency from MailSession to EShell by moving that responsibility up one level.
Created attachment 150033 [details] [review] Remove MailSession's last dep on EShell When MailSession moves to a daemon process, there will be no shell object to query for the active window (and indeed there will often be no window in any case), so we can't specify a parent for the error dialog.
Created attachment 150034 [details] [review] Clean up a bunch of unnecessary includes in mail/ Over time, extra includes have built up. I'm trying to get a good idea of what are actual dependencies for these files, so I'm cleaning out all of the unused ones.
Created attachment 150035 [details] [review] Remove the EShellBackend parameter from mail_session_init() Last shell-related dep killed in MailSession
Most of the patches look good, but I'm concerned with "Remove em_utils_show_error_silent() from MailSession". That code was the primary reason for suppressing annoying error dialogs, and I would hate to release a version with that reverted. But I understand the eventual need for it. Would it be possible for you to sit on that one for awhile? Keep it in a private branch or something? I don't really want it landing in master until we actually have a mail backend or at least a better way of reporting errors to the user that doesn't involve dialogs. All other patches approved. Some nice cleanups in there.
(In reply to comment #8) > Most of the patches look good, but I'm concerned with "Remove > em_utils_show_error_silent() from MailSession". That code was the primary > reason for suppressing annoying error dialogs, and I would hate to release a > version with that reverted. But I understand the eventual need for it. > > Would it be possible for you to sit on that one for awhile? Keep it in a > private branch or something? I don't really want it landing in master until we > actually have a mail backend or at least a better way of reporting errors to > the user that doesn't involve dialogs. > > All other patches approved. Some nice cleanups in there. Yeah, I understand. I'll sit on that patch for a while yet. thanks for the reviews.
pushed the 6 other patches to master.
Comment on attachment 150030 [details] [review] Remove em_utils_show_error_silent() from MailSession will keep this one on a local branch until we decide how to handle it.