aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog9
-rw-r--r--composer/e-msg-composer-hdrs.c16
-rw-r--r--composer/e-msg-composer-hdrs.h1
-rw-r--r--composer/e-msg-composer.c2
4 files changed, 21 insertions, 7 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index e56746d287..83f79a2674 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,12 @@
+2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
+
+ Fixes bug #3980.
+
+ * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_cc): If a Cc list
+ is set to something non-empty, make sure to show the Cc widgets.
+ (e_msg_composer_hdrs_set_bcc): Same but for Bcc.
+ (e_msg_composer_hdrs_set_reply_to): And here.
+
2002-03-28 Christopher James Lahey <clahey@ximian.com>
* e-msg-composer-select-file.c: Switch to using EFileSelection
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index 78296394b5..c811d2d24b 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -452,7 +452,7 @@ set_pair_visibility (EMsgComposerHdrs *h, EMsgComposerHdrPair *pair, gboolean vi
}
static void
-headers_set_visibility (EMsgComposerHdrs *h, gint visible_flags)
+headers_set_visibility (EMsgComposerHdrs *h, int visible_flags)
{
EMsgComposerHdrsPrivate *p = h->priv;
@@ -464,7 +464,7 @@ headers_set_visibility (EMsgComposerHdrs *h, gint visible_flags)
}
void
-e_msg_composer_set_hdrs_visible (EMsgComposerHdrs *hdrs, gint visible_flags)
+e_msg_composer_set_hdrs_visible (EMsgComposerHdrs *hdrs, int visible_flags)
{
g_return_if_fail (hdrs != NULL);
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
@@ -474,7 +474,7 @@ e_msg_composer_set_hdrs_visible (EMsgComposerHdrs *hdrs, gint visible_flags)
}
static void
-setup_headers (EMsgComposerHdrs *hdrs, gint visible_flags)
+setup_headers (EMsgComposerHdrs *hdrs, int visible_flags)
{
create_headers (hdrs);
attach_headers (hdrs);
@@ -616,7 +616,7 @@ e_msg_composer_hdrs_get_type (void)
}
GtkWidget *
-e_msg_composer_hdrs_new (gint visible_flags)
+e_msg_composer_hdrs_new (int visible_flags)
{
EMsgComposerHdrs *new;
EMsgComposerHdrsPrivate *priv;
@@ -833,6 +833,8 @@ e_msg_composer_hdrs_set_reply_to (EMsgComposerHdrs *hdrs,
bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->reply_to.entry),
"text", reply_to, NULL);
+ if (reply_to && *reply_to)
+ set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE);
}
void
@@ -857,7 +859,9 @@ e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
str = e_destination_exportv (cc_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", str, NULL);
+ bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", str, NULL);
+ if (str && *str)
+ set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE);
g_free (str);
}
@@ -871,6 +875,8 @@ e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
str = e_destination_exportv (bcc_destv);
bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", str, NULL);
+ if (str && *str)
+ set_pair_visibility (hdrs, &hdrs->priv->bcc, TRUE);
g_free (str);
}
diff --git a/composer/e-msg-composer-hdrs.h b/composer/e-msg-composer-hdrs.h
index 9710b10d24..373bf36b8f 100644
--- a/composer/e-msg-composer-hdrs.h
+++ b/composer/e-msg-composer-hdrs.h
@@ -115,7 +115,6 @@ GtkWidget *e_msg_composer_hdrs_get_cc_entry (EMsgComposerHdrs *hdrs);
GtkWidget *e_msg_composer_hdrs_get_bcc_entry (EMsgComposerHdrs *hdrs);
GtkWidget *e_msg_composer_hdrs_get_subject_entry (EMsgComposerHdrs *hdrs);
-gint e_msg_composer_get_hdrs_visible (EMsgComposerHdrs *hdrs);
void e_msg_composer_set_hdrs_visible (EMsgComposerHdrs *hdrs,
gint flags);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 54cbe376ed..485073505e 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -711,7 +711,7 @@ get_file_content (EMsgComposer *composer, const char *file_name, gboolean want_h
fd = open (file_name, O_RDONLY | O_CREAT, 0644);
if (fd == -1) {
char *msg;
-
+
if (warn) {
msg = g_strdup_printf (_("Error while reading file %s:\n%s"),
file_name, g_strerror (errno));