evolution r34900 - in branches/mbarnes-composer: composer mail plugins/mailing-list-actions



Author: mbarnes
Date: Sat Jan 26 21:33:55 2008
New Revision: 34900
URL: http://svn.gnome.org/viewvc/evolution?rev=34900&view=rev

Log:
Miscellaneous issues.


Modified:
   branches/mbarnes-composer/composer/e-composer-header-table.c
   branches/mbarnes-composer/mail/em-composer-utils.c
   branches/mbarnes-composer/plugins/mailing-list-actions/mailing-list-actions.c

Modified: branches/mbarnes-composer/composer/e-composer-header-table.c
==============================================================================
--- branches/mbarnes-composer/composer/e-composer-header-table.c	(original)
+++ branches/mbarnes-composer/composer/e-composer-header-table.c	Sat Jan 26 21:33:55 2008
@@ -231,7 +231,6 @@
 {
 	GObject *object;
 	EComposerHeaderTablePrivate *priv;
-	GtkWidget *widget;
 	guint rows, ii;
 
 	/* Chain up to parent's constructor() method. */

Modified: branches/mbarnes-composer/mail/em-composer-utils.c
==============================================================================
--- branches/mbarnes-composer/mail/em-composer-utils.c	(original)
+++ branches/mbarnes-composer/mail/em-composer-utils.c	Sat Jan 26 21:33:55 2008
@@ -262,8 +262,10 @@
 	GList *postlist;
 	EMEvent *eme;
 	EMEventTargetComposer *target;
+	EComposerHeaderTable *table;
 
 	gconf = mail_config_get_gconf_client ();
+	table = e_msg_composer_get_header_table (composer);
 
 	/* We should do all of the validity checks based on the composer, and not on
 	   the created message, as extra interaction may occur when we get the message
@@ -314,7 +316,7 @@
 
 	camel_object_unref (cia);
 
-	postlist = e_msg_composer_hdrs_get_post_to(e_msg_composer_get_hdrs (composer));
+	postlist = e_composer_header_table_get_post_to (table);
 	num_post = g_list_length(postlist);
 	g_list_foreach(postlist, (GFunc)g_free, NULL);
 	g_list_free(postlist);
@@ -676,6 +678,7 @@
 em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri)
 {
 	EMsgComposer *composer;
+	EComposerHeaderTable *table;
 	EAccount *account = NULL;
 
 	if (url != NULL)
@@ -683,13 +686,12 @@
 	else
 		composer = e_msg_composer_new ();
 
+	table = e_msg_composer_get_header_table (composer);
 	em_composer_utils_setup_default_callbacks (composer);
 
 	if (fromuri
 	    && (account = mail_config_get_account_by_source_url(fromuri)))
-		e_composer_header_table_set_account_name (
-			e_msg_composer_get_header_table (composer),
-			account->name);
+		e_composer_header_table_set_account_name (table, account->name);
 
 	e_msg_composer_unset_changed (composer);
 	e_msg_composer_drop_editor_undo (composer);
@@ -710,14 +712,19 @@
 em_utils_post_to_folder (CamelFolder *folder)
 {
 	EMsgComposer *composer;
+	EComposerHeaderTable *table;
 	EAccount *account;
 
 	composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST);
+	table = e_msg_composer_get_header_table (composer);
 
 	if (folder != NULL) {
 		char *url = mail_tools_folder_to_url (folder);
+		GList *list = g_list_prepend (NULL, url);
 
-		e_msg_composer_hdrs_set_post_to (e_msg_composer_get_hdrs (composer), url);
+		e_composer_header_table_set_post_to_list (table, list);
+
+		g_list_free (list);
 		g_free (url);
 
 		url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
@@ -726,8 +733,7 @@
 
 		if (account)
 			e_composer_header_table_set_account_name (
-				e_msg_composer_get_header_table (composer),
-				account->name);
+				table, account->name);
 	}
 
 	em_composer_utils_setup_default_callbacks (composer);
@@ -750,11 +756,18 @@
 em_utils_post_to_url (const char *url)
 {
 	EMsgComposer *composer;
+	EComposerHeaderTable *table;
 
 	composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST);
+	table = e_msg_composer_get_header_table (composer);
 
-	if (url != NULL)
-		e_msg_composer_hdrs_set_post_to (e_msg_composer_get_hdrs (composer), url);
+	if (url != NULL) {
+		GList *list = NULL;
+
+		list = g_list_prepend (list, (gpointer) url);
+		e_composer_header_table_set_post_to_list (table, list);
+		g_list_free (list);
+	}
 
 	em_composer_utils_setup_default_callbacks (composer);
 
@@ -1406,6 +1419,7 @@
 	const char *message_id, *references;
 	EDestination **tov, **ccv;
 	EMsgComposer *composer;
+	EComposerHeaderTable *table;
 	char *subject;
 
 	g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
@@ -1424,6 +1438,8 @@
 	} else
 		composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST);
 
+	table = e_msg_composer_get_header_table (composer);
+
 	/* Set the subject of the new message. */
 	if ((subject = (char *) camel_mime_message_get_subject (message))) {
 		if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0)
@@ -1450,7 +1466,8 @@
 		}
 
 		post = camel_address_encode((CamelAddress *)postto);
-		e_msg_composer_hdrs_set_post_to_base (e_msg_composer_get_hdrs(composer), store_url ? store_url : "", post);
+		e_composer_header_table_set_post_to_base (
+			table, store_url ? store_url : "", post);
 		g_free(post);
 		g_free (store_url);
 	}
@@ -2036,10 +2053,12 @@
 	EDestination **tov = NULL;
 	CamelFolder *real_folder;
 	EMsgComposer *composer;
+	EComposerHeaderTable *table;
 	char *subject, *url;
 	EAccount *account;
 	char *real_uid;
 	guint32 flags;
+	GList *list = NULL;
 
 	if (message == NULL)
 		return;
@@ -2063,6 +2082,7 @@
 	get_reply_sender (message, to, NULL);
 
 	composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL_POST);
+	table = e_msg_composer_get_header_table (composer);
 
 	/* construct the tov/ccv */
 	tov = em_utils_camel_address_to_destination (to);
@@ -2082,7 +2102,11 @@
 	g_free (subject);
 
 	url = mail_tools_folder_to_url (real_folder);
-	e_msg_composer_hdrs_set_post_to (e_msg_composer_get_hdrs(composer), url);
+	list = g_list_prepend (list, url);
+
+	e_composer_header_table_set_post_to_list (table, list);
+
+	g_list_free (list);
 	g_free (url);
 
 	/* Add In-Reply-To and References. */

Modified: branches/mbarnes-composer/plugins/mailing-list-actions/mailing-list-actions.c
==============================================================================
--- branches/mbarnes-composer/plugins/mailing-list-actions/mailing-list-actions.c	(original)
+++ branches/mbarnes-composer/plugins/mailing-list-actions/mailing-list-actions.c	Sat Jan 26 21:33:55 2008
@@ -152,7 +152,7 @@
 				if ((account = mail_config_get_account_by_source_url (action_data->uri)))
 					e_composer_header_table_set_account (
 						e_msg_composer_get_header_table (composer),
-						account->name);
+						account);
 				em_utils_composer_send_cb (composer, NULL);
 			} else if (send_message_response == GTK_RESPONSE_NO) {
 				/* show composer */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]