aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog15
-rw-r--r--composer/e-msg-composer-hdrs.c70
-rw-r--r--composer/e-msg-composer.c2
3 files changed, 67 insertions, 20 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 9c778989dd..5053da1894 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,5 +1,20 @@
2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
+ * e-msg-composer-hdrs.c (set_entry): New.
+ (e_msg_composer_hdrs_set_to): Use it.
+ (e_msg_composer_hdrs_set_cc): Likewise
+ (e_msg_composer_hdrs_set_bcc): Likewise.
+ (e_msg_composer_hdrs_get_to): Replace implementation with a
+ `g_assert_not_reached()'.
+ (e_msg_composer_hdrs_get_cc): Likewise.
+ (e_msg_composer_hdrs_get_bcc): Likewise.
+
+ * e-msg-composer.c: Get rid of cut/copy/paste/undo as they
+ duplicate the editor toolbar and cannot be made to work for all
+ the widgets anyway.
+
+2000-07-08 Ettore Perazzoli <ettore@helixcode.com>
+
* e-msg-composer-hdrs.c: New member `corba_select_names' in
`EMsgComposerHdrsPrivate'.
(destroy): If not `CORBA_OBJECT_NIL', release.
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index b40934f487..0a29724d98 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -190,11 +190,25 @@ add_header (EMsgComposerHdrs *hdrs,
entry = gtk_entry_new ();
if (entry != NULL) {
- gtk_table_attach (GTK_TABLE (hdrs), entry,
+ GtkWidget *widget_to_attach;
+
+ /* The entries we get from ::SelectNames don't have a frame.
+ FIXME: They should. */
+ if (GTK_IS_ENTRY (entry)) {
+ widget_to_attach = entry;
+ } else {
+ widget_to_attach = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (widget_to_attach), GTK_SHADOW_IN);
+ gtk_container_add (GTK_CONTAINER (widget_to_attach), entry);
+ gtk_widget_show (widget_to_attach);
+ }
+
+ gtk_widget_show (entry);
+
+ gtk_table_attach (GTK_TABLE (hdrs), widget_to_attach,
1, 2, priv->num_hdrs, priv->num_hdrs + 1,
GTK_FILL | GTK_EXPAND, GTK_FILL,
2, 2);
- gtk_widget_show (entry);
gtk_tooltips_set_tip (hdrs->priv->tooltips, entry, tip, tip_private);
}
@@ -447,43 +461,53 @@ e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
}
+static void
+set_entry (BonoboWidget *bonobo_widget,
+ const GList *list)
+{
+ GString *string;
+ const GList *p;
+
+ string = g_string_new (NULL);
+ for (p = list; p != NULL; p = p->next) {
+ if (string->str[0] != '\0')
+ g_string_append (string, ", ");
+ g_string_append (string, p->data);
+ }
+
+ bonobo_widget_set_property (BONOBO_WIDGET (bonobo_widget), "text", string->str, NULL);
+
+ g_string_free (string, TRUE);
+}
+
void
e_msg_composer_hdrs_set_to (EMsgComposerHdrs *hdrs,
const GList *to_list)
{
- EMsgComposerAddressEntry *entry;
-
g_return_if_fail (hdrs != NULL);
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
- entry = E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->to_entry);
- e_msg_composer_address_entry_set_list (entry, to_list);
+ set_entry (BONOBO_WIDGET (hdrs->priv->to_entry), to_list);
}
void
e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
const GList *cc_list)
{
- EMsgComposerAddressEntry *entry;
-
g_return_if_fail (hdrs != NULL);
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
- entry = E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->cc_entry);
- e_msg_composer_address_entry_set_list (entry, cc_list);
+ set_entry (BONOBO_WIDGET (hdrs->priv->cc_entry), cc_list);
}
void
e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
const GList *bcc_list)
{
- EMsgComposerAddressEntry *entry;
-
g_return_if_fail (hdrs != NULL);
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
- entry = E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->bcc_entry);
- e_msg_composer_address_entry_set_list (entry, bcc_list);
+ set_entry (BONOBO_WIDGET (hdrs->priv->bcc_entry), bcc_list);
}
void
@@ -501,34 +525,40 @@ e_msg_composer_hdrs_set_subject (EMsgComposerHdrs *hdrs,
}
+/* FIXME this is currently unused and broken. */
GList *
e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (hdrs != NULL, NULL);
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
- return e_msg_composer_address_entry_get_addresses
- (E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->to_entry));
+ g_assert_not_reached ();
+
+ return NULL;
}
+/* FIXME this is currently unused and broken. */
GList *
e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (hdrs != NULL, NULL);
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
- return e_msg_composer_address_entry_get_addresses
- (E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->cc_entry));
+ g_assert_not_reached ();
+
+ return NULL;
}
+/* FIXME this is currently unused and broken. */
GList *
e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (hdrs != NULL, NULL);
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
- return e_msg_composer_address_entry_get_addresses
- (E_MSG_COMPOSER_ADDRESS_ENTRY (hdrs->priv->bcc_entry));
+ g_assert_not_reached ();
+
+ return NULL;
}
const char *
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 06363a0eb5..6c4ea73270 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -745,11 +745,13 @@ create_menubar (EMsgComposer *composer)
static GnomeUIInfo toolbar_info[] = {
GNOMEUIINFO_ITEM_STOCK (N_("Send"), N_("Send this message"), send_cb, GNOME_STOCK_PIXMAP_MAIL_SND),
+#if 0
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_ITEM_STOCK (N_("Cut"), N_("Cut selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_CUT),
GNOMEUIINFO_ITEM_STOCK (N_("Copy"), N_("Copy selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_COPY),
GNOMEUIINFO_ITEM_STOCK (N_("Paste"), N_("Paste selected region into the clipboard"), NULL, GNOME_STOCK_PIXMAP_PASTE),
GNOMEUIINFO_ITEM_STOCK (N_("Undo"), N_("Undo last operation"), NULL, GNOME_STOCK_PIXMAP_UNDO),
+#endif
GNOMEUIINFO_SEPARATOR,
GNOMEUIINFO_ITEM_STOCK (N_("Attach"), N_("Attach a file"), add_attachment_cb, GNOME_STOCK_PIXMAP_ATTACH),
GNOMEUIINFO_END