* component-factory.c (folder_types): add "mail/public". Leave
"vtrash" as it is rather than renaming it to "mail/vtrash",
because we want it to behave differently from normal mail folders
more often than we want it to behave the same.
(type_is_mail, type_is_vtrash): utility funcs
(create_view, create_folder, remove_folder, xfer_folder,
populate_folder_context_menu, unpopulate_folder_context_menu,
destination_folder_handle_drop, storage_create_folder): Use
type_is_mail/type_is_vtrash.
(create_component): Register "New Post" with "mail/public" instead
of "mail" so it becomes the default New icon for it. (29024)
* mail-callbacks.c (transfer_msg): Use "mail/*" for allowed type.
* message-browser.c (transfer_msg): Likewise.
* mail-account-gui.c (mail_account_gui_new): Use "mail/*" instead
of "mail" here for sent/drafts allowed type. (?)
svn path=/trunk/; revision=18223
2002-09-19 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (do_edit_messages): Unset the changed bit on
the composer and also drop any undo operations (since we loaded
the message into the composer). Fixes bug #30580.
svn path=/trunk/; revision=18127
2002-09-11 Not Zed <NotZed@Ximian.com>
* component-factory.c (configure_folder_popup): Handle file uri's
too.
* mail-callbacks.c (configure_folder): clear message list before
calling configure folder.
(local_configure_done): completion callback to reset message list
when done.
* mail-local.c (mail_local_reconfigure_folder): changed args to
accept uri, and done callback.
(reconfigure_got_folder): moved code to callback which presents
the configure uri once we have the folder.
svn path=/trunk/; revision=18039
2002-09-09 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser-ui.c (folder_browser_ui_scan_selection): Make
sure that fb->message_list is non-NULL before checking
fb->message_list->threaded? I guess this'll fix bug #29965.
* mail-callbacks.c (composer_save_draft_cb): NULL-check the ccd
before reffing it.
(composer_send_cb): Same.
svn path=/trunk/; revision=18026
2002-09-05 Jeffrey Stedfast <fejj@ximian.com>
All this snot is to fix bug #29930. What I think was happening was
that the composer's destroy callback got fired off before the
async callback did.
* mail-callbacks.c (ccd_new): New convenience function to malloc a
new ccd.
(ccd_ref): ccd is now ref_counted (it needs to be) so we now have
this.
(ccd_unref): And we need this now too of course.
(composer_destroy_cb): composer's new destroy callback function -
unref's the ccd.
(composer_send_queued_cb): unref the ccd.
(composer_send_cb): ref the ccd here.
(save_draft_done): unref the ccd.
(composer_save_draft_cb): ref the ccd.
svn path=/trunk/; revision=17997
2002-09-04 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (mail_generate_reply): Made sure
account->id->address is not NULL before adding it to the hash
table. This is to prevent bug #29877 from crashing, although it is
still an invalid error condition.
svn path=/trunk/; revision=17969
2002-08-26 Peter Williams <peterw@ximian.com>
* mail-callbacks.c (toggle_flags): Logic change for when untoggling
a message from deleted-dom.
svn path=/trunk/; revision=17869
2002-08-20 Radek Doulik <rodo@ximian.com>
* mail-callbacks.c (do_mail_print): be sure that widget is
realized so that e_utf8_from_gtk_string works properly
(footer_print_cb): save/restore
svn path=/trunk/; revision=17826
2002-08-09 Peter Williams <peterw@ximian.com>
* subscribe-dialog.c: Change this into a GnomeApp so we get a
statusbar and the dialog is a little more comprehensible.
* subscribe-dialog.c: (struct _FolderETree): Add members for
tracking activity callback information.
(get_short_folderinfo_got): Notify the activity callback.
(subscribe_get_short_folderinfo): Here too.
(folder_etree_init): Initialize the activity level to 0.
(folder_etree_construct): Take new parameters of our activity
callback and user_data.
(folder_etree_new): Here too.
(store_data_get_widget): Take the parameters here and pass them
on.
(sc_close_pressed): New callback for when close button is pressed.
(sc_activity_timeout): New timeout to move the activity bar when
folders are being scanned.
(sc_activity_cb): If activity_level > 0, start the progressbar
moving and set the status.
(menu_item_selected): Pass the callback to store_data_get_widget.
(subscribe_dialog_construct): Load some more widgets and adapt to
some changes in the XML. Also connect the close button signal and
initialize the progress bar's settings.
* mail-callbacks.c (manage_subscriptions): Don't call
gnome_dialog_set_close on it anymore since it's no longer a gnome
dialog.
svn path=/trunk/; revision=17793
2002-08-13 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (forward_message): Removed an unused variable.
* mail-account-editor.c (construct): Set the focus on the Account
Name entry widget. Fixes bug #10350.
svn path=/trunk/; revision=17771
2002-08-12 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (forward_message): Use mail_get_messages()
instead of mail_get_message().
(do_forward_non_attached): Fixed to work as a callback from
mail_get_messages().
(do_edit_messages): Only set the drafts_folder and drafts_uid if
the folder-browser is a drafts folder. Fixes bug #28863.
svn path=/trunk/; revision=17762
2002-08-12 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (forward_message): Use mail_get_messages()
instead of mail_get_message().
(do_forward_non_attached): Fixed to work as a callback from
mail_get_messages().
svn path=/trunk/; revision=17761
2002-08-09 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (save_draft_done): If the ccd is NULL, create a
new ccd, disconnect the old signal handlers, and then reconnect
the signal handlers using the non-NULL ccd as the user_data.
(composer_send_queued_cb): Same, but only if the queue append
operation failed.
svn path=/trunk/; revision=17756
* mail-callbacks.c (composer_send_queued_cb, save_draft_done):
Handle the fact that ccd may be NULL (if the composer was created
via CORBA). Quick temporary fix for sending meeting requests.
svn path=/trunk/; revision=17754
2002-08-08 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (delete_msg): Don't check permanent_flags for
the CAMEL_MESSAGE_DELETED bit here, if we are gonna check to see
if the folder supports the permanent flag then there are better
places to check this. Besides, it was the cause for bug #28038.
svn path=/trunk/; revision=17740
2002-08-07 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (composer_send_queued_cb): Delete the Draft
item that this was edited from if that is the case as well as
setting any replied flags if we need to. Fixes bug #18171.
(save_draft_done): Not only delete the previously saved draft, but
also set any PostSendData on the message being replied to or
whatever. Fixes bug #20224.
(compose_msg): Create an empty callback data struct which is now a
MUST.
(mail_reply): Fill in the new post_send_data info and also move
the creation of the post_send_data to AFTER the creation of the
composer widget so we don't leak on fail.
(forward_get_composer): Pass an empty post_send_data structure as
the user_data to the signal callbacks.
(send_to_url): Same.
(post_to_url): Here too.
(redirect_get_composer): And here.
(do_edit_messages): We no longer use the evil kludge of setting
data on the composer object to denote the drafts_uid etc, this is
now part of the post_send_data struct.
svn path=/trunk/; revision=17736
2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
* mail-mt.c (mail_msg_check_error): If we are not in interactive
mode, don't display error dialogs.
* component-factory.c (interactive_cb): Updated to use the new
function mail_session_set_interactive().
(owner_unset_cb): Same here.
* mail-session.c (mail_session_set_interactive): Renamed from
mail_session_enable_interaction().
(mail_session_get_interactive): New function to get the
interactive state.
svn path=/trunk/; revision=17702
2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
* component-factory.c (user_create_new_item_cb): Updated to call
post_to_url if the id is "post".
* mail-callbacks.c (post_to_url): New function so that we don't
need a FolderBrowser to post a new message.
(post_message): Call post_to_url since they shared so much code.
svn path=/trunk/; revision=17698
2002-08-02 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (mail_display_render): Updated to use the new
Follow-Up tags. Instead of storing a string containing the
follow-up tag value, we now have to store the CamelMessageInfo.
(mail_display_destroy): Unref the folder and the message-info.
* folder-browser.c (followup_tag_complete): No longer needed.
(on_right_clicked): Use the individual follow-up tags to decide
whether or not to enable something.
* message-list.c (ml_tree_value_at): Update to use the new
Follow-Up tags.
* mail-callbacks.c (flag_for_followup): Update to use the new
MessageTagEditor API.
(tag_editor_ok): Update this too.
(flag_followup_completed): Updated this too.
(flag_followup_clear): Set all the follow-up tag values to "".
svn path=/trunk/; revision=17691
2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (composer_send_cb): Make sure that the url
isn't an empty string and also make sure to free it when we're
done with it. Also check that we got the folder - if it is NULL,
then just abort.
svn path=/trunk/; revision=17593
2002-07-24 Jeffrey Stedfast <fejj@ximian.com>
* mail-config.c (mail_config_folder_to_safe_url): Use
mail_tools_folder_to_url().
* mail-tools.c (mail_tools_folder_to_url): New convenience
function to take a CamelFolder and return the URL associated with
it.
* mail-callbacks.c (composer_get_message): Pass in a 'post'
argument so we know whether or not we can ignore a NULL set of
recipients.
(composer_send_cb): Default send->send to TRUE unless we are in
Post-To mode, in which case set send->send to FALSE (since we'll
have nothing to send). Also, if we are in Post-To mode, append to
the folder the user wants to post to rather than appending to
Outbox.
(composer_send_queued_cb): Only queue a send thread if send->send
is TRUE (ie, the composer was not in Post mode - if it was in Post
mode, then the message post has already been saved in the correct
folder so there is nothing to do).
(post_message): New function to create an empty composer widget in
Post mode.
(post_reply): New function that calls mail_reply with the new mode
of REPLY_POST.
(mail_generate_reply): If the mode is REPLY_POST, create a Post
composer widget otherwise create a normal composer widget.
svn path=/trunk/; revision=17592
2002-07-24 Peter Williams <peterw@ximian.com>
* mail-callbacks.c (do_mail_fetch_and_print): Check for whether
current_message is NULL as well as preview_shown (if we tried to
load the message and failed, as may happen in offline mode.)
(done_message_selected): Only print if we actually got the message.
* folder-browser.c (folder_browser_query_changed): New function,
use this on the query_changed signal. Don't run the search if
they only changed the dropdown.
svn path=/trunk/; revision=17580
2002-07-19 Not Zed <NotZed@Ximian.com>
* mail-callbacks.c: Try including gtkhtml/gtkhtml.h instead. Test
really is a 4 letter word obviously.
svn path=/trunk/; revision=17515
2002-07-15 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (composer_send_cb): Pass 'info' into
mail_append_mail(), seems I created the info but forgot to pass it
in.
(composer_send_queued_cb): If the message is successfully queued,
we destroy the composer, otherwise we unref it. Don't ever destroy
and then unref it.
svn path=/trunk/; revision=17468
2002-07-10 Not Zed <NotZed@Ximian.com>
** fixes for #10781
* mail-callbacks.c (filter_edit): Add back a cancel button. We
dont need to do anything special to 'undo' here, as the rules are
loaded every time they're used.
* mail-vfolder.c (vfolder_editor_clicked): If ok wans't clicked,
revert the ruleset.
(vfolder_editor_destroy): Fake a button of -1 if we get destroyed
with no click.
(context_rule_removed): Unref the folder after we delete it. If
we're the last ref to the folder, unrefing it means it no longer
exist,s which means no delte processing occurs ...
svn path=/trunk/; revision=17449
2002-07-08 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (redirect): Don't ever use the mail-display's
current_message, this can cause problems.
* mail-ops.c (get_message_free): Unref the gotten message. All of
the callers seemed to think that they didn't have to unref the
message.
* mail-display.c (mail_display_set_message): Now refs the message.
(mail_display_destroy): Unref the current_message if we still have
ownership of it.
svn path=/trunk/; revision=17387
2002-07-05 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (composer_send_queued_cb): Only queue a send
operation if we are in Online mode, otherwise don't bother wasting
our time.
svn path=/trunk/; revision=17381
2002-07-05 Jeffrey Stedfast <fejj@ximian.com>
* main.c (main): No longer need to pass a postpone_cb function
into the composer factory_init.
* mail-send-recv.c (get_receive_type): If the provider is a
transport, return SEND_SEND.
* mail-config.c (mail_config_get_default_transport): If the
default account doesn't have a transport, find the first account
that does.
* mail-callbacks.c (append_mail_cleanup): Don't bother freeing the
appended_uid here.
(composer_send_internal): New helper function that does all the
similar work that composer_send_cb and composer_postpone_cb did.
(composer_send_cb): Append the message to Outbox and in the async
callback, queue a message send operation.
(composer_postpone_cb): Removed.
(composer_send_queued_cb): The new async callback for
composer_send_cb(). If the append is successful, queue a message
send operation and destroy the composer otherwise re-show the
composer.
(save_draft_done): g_strdup the appended uid.
(compose_msg): Don't connect to the postpone signal anymore as it
no longer exists.
(send_to_url): Same.
(mail_reply): Here too.
(forward_get_composer): And here.
(redirect_get_composer): Again here.
(do_edit_messages): And finally here.
* mail-ops.c (append_mail_free): Free the appended uid.
svn path=/trunk/; revision=17379
2002-06-28 Jeffrey Stedfast <fejj@ximian.com>
Fixes bug #27055.
* mail-accounts.c (account_add_finished): Unref the main accounts widget.
(account_add_clicked): Ref the main accounts widget.
(account_edit_finished): Unref the main accounts widget.
(account_edit_clicked): Ref the main accounts widget.
svn path=/trunk/; revision=17323
2002-06-17 Not Zed <NotZed@Ximian.com>
* message-list.c (regen_list_regen): If we dont support searching,
dont try to.
svn path=/trunk/; revision=17208
2002-06-10 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (mail_generate_reply): If we are doing
Reply-to-All, do not include any of the user's email accounts in
the To: field. If, after this, the To: field is empty - then
promote the first recipient in the Cc: list to the To: field.
svn path=/trunk/; revision=17158
2002-06-03 Not Zed <NotZed@Ximian.com>
* mail-callbacks.c (composer_get_message): Changed to check
everything from the composer before the message is requested.
Otherwise we could end up signing/encrypting it twice, etc.
* mail-format.c (handle_multipart_signed): removed some dead wood.
svn path=/trunk/; revision=17094
2002-05-24 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (mail_generate_reply): If we can't find the
mailing list address in the recipients list, just Reply-to-All
instead.
svn path=/trunk/; revision=16998
2002-05-23 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser-window.c (folder_browser_window_new): If the
folder-browser has a parent, reparent it.
* message-browser.[c,h]: Revert back to the old broken
implementation since that's what users want. They're not happy
unless it's broken.
svn path=/trunk/; revision=16989
2002-05-20 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (mail_display_render): Fixed the "Overdue:"
string to not contain any HTML tags.
svn path=/trunk/; revision=16950
* mail-callbacks.c (composer_sent_cb): Always unref the composer
[even when we are destroying it], otherwise we leak it and we get
the nasty bug where you can't quit.
svn path=/trunk/; revision=16941
* (various places): Update for camel_folder_append_message /
camel_folder_transfer_messages_to API change.
* mail-ops.c (mail_append_mail): Pass the appended_uid to the
callback.
* mail-callbacks.c (composer_save_draft_cb, save_draft_done,
do_edit_messages): Take advantage of the append_message change to
keep track of the UID of the saved draft so that we can delete the
old copy of the draft each time we save a new one. Remove the
FIXME suggesting we should do that, since we're doing it now. :)
svn path=/trunk/; revision=16766
2002-05-10 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (do_view_message): Update for the new
message-browser api.
* message-browser.c (message_browser_new): A brand new
implementation that just shows the message, none of that next/prev
crap that always caused problems anyway.
svn path=/trunk/; revision=16759
2002-05-06 Jeffrey Stedfast <fejj@ximian.com>
* mail-ops.c (filter_folder_free): Flush the filter log to make
Tuomas happy :-)
* mail-session.c (mail_session_flush_filter_log): New convenience
function to flush the session's filter log file.
svn path=/trunk/; revision=16696