aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.h
blob: 4e73509207d08dc13472b45839f5e6a0cb0a726e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* e-msg-composer.h
 *
 * Copyright (C) 1999, 2000  Ximian, Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * published by the Free Software Foundation; either version 2 of the
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Author: Ettore Perazzoli
 */

#ifndef ___E_MSG_COMPOSER_H__
#define ___E_MSG_COMPOSER_H__

typedef struct _EMsgComposer       EMsgComposer;
typedef struct _EMsgComposerClass  EMsgComposerClass;

#include <bonobo/bonobo-win.h>
#include <bonobo/bonobo-ui-component.h>
#include <bonobo-conf/bonobo-config-database.h>

#include "e-msg-composer-attachment-bar.h"
#include "e-msg-composer-hdrs.h"
#include "Editor.h"

#include <mail/mail-config.h>

#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */


#define E_TYPE_MSG_COMPOSER        (e_msg_composer_get_type ())
#define E_MSG_COMPOSER(obj)        (GTK_CHECK_CAST ((obj), E_TYPE_MSG_COMPOSER, EMsgComposer))
#define E_MSG_COMPOSER_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_MSG_COMPOSER, EMsgComposerClass))
#define E_IS_MSG_COMPOSER(obj)         (GTK_CHECK_TYPE ((obj), E_TYPE_MSG_COMPOSER))
#define E_IS_MSG_COMPOSER_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TYPE_MSG_COMPOSER))



struct _EMsgComposer {
    BonoboWindow parent;
    
    BonoboUIComponent *uic;
    
    GtkWidget *hdrs;
    GPtrArray *extra_hdr_names, *extra_hdr_values;
    
    GtkWidget *editor;
    
    GtkWidget *attachment_bar;
    GtkWidget *attachment_scroll_frame;
    
    GtkWidget *address_dialog;
    
    Bonobo_PersistFile       persist_file_interface;
    Bonobo_PersistStream     persist_stream_interface;
    GNOME_GtkHTML_Editor_Engine  editor_engine;
    BonoboObject            *editor_listener;
    GHashTable              *inline_images, *inline_images_by_url;
    GList                   *current_images;

    Bonobo_ConfigDatabase    config_db;
    
    char *charset;

    char *autosave_file;
        int   autosave_fd;

    gboolean attachment_bar_visible : 1;
    gboolean send_html     : 1;
    gboolean pgp_sign      : 1;
    gboolean pgp_encrypt   : 1;
    gboolean smime_sign    : 1;
    gboolean smime_encrypt : 1;
    gboolean view_from     : 1;
    gboolean view_replyto  : 1;
    gboolean view_bcc      : 1;
    gboolean view_cc       : 1;
    gboolean view_subject  : 1;
    gboolean has_changed   : 1;
    gboolean no_body       : 1;

    gboolean in_signature_insert : 1;
};

struct _EMsgComposerClass {
    BonoboWindowClass parent_class;
    
    void (* send) (EMsgComposer *composer);
    void (* postpone) (EMsgComposer *composer);
};


GtkType           e_msg_composer_get_type             (void);
EMsgComposer     *e_msg_composer_new                  (void);
EMsgComposer     *e_msg_composer_new_with_message     (CamelMimeMessage *msg);
EMsgComposer     *e_msg_composer_new_from_url         (const char       *url);
void              e_msg_composer_show_attachments     (EMsgComposer     *composer,
                               gboolean          show);
void              e_msg_composer_set_headers          (EMsgComposer     *composer,
                               const char       *from,
                               EDestination    **to,
                               EDestination    **cc,
                               EDestination    **bcc,
                               const char       *subject);
void              e_msg_composer_set_body_text        (EMsgComposer     *composer,
                               const char       *text);
void              e_msg_composer_add_header           (EMsgComposer     *composer,
                               const char       *name,
                               const char       *value);
void              e_msg_composer_attach               (EMsgComposer     *composer,
                               CamelMimePart    *attachment);
CamelMimePart    *e_msg_composer_add_inline_image_from_file      (EMsgComposer  *composer,
                                  const char    *filename);
void              e_msg_composer_add_inline_image_from_mime_part (EMsgComposer  *composer,
                                  CamelMimePart *part);
CamelMimeMessage *e_msg_composer_get_message          (EMsgComposer     *composer);
CamelMimeMessage *e_msg_composer_get_message_draft    (EMsgComposer     *composer);
void              e_msg_composer_show_sig_file        (EMsgComposer     *composer);
gboolean          e_msg_composer_get_send_html        (EMsgComposer     *composer);
void              e_msg_composer_set_send_html        (EMsgComposer     *composer,
                               gboolean          send_html);
gboolean          e_msg_composer_get_view_from        (EMsgComposer     *composer);
void              e_msg_composer_set_view_from        (EMsgComposer     *composer,
                               gboolean          view_from);

gboolean          e_msg_composer_get_view_replyto     (EMsgComposer     *composer);
void              e_msg_composer_set_view_replyto     (EMsgComposer     *composer,
                               gboolean          view_replyto);

gboolean          e_msg_composer_get_view_bcc         (EMsgComposer     *composer);
void              e_msg_composer_set_view_bcc         (EMsgComposer     *composer,
                               gboolean          view_bcc);
gboolean          e_msg_composer_get_view_cc          (EMsgComposer     *composer);
void              e_msg_composer_set_view_cc          (EMsgComposer     *composer,
                               gboolean          view_cc);

EDestination    **e_msg_composer_get_recipients       (EMsgComposer     *composer);

const MailConfigAccount *e_msg_composer_get_preferred_account (EMsgComposer *composer);

void              e_msg_composer_clear_inlined_table  (EMsgComposer     *composer);
gchar *           e_msg_composer_guess_mime_type      (const gchar *file_name);

void              e_msg_composer_set_changed          (EMsgComposer *composer);
void              e_msg_composer_unset_changed        (EMsgComposer *composer);

/* PGP */
void              e_msg_composer_set_pgp_sign         (EMsgComposer     *composer,
                               gboolean          pgp_sign);
gboolean          e_msg_composer_get_pgp_sign         (EMsgComposer     *composer);
void              e_msg_composer_set_pgp_encrypt      (EMsgComposer     *composer,
                               gboolean          pgp_encrypt);
gboolean          e_msg_composer_get_pgp_encrypt      (EMsgComposer     *composer);

/* S/MIME */
void              e_msg_composer_set_smime_sign         (EMsgComposer     *composer,
                             gboolean          smime_sign);
gboolean          e_msg_composer_get_smime_sign         (EMsgComposer     *composer);
void              e_msg_composer_set_smime_encrypt      (EMsgComposer     *composer,
                             gboolean          smime_encrypt);
gboolean          e_msg_composer_get_smime_encrypt      (EMsgComposer     *composer);
gchar *           e_msg_composer_get_sig_file_content   (const char       *sigfile,
                             gboolean          in_html);

void              e_msg_composer_add_message_attachments (EMsgComposer *composer, 
                              CamelMimeMessage *message,
                              gboolean just_inlines);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* ___E_MSG_COMPOSER_H__ */
s='commitgraph'>* Fix package building. Also: determine max filedescriptor by usingtobez2002-01-234-60/+104 * - Remove WWW: line from pkg-descr to avoid fenner's survey (the homepagekevlo2002-01-221-4/+0 * Update to 0.27.tobez2002-01-222-2/+2 * Add gnomemimedata 1.0.1, a MIME and Application database for GNOME.sobomax2002-01-2215-0/+193 * Add a patch submitted by the author which fixes a bug I reported whereknu2002-01-222-1/+49 * Support dependencies that have backtick expressions in them, and fix a fewdes2002-01-212-7/+15 * Update Thierry Thomas' e-mail address.trevor2002-01-211-1/+1 * Stop pkg_delete time messages caused by uneraseable directories.sada2002-01-211-56/+56 * upgrade to 2.09ijliao2002-01-195-17/+23 * Add a patch submitted by the author which fixes a bug I reported whereknu2002-01-192-1/+14 * Update maintainer's email addressdwcjr2002-01-183-5/+5 * - Relinquish maintainership. I haven't used this application in a long, longwjv2002-01-171-1/+1 * Upgrade to 1.0.2. Ignore port for Python-2.2 as there aretg2002-01-153-3/+11 * Fix MASTER_SITES and WWW.jim2002-01-152-4/+4 * add p5-Chatbot-Eliza 0.97ijliao2002-01-126-0/+36 * Add ${LOCALBASE}/sbin/ back to the amrecover dependancy. It seems thatjeh2002-01-124-12/+12 * Add port misc/tuxcards A small Application, which organizes your notespat2002-01-126-0/+59 * -Add WITH_MTX option for those that want the mtx changer programjeh2002-01-114-12/+36 * Upgrade to 2.4.3b2.jeh2002-01-1132-152/+52 * Bring in a few changes to the KDE ports infrastructure, and some fixes.will2002-01-115-80/+10 * new port of patanjali, a fortune(6)-like program that displays attrevor2002-01-105-0/+49 * Update MASTER_SITEpat2002-01-091-1/+1 * If !WANT_KDE_NDEBUG and !PARALLEL_PACKAGE_BUILDING, also addwill2002-01-085-0/+15 * Add a fallback MASTER_SITE where old DISTFILES are moved to. Thislioux2002-01-071-1/+2 * o Remove incorporated patchlioux2002-01-073-45/+2 * Add humourous message if kenny is killedpat2002-01-062-3/+44 * Add missing dependency for XPM.pat2002-01-051-0/+1 * Conditionalize use of objprelink based on whether we're running onwill2002-01-055-15/+40 * A minor modification of magicpoint/files/patch-aamita2002-01-051-6/+8 * use stdlib.h instead of malloc.h For compatibility with 5-current.mita2002-01-051-0/+11 * upgrade to 3.3ijliao2002-01-032-3/+7 * New port kenny version 1.6: Translate text both to and from KennySpeaklioux2002-01-036-0/+65 * Add new port x11-wm/icemc - a graphical configuration tool to editpat2002-01-026-0/+71 * Add p5-Array-IntSpan 1.01, module for handling arrays using IntSpanpetef2002-01-016-0/+47 * Add p5-Array-Compare 1.03, perl extension for comparing arrays.petef2002-01-016-0/+49 * add cave 0.3ijliao2001-12-316-0/+37 * Add p5-Business-ISSN 0.90, perl extension for Internationalpetef2001-12-316-0/+37 * Add p5-Business-ISBN 1.64, work with International Standard Bookpetef2001-12-316-0/+40 * Update patch-dns to apply cleanly to new DNS-HOWTO.sgml.petef2001-12-292-301/+293 * Update for i386/4-STABLE. (libc_r.so.4 was removed)knu2001-12-293-14/+14 * Fix a typo in the chg-zd-mtx.sh.in file that prevented proper operationjeh2001-12-2910-5/+60 * Update compat4x for i386/4-STABLE.knu2001-12-293-9/+9 * Add WWW.demon2001-12-2870-0/+140 * Update to latest DNS-HOWTO docuemnt (includes BIND 9 information).petef2001-12-282-2/+2 * upgrade to 1.03uijliao2001-12-273-7/+8 * Update to 1.1.1demon2001-12-263-2/+76 * Fill in MASTER_SITES and WWW: (forgot to fill these in after working offline).petef2001-12-262-2/+2 * Add xrmap 2.03, map portions of the earth from a givenpetef2001-12-268-0/+844 * Add pl-sms 1.8.9h, send SMS to cellular phones in Poland (Idea,petef2001-12-267-0/+92 * portlint:dirk2001-12-262-2/+2 * Update to 4.7.petef2001-12-252-10/+19 * Maintainer is now a committermbr2001-12-241-1/+1 * portlint: remove extra whitespaces before end of line.dirk2001-12-241-1/+1 * Correct home page URL.jkoshy2001-12-241-1/+1 * - PORTDOCS policepat2001-12-247-45/+45 * upgrade to 0.2ijliao2001-12-233-4/+9 * back out granulateijliao2001-12-235-0/+28 * add graunlate backijliao2001-12-221-0/+1 * Update this port to version 0.2.1.jkh2001-12-226-520/+578 * cant fetch distfile for a LONG LONG time, so remove itijliao2001-12-216-29/+0 * fix previous commitijliao2001-12-211-1/+1 * fix previous commitijliao2001-12-218-48/+162 * Backout previous change - it seems that new revision of the patch doesn'tsobomax2001-12-202-34/+16 * Don't filter libc_r on 5-CURRENT.sobomax2001-12-202-16/+34 * Fix problem with gdk-pixbuf in one place, but mark the whole thing as B0RKEN,sobomax2001-12-194-8/+36 * New port: mtxdemon2001-12-186-0/+40 * Localized messages for KOffice.demon2001-12-187-0/+620 * 2.6.1: Some ports (e.g. www/mozilla-embedded) use MAINDIR instead ofdes2001-12-182-3/+3 * Add port misc/wmessage, a WINGs based message viewer similar to xmessagepat2001-12-188-0/+87 * upgrade to 2.9ijliao2001-12-184-29/+12 * Fix fetch errors in this port.jkh2001-12-177-119/+150 * Add misc/gkrellm-reminder, a plugin that reminds you of eventspat2001-12-157-0/+63 * I do not think that GNOME team really wants to maintain this one.sobomax2001-12-141-1/+1 * upgrade to 358ijliao2001-12-133-4/+4 * strip binaryijliao2001-12-131-0/+3 * upgrade to 1.5.2ijliao2001-12-136-164/+84 * make it run well with kronolithijliao2001-12-1311-17/+1180 * Update to 2.2.2.demon2001-12-13211-949/+2459 * add cheatahijliao2001-12-115-0/+42 * add sword-modulesijliao2001-12-1110-0/+363 * add swordijliao2001-12-1119-0/+527 * Add libelysium 0.2.6, a library of utility functions used bysobomax2001-12-109-0/+108 * update master site & WWWijliao2001-12-093-16/+5 * upgrade to 0.6.4ijliao2001-12-093-4/+9 * upgrade to 1.4ijliao2001-12-092-2/+2 * Add patch-example::amanda.conf.in to patch a simple error in anjeh2001-12-088-4/+48 * Fix a problem with auto{conf,make}: some build magic was introduced topetef2001-12-075-5/+5 * Update MASTER_SITES and WWWpat2001-12-062-2/+2 * Fix PLIST errors.jeh2001-12-0420-32/+132 * remove fixed uid/giddbaker2001-12-042-9/+5 * bump PORTREVISIONdbaker2001-12-041-1/+1 * Upgrade KDE to 2.2.2:will2001-12-0418-131/+232 * Create a "dnetc" user and group that owns relevant dnetcdbaker2001-12-043-9/+47 * Update port: v2.8010.462 -> v2.8015.469dbaker2001-12-042-3/+3 * Porteasy 2.6. The main changes are support for ports with interactivedes2001-12-042-33/+81 * Upgrade amanda to 2.4.3b1.jeh2001-12-0321-116/+130 * Update to version 1.3.steve2001-12-032-2/+2 * This port has been obsoleted by x11/kdebase2.will2001-11-306-50/+0 * o Use MASTER_SITE_LOCAL since site been down for months. No responsepat2001-11-291-7/+6 * upgrade to 1.0.2ijliao2001-11-272-8/+6 * Add libmcal - a Modular Calendar Access Librarydirk2001-11-248-0/+241 * Add libmcal.dirk2001-11-241-0/+1 * Update to 1.4.1.1.sobomax2001-11-248-10/+64 * Style police: WWW tags should either end in a file/script or TRAILING /; Fix ...lioux2001-11-211-1/+1 * Style police: WWW tags should either end in a file/script or TRAILING /; Fix ...lioux2001-11-213-3/+3 * Style police: remove trailing space in WWW taglioux2001-11-211-1/+1 * add qmcijliao2001-11-216-0/+34 * Update to 4.2.1.23 The Uptimes Project is back!pat2001-11-1912-270/+248 * Previous commit was in error, this port hasn't used wget for 2 years.kris2001-11-191-2/+0 * Add a RUN_DEPENDS on wget.kris2001-11-181-0/+2 * Update misc/menushki to version 1.0 and also take care ofpat2001-11-164-4/+4 * Maintainer is now committer so change to new email address.pat2001-11-159-9/+9 * New port gkrellmlaunch version 0.2.2: An application launcher pluginlioux2001-11-1013-0/+133 * s/malloc.h/stdlib.h/ijliao2001-11-092-0/+6 * Change the package name from "matrix" to "matrix-kmod" by settingknu2001-11-071-0/+1 * - update to 2.8petef2001-11-074-4/+37 * Update to 3.3.5.tobez2001-11-0613-276/+1026 * Update to 1.2petef2001-11-062