diff options
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 10 | ||||
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 25 |
2 files changed, 22 insertions, 13 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 8d7517011b..a4fa08c212 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,13 @@ +2002-04-12 Jeffrey Stedfast <fejj@ximian.com> + + * e-msg-composer-hdrs.c (from_changed): Change the Reply-To header + contents. + (e_msg_composer_hdrs_set_reply_to): The Reply-To entry was an + EEntry, not a bonobo control so fix this to set the text using + e_entry_set_text. + (e_msg_composer_hdrs_get_reply_to): Use e_entry_get_text here for + the same reason. + 2002-04-08 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer.c (set_editor_text): No need to query for the diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index bfc9b6fbaf..9578f9ba7c 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -168,8 +168,15 @@ static void from_changed (GtkWidget *item, gpointer data) { EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (data); + const char *reply_to; hdrs->account = gtk_object_get_data (GTK_OBJECT (item), "account"); + + /* we do this rather than calling e_msg_composer_hdrs_set_reply_to() + because we don't want to change the visibility of the header */ + reply_to = hdrs->account->id->reply_to; + e_entry_set_text (E_ENTRY (hdrs->priv->reply_to.entry), reply_to ? reply_to : ""); + gtk_signal_emit (GTK_OBJECT (hdrs), signals [FROM_CHANGED]); } @@ -828,11 +835,10 @@ void e_msg_composer_hdrs_set_reply_to (EMsgComposerHdrs *hdrs, const char *reply_to) { - g_return_if_fail (hdrs != NULL); g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs)); - bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->reply_to.entry), - "text", reply_to, NULL); + e_entry_set_text (E_ENTRY (hdrs->priv->reply_to.entry), reply_to ? reply_to : ""); + if (reply_to && *reply_to) set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE); } @@ -919,28 +925,21 @@ CamelInternetAddress * e_msg_composer_hdrs_get_reply_to (EMsgComposerHdrs *hdrs) { CamelInternetAddress *addr; - char *reply_to; + const char *reply_to; - g_return_val_if_fail (hdrs != NULL, NULL); g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL); - gtk_object_get (GTK_OBJECT (hdrs->priv->reply_to.entry), - "text", &reply_to, NULL); + reply_to = e_entry_get_text (E_ENTRY (hdrs->priv->reply_to.entry)); - if (!reply_to || *reply_to == '\0') { - g_free (reply_to); + if (!reply_to || *reply_to == '\0') return NULL; - } addr = camel_internet_address_new (); if (camel_address_unformat (CAMEL_ADDRESS (addr), reply_to) == -1) { - g_free (reply_to); camel_object_unref (CAMEL_OBJECT (addr)); return NULL; } - g_free (reply_to); - return addr; } |