aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gnome-cal.h
blob: 85245450372b703ac835b374af0414ce9aa46984 (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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
/* Evolution calendar - Main calendar view widget
 *
 * Copyright (C) 1998 The Free Software Foundation
 * Copyright (C) 2000 Ximian, Inc.
 * Copyright (C) 2001 Ximian, Inc.
 *
 * Authors: Miguel de Icaza <miguel@ximian.com>
 *          Federico Mena-Quintero <federico@ximian.com>
 *          Seth Alves <alves@hungry.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#ifndef GNOME_CALENDAR_APP_H
#define GNOME_CALENDAR_APP_H

#include <time.h>
#include <gtk/gtkvbox.h>
#include <bonobo/bonobo-ui-component.h>
#include <misc/e-calendar.h>
#include <libecal/e-cal.h>

#include "e-calendar-table.h"

G_BEGIN_DECLS



struct _EPopup;

#define GNOME_TYPE_CALENDAR            (gnome_calendar_get_type ())
#define GNOME_CALENDAR(obj)            (GTK_CHECK_CAST ((obj), GNOME_TYPE_CALENDAR, GnomeCalendar))
#define GNOME_CALENDAR_CLASS(klass)    (GTK_CHECK_CAST_CLASS ((klass), GNOME_TYPE_CALENDAR, \
                    GnomeCalendarClass))
#define GNOME_IS_CALENDAR(obj)         (GTK_CHECK_TYPE ((obj), GNOME_TYPE_CALENDAR))
#define GNOME_IS_CALENDAR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CALENDAR))

typedef struct _GnomeCalendar GnomeCalendar;
typedef struct _GnomeCalendarClass GnomeCalendarClass;
typedef struct _GnomeCalendarPrivate GnomeCalendarPrivate;

/* View types */
typedef enum {
    GNOME_CAL_DAY_VIEW,
    GNOME_CAL_WORK_WEEK_VIEW,
    GNOME_CAL_WEEK_VIEW,
    GNOME_CAL_MONTH_VIEW,
    GNOME_CAL_LIST_VIEW,
    GNOME_CAL_LAST_VIEW
} GnomeCalendarViewType;

typedef enum {
    GNOME_CAL_GOTO_TODAY,
    GNOME_CAL_GOTO_DATE,
    GNOME_CAL_GOTO_FIRST_DAY_OF_MONTH,
    GNOME_CAL_GOTO_LAST_DAY_OF_MONTH,
    GNOME_CAL_GOTO_FIRST_DAY_OF_WEEK,
    GNOME_CAL_GOTO_LAST_DAY_OF_WEEK,
    GNOME_CAL_GOTO_SAME_DAY_OF_PREVIOUS_WEEK,
    GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK
} GnomeCalendarGotoDateType;

struct _GnomeCalendar {
    GtkVBox vbox;

    /* Private data */
    GnomeCalendarPrivate *priv;
};

struct _GnomeCalendarClass {
    GtkVBoxClass parent_class;

    /* Notification signals */
    void (* dates_shown_changed)    (GnomeCalendar *gcal);

    void (* calendar_selection_changed) (GnomeCalendar *gcal);
    void (* taskpad_selection_changed) (GnomeCalendar *gcal);
    void (* memopad_selection_changed) (GnomeCalendar *gcal);

    void (* calendar_focus_change)  (GnomeCalendar *gcal, gboolean in);
    void (* taskpad_focus_change)   (GnomeCalendar *gcal, gboolean in);
    void (* memopad_focus_change)   (GnomeCalendar *gcal, gboolean in);
    void (* change_view) (GnomeCalendar *gcal,
                   GnomeCalendarViewType view_type);

        void (* source_added)           (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source);
        void (* source_removed)         (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source);

    /* Action signals */
        void (* goto_date)              (GnomeCalendar *gcal, GnomeCalendarGotoDateType date);
};


GtkType    gnome_calendar_get_type          (void);
GtkWidget *gnome_calendar_construct     (GnomeCalendar *gcal);

GtkWidget *gnome_calendar_new           (void);

void gnome_calendar_set_activity_handler (GnomeCalendar *cal, EActivityHandler *activity_handler);
void gnome_calendar_set_ui_component (GnomeCalendar *cal, BonoboUIComponent *ui_component);

ECalendarTable *gnome_calendar_get_task_pad (GnomeCalendar *gcal);

ECalModel *gnome_calendar_get_calendar_model    (GnomeCalendar *gcal);
ECal *gnome_calendar_get_default_client    (GnomeCalendar *gcal);

gboolean   gnome_calendar_add_source      (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source);
gboolean   gnome_calendar_remove_source   (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source);
gboolean   gnome_calendar_remove_source_by_uid   (GnomeCalendar *gcal, ECalSourceType source_type, const char *uid);
gboolean   gnome_calendar_set_default_source (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source);

void       gnome_calendar_next              (GnomeCalendar *gcal);
void       gnome_calendar_previous          (GnomeCalendar *gcal);
void       gnome_calendar_goto              (GnomeCalendar *gcal,
                         time_t new_time);
void       gnome_calendar_dayjump           (GnomeCalendar *gcal,
                         time_t time);
/* Jumps to the current day */
void       gnome_calendar_goto_today            (GnomeCalendar *gcal);

GnomeCalendarViewType gnome_calendar_get_view (GnomeCalendar *gcal);
void gnome_calendar_set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type);

GtkWidget *gnome_calendar_get_current_view_widget (GnomeCalendar *gcal);

ECalendarTable *gnome_calendar_get_task_pad (GnomeCalendar *gcal);
GtkWidget *gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal); 
GtkWidget *gnome_calendar_get_search_bar_widget (GnomeCalendar *gcal);
GtkWidget *gnome_calendar_get_view_notebook_widget (GnomeCalendar *gcal);
GtkWidget *gnome_calendar_get_tag (GnomeCalendar *gcal);

struct _ECalMenu *gnome_calendar_get_taskpad_menu (GnomeCalendar *gcal);
struct _ECalMenu *gnome_calendar_get_calendar_menu (GnomeCalendar *gcal);
struct _ECalMenu *gnome_calendar_get_memopad_menu (GnomeCalendar *gcal);

void gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic);
void gnome_calendar_discard_view_menus (GnomeCalendar *gcal);

void gnome_calendar_view_popup_factory (GnomeCalendar *gcal, struct _EPopup *ep, const char *prefix);

void       gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
                           time_t     start_time,
                           time_t     end_time);
void       gnome_calendar_get_selected_time_range (GnomeCalendar *gcal,
                           time_t    *start_time,
                           time_t    *end_time);

void       gnome_calendar_new_task      (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend);

/* Returns the selected time range for the current view. Note that this may be
   different from the fields in the GnomeCalendar, since the view may clip
   this or choose a more appropriate time. */
void       gnome_calendar_get_current_time_range (GnomeCalendar *gcal,
                          time_t     *start_time,
                          time_t     *end_time);

/* Gets the visible time range for the current view. Returns FALSE if no
   time range has been set yet. */
gboolean   gnome_calendar_get_visible_time_range (GnomeCalendar *gcal,
                          time_t     *start_time,
                          time_t     *end_time);

/* Returns the number of selected events (0 or 1 at present). */
gint       gnome_calendar_get_num_events_selected (GnomeCalendar *gcal);

/* Returns the number of selected tasks */
gint       gnome_calendar_get_num_tasks_selected (GnomeCalendar *gcal);

/* Get the current timezone. */
icaltimezone *gnome_calendar_get_timezone   (GnomeCalendar  *gcal);


/* Clipboard operations */
void       gnome_calendar_cut_clipboard         (GnomeCalendar  *gcal);
void       gnome_calendar_copy_clipboard        (GnomeCalendar  *gcal);
void       gnome_calendar_paste_clipboard       (GnomeCalendar  *gcal);

void       gnome_calendar_delete_selection  (GnomeCalendar  *gcal);
void       gnome_calendar_delete_selected_occurrence (GnomeCalendar *gcal);
void       gnome_calendar_purge                 (GnomeCalendar  *gcal,
                         time_t older_than);



/* Direct calendar component operations */
void       gnome_calendar_edit_appointment      (GnomeCalendar *gcal,
                         const char* src_uid,
                         const char* comp_uid,
                         const char* comp_rid);

GtkWidget * gnome_calendar_get_tag (GnomeCalendar *gcal);

void gnome_calendar_emit_user_created_signal  (gpointer instance, GnomeCalendar *gcal, ECal *calendar);

G_END_DECLS

#endif
bb68dec5a445b0ea7d271c3e2c7508b26'>Default the composer's title to "Create a message". Fixes bug #39696.Jeffrey Stedfast2003-03-142-1/+7 * Use GnomeIconList instead of EIconList so we don't have to maintain anJeffrey Stedfast2003-03-126-2887/+70 * add send_cb/save_draft_cb arguments. (impl_Composer_send): use the localNot Zed2003-03-103-72/+55 * Don't allow the returned charset to be NULL. (get_file_content): Make sureJeffrey Stedfast2003-03-052-2/+13 * disconnect any signal handlers on the accounts object. For bug #37873.Not Zed2003-03-042-0/+6 * Same as below.Jeffrey Stedfast2003-02-263-5/+12 * Make sure the url is != NULL? I can't think of anything else in this codeJeffrey Stedfast2003-02-252-0/+8 * Fixed a memory leak.Jeffrey Stedfast2003-02-252-0/+6 * Don't save the HTML format setting to gconf. This option menu is meant forJeffrey Stedfast2003-02-232-5/+8 * build libcomposer as a shared library so it can be linked intoDan Winship2003-02-222-2/+7 * Same as below.Jeffrey Stedfast2003-02-213-4/+12 * default_account is now a string value, not an int.Jeffrey Stedfast2003-02-193-17/+30 * clean upDan Winship2003-02-069-11/+36 * Split out the mailto handling code from here so we can use it in theJeffrey Stedfast2003-02-062-36/+60 * updated for e scroll frame --> gtk scrolled windowRadek Doulik2003-02-052-12/+12 * ops, buildJeffrey Stedfast2003-02-041-5/+2 * Just use gnome_vfs_get_mime_type_from_name().Jeffrey Stedfast2003-02-042-21/+8 * Give gnome_vfs_get_uri_from_local_path a full path.Jeffrey Stedfast2003-02-022-10/+31 * If the subject or body components of the mailto url are not in UTF-8,Jeffrey Stedfast2003-01-282-2/+27 * Fixed a #warning by converting the filename into a uri before passing itJeffrey Stedfast2003-01-283-30/+164 * (iconsdir): Remove, this is now defined inEttore Perazzoli2003-01-252-2/+5 * Load the view menu states from gconf. (e_msg_composer_set_send_html): SaveJeffrey Stedfast2003-01-243-102/+84 * *** empty log message ***Ettore Perazzoli2003-01-233-5/+13 * Updated to use EAccountList and iterators. (evolution_composer_init):Jeffrey Stedfast2003-01-186-49/+92 * mail_config_get_signature_list now returns a GSList.Jeffrey Stedfast2003-01-172-13/+19 * (do_exit): Make dialog HIG compliantEttore Perazzoli2003-01-152-3/+14 * don't pass NULL to bonobo_widget_set_property.Chris Toshok2003-01-102-3/+10 * need to ref/sink "new" so that the g_object_unref doesn't spew a warning.Chris Toshok2003-01-102-1/+9 * Icons are now in $(datadir)/evolution/imagesEttore Perazzoli2003-01-092-1/+6 * Use gconf to get the default account index.Jeffrey Stedfast2003-01-092-36/+48 * use the composer's charset gconf keyJeffrey Stedfast2003-01-082-2/+2 * New convenience function. (attach_to_multipart): UseJeffrey Stedfast2003-01-082-1/+23 * Convenience function. (get_file_content): Use the convenience function toJeffrey Stedfast2003-01-082-4/+44 * remove idldir definition. (It's defined in configure.in now)Dan Winship2003-01-062-1/+5 * fixed to build with -DG[TK]_DISABLE_DEPRECATEDJeffrey Stedfast2003-01-032-1/+2 * fixesJeffrey Stedfast2003-01-032-12/+5 * Use camel_text_to_html(). (e_msg_composer_new_from_url): Same.Jeffrey Stedfast2002-12-173-17/+25 * Fix for bug #33295Jeffrey Stedfast2002-12-082-71/+72 * Get rid of the unused exception variable.Jeffrey Stedfast2002-12-042-5/+5 * removed warning about e_notice. its used too much, its here to stay.Not Zed2002-12-0211-45/+51 * removed merge conflictsJeffrey Stedfast2002-12-021-1/+0 * s/g_str[n]casecmp/str[n]casecmpJeffrey Stedfast2002-12-022-11/+16 * properly chain finalise.Not Zed2002-11-262-2/+9 * Remove the window size setting. (e_msg_composer_attachment_bar_new): MoveNot Zed2002-11-252-18/+26 * rewrote most of this. Just use gtkfileselection directly, noNot Zed2002-11-254-223/+91 * Duh! dont free subject & simplify logic a little.Not Zed2002-11-213-9/+14 * applied plain_signature_fix.patchRadek Doulik2002-11-202-1/+6 * dont unref after destroy. duh.Not Zed2002-11-195-24/+53 * Remove check for gtk_main_level(). as far as i can tell it serves no realNot Zed2002-11-182-36/+53 * ignore composer-marshal.[ch]Chris Toshok2002-11-171-0/+1 * Removed {BEGIN,END}_GNOME_DECLS.Ettore Perazzoli2002-11-144-9/+9 * bonobo api changes.Not Zed2002-11-132-3/+5 * Use the right object_new method.Not Zed2002-11-133-3/+14 * Remove some unused ehaders and ones that cause compilation failures (suchJeffrey Stedfast2002-11-113-34/+30 * Fix bonobo object setup.Not Zed2002-11-0816-750/+745 * Add support for an attach option in the mailto: url.Jeffrey Stedfast2002-11-022-1/+8 * comment fixJeffrey Stedfast2002-11-021-1/+1 * Make sure to save References and In-Reply-To headers. Fixes bug #32932.Jeffrey Stedfast2002-10-312-1/+8 * Don't set the charset param on text parts nor tha rawtext bit on theJeffrey Stedfast2002-10-282-10/+23 * (size_to_string): Return NULLEttore Perazzoli2002-10-262-3/+14 * Only add the account address to the list of addresses if it is non-NULL.Jeffrey Stedfast2002-10-222-1/+9 * We need to treat message/rfc822 streams differently. Fixes bug #32378.Jeffrey Stedfast2002-10-172-1/+17 * Mark the file selector modal. Quick fix for bug #32256.Not Zed2002-10-172-0/+6 * Set content->rawtext to TRUE for text parts because the content is in itsJeffrey Stedfast2002-10-082-7/+33 * Don't create a new file if the file doesn't exist.Jeffrey Stedfast2002-10-052-2/+8 * If the user hits cancel when signing/encrypting, don't continueJeffrey Stedfast2002-10-022-2/+8 * When signing/encrypting a part, if a USER_CANCEL occurs, re-use the partJeffrey Stedfast2002-10-022-2/+10 * It's a grand old string-review! Nitpicky and minor changes; details in the ap...Aaron Weber2002-10-013-2/+10 * let the caller set the "From" account too (by name or address).Dan Winship2002-09-303-4/+34 * Don't reuse the part that we've signed and/or encrypted, create a new partJeffrey Stedfast2002-09-282-1/+10 * Use "mail/*" for the allowed_types for the posting folder selector.Dan Winship2002-09-262-1/+6 * Only append the account name to the end of the From menu item if the emailDan Winship2002-09-252-4/+30 * Don't mark empty string with _().Zbigniew Chyla2002-09-242-1/+6 * Removed a #warning.Ettore Perazzoli2002-09-243-13/+12 * Fix non-ANSI switch statementDan Winship2002-09-232-0/+5 * allow to select last 2 menu itemsRadek Doulik2002-09-202-1/+6 * Handle multipart/signed and multipart/encrypted parts in a more expectedJeffrey Stedfast2002-09-182-33/+51 * Mark a string for translation.Kjartan Maraas2002-09-162-1/+5 * (composer_key_pressed): Don't chain the eventEttore Perazzoli2002-09-062-9/+10 * Make it so that the composer will close when the user hits Escape.Jeffrey Stedfast2002-09-052-14/+40 * removed "Set as default" menu itemRadek Doulik2002-08-282-53/+4 * Oops, we were overwriting 'multipart' with our child multipart. FixesPeter Williams2002-08-272-11/+21 * Fixes bug #29016Jeffrey Stedfast2002-08-233-89/+118 * Use an EvolutionFolderSelectorButton instead of a label to indicate theDan Winship2002-08-192-7/+22 * Don't turn on pgp signing if this is an iMIP message and pgp_no_imip_signDan Winship2002-08-152-1/+17 * Make the warning dialog display the message subject so that it is moreJeffrey Stedfast2002-08-142-12/+28 * Set the file-selection window icon. Fixes the mailer part of bug #7368.Jeffrey Stedfast2002-08-135-53/+64 * Don't call new_from_mime_part() since that function now does some copyingJeffrey Stedfast2002-08-132-9/+36 * Parse the auto-cc/bcc recipients and then later when parsing the cc/bccJeffrey Stedfast2002-08-012-12/+80 * new helper function (decode_signature_name): new helper functionRadek Doulik2002-07-302-4/+112 * (set_signature_gui): new helper method to set signature from draftRadek Doulik2002-07-272-1/+40 * don't assert on default, when ESC is pressed, the dialog is closed as wellRadek Doulik2002-07-272-3/+9 * Fix ChangeLog.Ettore Perazzoli2002-07-271-1/+2 * Special-case message/digest and give it a nice icon. [#9786]Ettore Perazzoli2002-07-273-2/+27 * Create the Post-To header. (headers_set_visibility): Possibly show theJeffrey Stedfast2002-07-265-136/+270 * Fix spelling.Dan Winship2002-07-262-1/+5 * restart automanager to avoid multiple dialog apearingRadek Doulik2002-07-242-2/+11 * Applied patch below.Not Zed2002-07-232-1/+11 * Reverted some code that got committed by accident.Jeffrey Stedfast2002-07-232-4/+12 * fixed up some gtk-doc commentsJeffrey Stedfast2002-07-231-5/+13 * more cleanupJeffrey Stedfast2002-07-231-78/+78 * Removed a lot of extra g_return_if_fail's that we don't need (if we areJeffrey Stedfast2002-07-232-12/+40 * Removed a lot of extra g_return_if_fail's that we don't need (if we areJeffrey Stedfast2002-07-233-177/+176 * removed insert file menu itemRadek Doulik2002-07-232-36/+4 * This should use address_encode, since its an rfc822 address, notNot Zed2002-07-192-1/+7 * use "saved" gtkhtml command (e_msg_composer_is_dirty): use "is-saved"Radek Doulik2002-07-182-3/+11 * Set the from-account last so that auto-cc/bcc recipients don't getJeffrey Stedfast2002-07-172-1/+7 * Instead of doing this with a weakref, do it by connecting to the destroyPeter Williams2002-07-173-9/+24 * added save_html_object_data parameter, use gtkhtml command to save objectRadek Doulik2002-07-163-6/+22 * Add include lines to get ebook headers relative to <ebook/foo.h>, notPeter Williams2002-07-112-2/+6 * oops, forgot to saveJeffrey Stedfast2002-07-061-1/+1 * Don't connect to the postpone signal, but do connect to the save-draftJeffrey Stedfast2002-07-065-58/+24 * Use the new CamelMultipartEncrypted class to do our encryption work forJeffrey Stedfast2002-06-272-47/+165 * Use the new CamelMultipartEncrypted class to do our encryption work forJeffrey Stedfast2002-06-272-31/+56 * Use mail_crypto_get_pgp_cipher_context() so that the PGP/GPG decision isJeffrey Stedfast2002-06-262-1/+7 * Use the new gpg cipher context rather than the old pgp context.Jeffrey Stedfast2002-06-222-22/+30 * don't convert text to html twiceRadek Doulik2002-06-202-7/+5 * added "Set as default" menu itemRadek Doulik2002-06-114-14/+92 * use new script signature interfaceRadek Doulik2002-06-082-6/+13 * Agh, priv->from.entry is no longer a GtkOptionMenu - it is an hboxJeffrey Stedfast2002-06-07