aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-hdrs.h
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-26 02:19:46 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-26 02:19:46 +0800
commitd725c8968467214a0cbf59c4e2dded119cbb6ab6 (patch)
tree78fcb4d0e4575c8bf5cf2e7d3426f7607bd572b7 /composer/e-msg-composer-hdrs.h
parent59e2b13f220076c53598b1097eeb35e6b390b0b1 (diff)
downloadgsoc2013-evolution-d725c8968467214a0cbf59c4e2dded119cbb6ab6.tar
gsoc2013-evolution-d725c8968467214a0cbf59c4e2dded119cbb6ab6.tar.gz
gsoc2013-evolution-d725c8968467214a0cbf59c4e2dded119cbb6ab6.tar.bz2
gsoc2013-evolution-d725c8968467214a0cbf59c4e2dded119cbb6ab6.tar.lz
gsoc2013-evolution-d725c8968467214a0cbf59c4e2dded119cbb6ab6.tar.xz
gsoc2013-evolution-d725c8968467214a0cbf59c4e2dded119cbb6ab6.tar.zst
gsoc2013-evolution-d725c8968467214a0cbf59c4e2dded119cbb6ab6.zip
Create the Post-To header. (headers_set_visibility): Possibly show the
2002-07-24 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer-hdrs.c (create_headers): Create the Post-To header. (headers_set_visibility): Possibly show the Post-To header. (attach_headers): Attach the Post-To header. (e_msg_composer_hdrs_set_post_to): Set the text for the Post-To header. (e_msg_composer_hdrs_get_post_to_label): Return the label widget for this header pair. (e_msg_composer_hdrs_set_visible_mask): New function to set the visible mask (so we can disallow certain headers to be shown). (e_msg_composer_hdrs_new): Save the visible mask argument. (setup_headers): To: does not always have to be visible anymore. (e_msg_composer_hdrs_get_post_to): New function to get the url for the Post-To folder. * e-msg-composer.c (e_msg_composer_get_visible_flags): Set the Post-To bit when it is supposed to be visible. (e_msg_composer_new_post): Set the visible_mask to only allow the headers needed for Posting. svn path=/trunk/; revision=17590
Diffstat (limited to 'composer/e-msg-composer-hdrs.h')
-rw-r--r--composer/e-msg-composer-hdrs.h46
1 files changed, 35 insertions, 11 deletions
diff --git a/composer/e-msg-composer-hdrs.h b/composer/e-msg-composer-hdrs.h
index cd8d8fb579..c175dc6564 100644
--- a/composer/e-msg-composer-hdrs.h
+++ b/composer/e-msg-composer-hdrs.h
@@ -21,10 +21,14 @@
* Author: Ettore Perazzoli
*/
+
#ifndef ___E_MSG_COMPOSER_HDRS_H__
#define ___E_MSG_COMPOSER_HDRS_H__
#include <gtk/gtktable.h>
+
+#include <bonobo/bonobo-ui-component.h>
+
#include <camel/camel-mime-message.h>
#include <addressbook/backend/ebook/e-destination.h>
#include <mail/mail-config.h>
@@ -54,6 +58,8 @@ struct _EMsgComposerHdrs {
const MailConfigAccount *account;
+ guint32 visible_mask;
+
gboolean has_changed;
};
@@ -70,16 +76,27 @@ struct _EMsgComposerHdrsClass {
};
typedef enum {
- E_MSG_COMPOSER_VISIBLE_FROM = 1,
- E_MSG_COMPOSER_VISIBLE_REPLYTO = 2,
- E_MSG_COMPOSER_VISIBLE_CC = 4,
- E_MSG_COMPOSER_VISIBLE_BCC = 8,
- E_MSG_COMPOSER_VISIBLE_SUBJECT = 16
+ E_MSG_COMPOSER_VISIBLE_FROM = (1 << 0),
+ E_MSG_COMPOSER_VISIBLE_REPLYTO = (1 << 1),
+ E_MSG_COMPOSER_VISIBLE_TO = (1 << 2),
+ E_MSG_COMPOSER_VISIBLE_CC = (1 << 3),
+ E_MSG_COMPOSER_VISIBLE_BCC = (1 << 4),
+ E_MSG_COMPOSER_VISIBLE_POSTTO = (1 << 5), /* for posting to folders */
+ E_MSG_COMPOSER_VISIBLE_NEWSGROUP = (1 << 6), /* for posting to newsgroups */
+ E_MSG_COMPOSER_VISIBLE_SUBJECT = (1 << 7)
} EMsgComposerHeaderVisibleFlags;
-
+#define E_MSG_COMPOSER_VISIBLE_MASK_SENDER (E_MSG_COMPOSER_VISIBLE_FROM | E_MSG_COMPOSER_VISIBLE_REPLYTO)
+#define E_MSG_COMPOSER_VISIBLE_MASK_BASIC (E_MSG_COMPOSER_VISIBLE_MASK_SENDER | E_MSG_COMPOSER_VISIBLE_SUBJECT)
+#define E_MSG_COMPOSER_VISIBLE_MASK_RECIPIENTS (E_MSG_COMPOSER_VISIBLE_TO | E_MSG_COMPOSER_VISIBLE_CC | E_MSG_COMPOSER_VISIBLE_BCC)
+
+#define E_MSG_COMPOSER_VISIBLE_MASK_MAIL (E_MSG_COMPOSER_VISIBLE_MASK_BASIC | E_MSG_COMPOSER_VISIBLE_MASK_RECIPIENTS)
+#define E_MSG_COMPOSER_VISIBLE_MASK_NEWS (E_MSG_COMPOSER_VISIBLE_MASK_BASIC | E_MSG_COMPOSER_VISIBLE_NEWSGROUP)
+#define E_MSG_COMPOSER_VISIBLE_MASK_POST (E_MSG_COMPOSER_VISIBLE_MASK_BASIC | E_MSG_COMPOSER_VISIBLE_POSTTO)
+
+
GtkType e_msg_composer_hdrs_get_type (void);
-GtkWidget *e_msg_composer_hdrs_new (gint visible_flags);
+GtkWidget *e_msg_composer_hdrs_new (BonoboUIComponent *uic, int visible_mask, int visible_flags);
void e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
CamelMimeMessage *msg);
@@ -87,6 +104,7 @@ void e_msg_composer_hdrs_to_message (EMsgComposerHdrs *hdrs,
void e_msg_composer_hdrs_to_redirect (EMsgComposerHdrs *hdrs,
CamelMimeMessage *msg);
+
void e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
const char *account_name);
void e_msg_composer_hdrs_set_reply_to (EMsgComposerHdrs *hdrs,
@@ -97,6 +115,8 @@ void e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
EDestination **cc_destv);
void e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
EDestination **bcc_destv);
+void e_msg_composer_hdrs_set_post_to (EMsgComposerHdrs *hdrs,
+ const char *post_to);
void e_msg_composer_hdrs_set_subject (EMsgComposerHdrs *hdrs,
const char *subject);
@@ -107,18 +127,22 @@ EDestination **e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs);
EDestination **e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs);
EDestination **e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs);
EDestination **e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs);
+char *e_msg_composer_hdrs_get_post_to (EMsgComposerHdrs *hdrs);
char *e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs);
+GtkWidget *e_msg_composer_hdrs_get_from_hbox (EMsgComposerHdrs *hdrs);
+GtkWidget *e_msg_composer_hdrs_get_from_omenu (EMsgComposerHdrs *hdrs);
GtkWidget *e_msg_composer_hdrs_get_reply_to_entry (EMsgComposerHdrs *hdrs);
GtkWidget *e_msg_composer_hdrs_get_to_entry (EMsgComposerHdrs *hdrs);
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_post_to_label (EMsgComposerHdrs *hdrs);
GtkWidget *e_msg_composer_hdrs_get_subject_entry (EMsgComposerHdrs *hdrs);
-GtkWidget *e_msg_composer_hdrs_get_from_hbox (EMsgComposerHdrs *hdrs);
-GtkWidget *e_msg_composer_hdrs_get_from_omenu (EMsgComposerHdrs *hdrs);
-void e_msg_composer_set_hdrs_visible (EMsgComposerHdrs *hdrs,
- gint flags);
+void e_msg_composer_hdrs_set_visible_mask (EMsgComposerHdrs *hdrs,
+ int visible_mask);
+void e_msg_composer_hdrs_set_visible (EMsgComposerHdrs *hdrs,
+ int visible_flags);
#ifdef _cplusplus
}