Commit Graph

278 Commits

Author SHA1 Message Date
2ed79f33bb Convert the filename string to UTF8 before setting it on the CamelMimePart
2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer-attachment.c (e_msg_composer_attachment_new):
	Convert the filename string to UTF8 before setting it on the
	CamelMimePart because that code expects it to be in UTF8.

svn path=/trunk/; revision=10869
2001-07-06 22:00:06 +00:00
a8fbf376d8 only ask if there are actually contents in the file. Asking about an
2001-07-06  Larry Ewing  <lewing@ximian.com>

	* e-msg-composer.c (autosave_manager_query_load_orphans): only ask
	if there are actually contents in the file.  Asking about an
	emptry fil is not very useful.
	(autosave_load_draft): add some sanity chacks.
	(autosave_run_foreach_cb): remove debugging warning.

svn path=/trunk/; revision=10863
2001-07-06 21:44:15 +00:00
6e6eb53b37 revert previous "fix", which was wrong
svn path=/trunk/; revision=10851
2001-07-06 18:56:29 +00:00
0d553dc97e Call autosave_manager_unregister before destroying the composer, so
* e-msg-composer.c (do_exit): Call autosave_manager_unregister
	before destroying the composer, so gtkhtml-editor-control doesn't
	try to act on a destroyed GtkHTML widget.
	(destroy): Remove the autosave_manager_unregister from here.

svn path=/trunk/; revision=10850
2001-07-06 18:24:02 +00:00
af72fc9468 make sure we only remove the file if we think we saved it properly.
2001-07-06  Larry Ewing  <lewing@ximian.com>

	* e-msg-composer.c (autosave_manager_unregister): make sure we
	only remove the file if we think we saved it properly.
	(autosave_manager_stop): make sure we set the timeout back to 0 so
	that we will restart next time since we stop the timer when there
	are no active composers.
	(destroy): move this to the beginning of the destroy process.
	(autosave_save_draft): add a return value indicating success.
	(autosave_manager_register): go ahead and ask next time.

svn path=/trunk/; revision=10839
2001-07-06 05:23:59 +00:00
2583bd0d41 i2001-07-05 Larry Ewing <lewing@ximian.com>
* e-msg-composer.c: add ask argment.
	(autosave_manager_query_load_orphans): move the load loop out of
	the dir reading loop.
	(autosave_manager_new): move initialization out or register.
	(autosave_manager_register): protect against recursion with ask.
	(init): call new, this still needs to be moved.

svn path=/trunk/; revision=10837
2001-07-06 00:50:03 +00:00
65fc784c44 Play the "File exists, overwrite?" game. (autosave_run_foreach_cb): Change
2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (save): Play the "File exists, overwrite?"
	game.
	(autosave_run_foreach_cb): Change the return val from a gboolean
	to void.

svn path=/trunk/; revision=10824
2001-07-05 19:44:39 +00:00
0e9fadc31d attach send and postpone handlers. and be more tolerant of errors.
2001-07-04  Larry Ewing  <lewing@ximian.com>

	* e-msg-composer.c (autosave_load_draft): attach send and postpone
	handlers. and be more tolerant of errors.

svn path=/trunk/; revision=10778
2001-07-04 07:42:32 +00:00
c904bd6580 make sure we seek to the begining.
2001-07-03  Larry Ewing  <lewing@ximian.com>

	* e-msg-composer.c (autosave_save_draft): make sure we seek to the
	begining.

svn path=/trunk/; revision=10773
2001-07-03 22:42:22 +00:00
ed46ce99fe remove the timer id.
2001-07-03  Larry Ewing  <lewing@ximian.com>

	* e-msg-composer.h: remove the timer id.

	* e-msg-composer.c: use autosave manager.
	(autosave_save_draft): moved initialization to
	autosave_init_file. Only save the buffer if we get a valid
	message.
	(autosave_load_draft): unlink the old file, we own it now. and
	unref the stream when we are done with it.
	(autosave_is_owned): check if we own the file, this needs to be
	extended to check for other valid processes.
	(autosave_query_load_orphans): make this search through the
	managers list as it walks the dir.
	(autosave_query_load_orphans): make sure we use the full path.
	(autosave_run_foreach_cb): timeout foreach handler.
	(autosave_run): the timeout function.
	(autosave_start): start timer.
	(autosave_stop): stop timer.
	(autosave_register): register a composer with the autosave manager.
	(autosave_unregister): unregister a composer.
	(destroy): unregister the composer, everything is okay.
	(init): register the composer.

svn path=/trunk/; revision=10762
2001-07-03 19:31:06 +00:00
23dd7a254c querythe user to check if they want to load any orphans we've found.
2001-07-02  Larry Ewing  <lewing@ximian.com>

	* e-msg-composer.c (autosave_query_load_orphans): querythe user to
	check if they want to load any orphans we've found.
	(autosave_query_cb): the dialog callback.
	(autosave_is_orphan): test if if a particular file is orphaned.
	(autosave_load_draft): load a message from an autosave file.
	(autosave_save_draft): save the current buffer to the autosave file.

svn path=/trunk/; revision=10761
2001-07-03 19:17:31 +00:00
b7dede1a27 use bonobo-conf everywhere
2001-07-03  Dietmar Maurer  <dietmar@ximian.com>

	* *: use bonobo-conf everywhere

svn path=/trunk/; revision=10760
2001-07-03 18:15:31 +00:00
e694ee7fff Set the user-chosen charset.
2001-07-02  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer-attachment-bar.c (attach_to_multipart): Set the
	user-chosen charset.

	* e-msg-composer.c (menu_change_charset_cb): New callback function
	to get the user-set charset.
	(init): Set the charset to NULL.
	(best_charset): Take a default_charset param that holds the value
	the user set for this particular message using the menu.
	(destroy): Free the charset.

svn path=/trunk/; revision=10704
2001-07-02 21:13:18 +00:00
9436b13bc0 Construct an e-charset-picker bonobo-ui menu.
2001-07-02  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (setup_ui): Construct an e-charset-picker
	bonobo-ui menu.

svn path=/trunk/; revision=10690
2001-07-02 18:19:06 +00:00
abdd471509 make sure we show the sig file.
2001-06-29  Larry Ewing  <lewing@ximian.com>

	* mail-callbacks.c (create_msg_composer): make sure we show the
	sig file.

	* e-msg-composer.c (e_msg_composer_show_sig_file): remove now
	invalid argument in the documentation.

svn path=/trunk/; revision=10616
2001-06-30 02:01:38 +00:00
47c1ce6660 small cosmetic changes + added ChangeLog entries from last commit
2001-06-28  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c: removed obsolete e_msg_composer_get_sig_file

	* e-msg-composer.h: removed sig_file field from EMsgComposer

	* e-msg-composer.c (e_msg_composer_get_sig_file_content): exported
	(get_file_content): make it const safe
	(e_msg_composer_get_sig_file_content): refactored, don't try to be
	clever about signature filename, as it's exact now
	(get_signature_html): use has_html_signature flag
	(e_msg_composer_show_sig_file): renamed from
	e_msg_composer_set_sig_file, removed sig_file parameter as it's
	obsolete now
	(e_msg_composer_new_with_sig_file): removed obsolete parameters

svn path=/trunk/; revision=10579
2001-06-28 21:07:54 +00:00
99b700bb09 exported
2001-06-28  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c (e_msg_composer_get_sig_file_content): exported

svn path=/trunk/; revision=10577
2001-06-28 20:36:34 +00:00
3460368f59 simplified(refactored) signature handling + better support for html
signatures

svn path=/trunk/; revision=10563
2001-06-28 16:21:14 +00:00
ad31ac2c9e remove FIXME from FileInsertFile.
2001-06-27  Larry Ewing  <lewing@ximian.com>

	* evolution-message-composer.xml: remove FIXME from
	FileInsertFile.

	* e-msg-composer.c (menu_file_insert_file_cb): make hook this up.
	(get_sig_file_content): use get_file_content.
	(get_file_content): make this usable for both insertion and
	signatures.
	(read_file_content): added helper function to read file.

svn path=/trunk/; revision=10552
2001-06-28 01:30:11 +00:00
2d8b087e44 Added a pixcache array for special pixmaps to use in the composer.
2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c: Added a pixcache array for special pixmaps to
	use in the composer.
	(setup_ui): Set the pixcache.

svn path=/trunk/; revision=10539
2001-06-27 20:39:33 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
49ccbcf14e Emit the POSTPONE signal if we are offline. (setup_ui): If we are offline,
2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (menu_file_send_cb): Emit the POSTPONE signal
	if we are offline.
	(setup_ui): If we are offline, change the Control+Enter accel to
	be on the SendLater menu item.

svn path=/trunk/; revision=10372
2001-06-21 18:35:24 +00:00
1d48ee9a8b Save the formatting preference for this message draft using a
2001-06-20  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (save_draft): Save the formatting preference
	for this message draft using a X-Evolution-Format header.
	(e_msg_composer_new_with_message): Restore the format editing
	preference and also remove any other X-Evolution-* headers that we
	may have set.

svn path=/trunk/; revision=10348
2001-06-20 20:49:10 +00:00
85698a3ff5 Don't define the drop_types here. (drag_data_received): Implement
2001-06-19  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (e_msg_composer_construct): Don't define the
	drop_types here.
	(drag_data_received): Implement message/rfc822 dnd drop type
	handling.

svn path=/trunk/; revision=10295
2001-06-19 18:46:47 +00:00
e3258e5bd7 Fix again... don't leave *encoding uninitialized in the US-ASCII case.
* e-msg-composer.c (best_charset): Fix again... don't leave
	*encoding uninitialized in the US-ASCII case.

svn path=/trunk/; revision=10193
2001-06-11 22:31:54 +00:00
df452e3589 Rearranged gtk_widget_show()s a bit to fix Bug#3204. The composer is now
2001-06-11  Jon Trowbridge  <trow@ximian.com>

	* e-msg-composer.c (e_msg_composer_construct): Rearranged
	gtk_widget_show()s a bit to fix Bug#3204.  The composer is now
	(like the rest of Evo) properly network transparent.

svn path=/trunk/; revision=10191
2001-06-11 21:56:05 +00:00
1cb2bd29be When saving a draft, attach information about the From: identity via
2001-06-08  Jon Trowbridge  <trow@ximian.com>

	* e-msg-composer.c (save_draft): When saving a draft, attach
	information about the From: identity via X-Evolution-Account.
	This lets us select the correct identity when we edit it later.
	(e_msg_composer_new_with_message): If the message we are editting
	is tagged with an account (via X-Evolution-Account), make sure
	that the composer chooses that account's identity by default.

svn path=/trunk/; revision=10161
2001-06-08 20:00:54 +00:00
1921719e0f Don't use the default charset if the message is US-ASCII.
* e-msg-composer.c (best_charset): Don't use the default charset
	if the message is US-ASCII.

svn path=/trunk/; revision=10157
2001-06-08 17:50:24 +00:00
30cd3d3957 just set sig_file field, but don't actualy insert signature, it will be
2001-06-07  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c (e_msg_composer_new_with_sig_file): just set
	sig_file field, but don't actualy insert signature, it will be
	done by format menu item callback
	(e_msg_composer_set_body_text): don't set signature here

svn path=/trunk/; revision=10142
2001-06-07 11:07:04 +00:00
f29afac4e6 If user is trying to sign his/her message, try first to use the key that
2001-06-01  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (build_message): If user is trying to sign
	his/her message, try first to use the key that they might have
	provided in their account settings. If that was never set, default
	to their email address. Also respect their config option to
	encrypt-to-self.

svn path=/trunk/; revision=10103
2001-06-02 21:07:44 +00:00
9d1e57701a Oops. Fix a few compile problems.
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (build_message): Oops. Fix a few compile problems.

svn path=/trunk/; revision=10076
2001-05-31 23:20:54 +00:00
097a78bccf Fixed up the S/MIME signing/encrypting code to work with the new API.
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (build_message): Fixed up the S/MIME
	signing/encrypting code to work with the new API.

svn path=/trunk/; revision=10069
2001-05-31 21:07:51 +00:00
d680763eba Add a missing iconv_close
* e-msg-composer.c (best_encoding): Add a missing iconv_close

svn path=/trunk/; revision=10060
2001-05-31 15:56:02 +00:00
fc68923b11 Use the config-specified default character set (which in turn defaults to
* e-msg-composer.c (build_message): Use the config-specified
	default character set (which in turn defaults to the locale
	character set) as the default for encoding non-US-ASCII messages,
	assuming it works. Fall back to camel_charset_best() if it fails.
	Also, pick the Content-Transfer-Encoding based on how the data
	looks in the destination charset, not in UTF8.

	While I was here, I also refactored a bunch and tried to reduce
	redundant code. There are still too many places that set the
	transfer-encoding on the plaintext part though... Also, I think
	some more cleanliness could happen if the sign/encrypt interfaces
	returned CamelMultiparts instead of CamelMimeParts.

svn path=/trunk/; revision=10058
2001-05-30 22:05:36 +00:00
cd3efd875d (menu_edit_delete_all_cb): be more careful about text color and
style

svn path=/trunk/; revision=9965
2001-05-24 18:39:57 +00:00
a0c112f4dc Populate the extra_hdr_* arrays with any non-special-case headers.
2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (e_msg_composer_new_with_message): Populate the
	extra_hdr_* arrays with any non-special-case headers.
	(is_special_header): New convenience function to determine if a
	header is a "special" header or not.

svn path=/trunk/; revision=9963
2001-05-24 17:27:51 +00:00
9da50381ab new callback (menu_edit_delete_all_cb): set orig to 0 too
2001-05-24  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c (menu_edit_delete_all_cb): new callback
	(menu_edit_delete_all_cb): set orig to 0 too

svn path=/trunk/; revision=9961
2001-05-24 14:51:08 +00:00
6245eada6f new callback
2001-05-24  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c (menu_edit_delete_all_cb): new callback

svn path=/trunk/; revision=9959
2001-05-24 14:42:19 +00:00
e060e9b60c set orig to 0
2001-05-23  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c (e_msg_composer_set_sig_file): set orig to 0

svn path=/trunk/; revision=9943
2001-05-23 11:33:06 +00:00
7dac398365 Draft messages should be marked read.
* e-msg-composer.c (save_draft): Draft messages should be marked
	read.

svn path=/trunk/; revision=9871
2001-05-17 18:50:09 +00:00
1849ce6cd2 Added S/MIME sign/encrypt code. (init): Initalize smime_sign/encrypt.
2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (build_message): Added S/MIME sign/encrypt code.
	(init): Initalize smime_sign/encrypt.
	(e_msg_composer_get_smime_encrypt): new
	(e_msg_composer_set_smime_encrypt): new
	(e_msg_composer_get_smime_sign): new
	(e_msg_composer_set_smime_sign): new
	(menu_security_smime_sign_cb): new
	(menu_security_smime_encrypt_cb): new
	(setup_ui): Setup the UI for S/MIME stuff.

svn path=/trunk/; revision=9858
2001-05-16 21:52:49 +00:00
f6f8e3c3e8 If we are creating a message with only a single part (ie no attachments
2001-05-10  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (build_message): If we are creating a message
	with only a single part (ie no attachments and we will not be
	signing/encrypting the part) then `part = CAMEL_MIME_PART(message)`
	otherwise create a new MIME part and set it's content-object as the
	message's content-object at a later date.

svn path=/trunk/; revision=9749
2001-05-10 20:43:50 +00:00
ffea73e2e6 Don't wrap content-id with brackets here as it is now done internally in
2001-05-09  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (add_inlined_image): Don't wrap content-id with
	brackets here as it is now done internally in camel.

svn path=/trunk/; revision=9736
2001-05-09 21:50:55 +00:00
57546880c8 signature editing fixes
* signature editing fixes

2001-05-03  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c (get_signature_html): put signature in 100%
	width table
	(delete_old_signature): look only for first flow with signature == 1
	(e_msg_composer_new): don't insert <BR>
	(e_msg_composer_new_with_sig_file): ditto
	(delete_old_signature): don't delete whole signature paragraph,
	but just it's content
	(delete_old_signature): if signature isn't found, insert new empty
	paragraph to end of document for new signature
	(e_msg_composer_set_sig_file): delete signature always
	(e_msg_composer_set_sig_file): don't place signature to the end of
	document, but place it where previous one was (if there wasn't
	then new one is appended to the document)

2001-05-02  Radek Doulik  <rodo@ximian.com>

	* listener.c (impl_event): do automagic indenting only when
	in_signature_insert is FALSE

	* e-msg-composer.c (e_msg_composer_set_sig_file): do indent-zero
	before signature inserting
	(e_msg_composer_set_sig_file): use in_signature_insert flag

2001-05-01  Radek Doulik  <rodo@ximian.com>

	* listener.c (impl_event): set signature to 0 in newly created
	empty paragraphs
	(clear_signature): new helper function

svn path=/trunk/; revision=9658
2001-05-03 19:34:28 +00:00
89c5aea7a6 block/unblock redraw
2001-04-25  Radek Doulik  <rodo@ximian.com>

	* e-msg-composer.c (e_msg_composer_set_send_html): block/unblock
	redraw

svn path=/trunk/; revision=9564
2001-04-25 17:06:45 +00:00
0f25a90781 signature changing
* signature changing

2001-04-25  Radek Doulik  <rodo@ximian.com>

        * listener.c (impl_event): reflect object data type change

        * e-msg-composer.c (get_sig_file_content): renamed from
        get_signature
        (get_signature_html): new helper function, uses
        get_sig_file_content
        (set_editor_text): removed signature parameters
        (from_changed_cb): new signal handler, sets signature by identity
        change
        (delete_old_signature): new function, deletes old signature from
        the document
        (e_msg_composer_set_sig_file): new method, set's signature
        filename
        (e_msg_composer_mark_text_orig): removed (obsolete)

        * e-msg-composer-hdrs.c: added signal FROM_CHANGED

svn path=/trunk/; revision=9557
2001-04-25 09:31:56 +00:00
adb3761ed6 Set window_icon of the Composer window to be compose-message.png
svn path=/trunk/; revision=9489
2001-04-21 20:20:34 +00:00
7729c3ca47 Use the mail-crypto pgp-mime wrappers. (build_message):
2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (build_message): Use the mail-crypto pgp-mime
	wrappers.
	(build_message): s/CAMEL_PGP_HASH_TYPE_SHA1/CAMEL_CIPHER_HASH_SHA1

svn path=/trunk/; revision=9285
2001-04-12 21:27:55 +00:00
fabdba6f1c Use the mail-crypto pgp-mime wrappers.
2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer.c (build_message): Use the mail-crypto pgp-mime
	wrappers.

svn path=/trunk/; revision=9268
2001-04-12 17:11:45 +00:00
0fa93ae9cf Change into the user's home dir before opening the filesel.
2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>

	* e-msg-composer-select-file.c (create_file_selection): Change
	into the user's home dir before opening the filesel.

svn path=/trunk/; revision=9242
2001-04-11 16:47:11 +00:00