aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/Makefile.am7
-rw-r--r--calendar/gui/dialogs/calendar-setup.c79
-rw-r--r--calendar/gui/dialogs/calendar-setup.h3
-rw-r--r--calendar/gui/dialogs/memo-editor.c285
-rw-r--r--calendar/gui/dialogs/memo-editor.h59
-rw-r--r--calendar/gui/dialogs/memo-page.c618
-rw-r--r--calendar/gui/dialogs/memo-page.glade323
-rw-r--r--calendar/gui/dialogs/memo-page.h56
-rw-r--r--calendar/gui/dialogs/send-comp.c3
9 files changed, 1431 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index e6b2b45434..b38b6223a2 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -51,6 +51,10 @@ libcal_dialogs_la_SOURCES = \
event-editor.h \
event-page.c \
event-page.h \
+ memo-editor.c \
+ memo-editor.h \
+ memo-page.c \
+ memo-page.h \
meeting-page.c \
meeting-page.h \
recurrence-page.c \
@@ -72,7 +76,7 @@ libcal_dialogs_la_SOURCES = \
task-page.c \
task-page.h \
url-editor-dialog.c \
- url-editor-dialog.h
+ url-editor-dialog.h
glade_DATA = \
alarm-dialog.glade \
@@ -81,6 +85,7 @@ glade_DATA = \
e-delegate-dialog.glade \
event-page.glade \
meeting-page.glade \
+ memo-page.glade \
recurrence-page.glade \
schedule-page.glade \
task-details-page.glade \
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index 3b6b578786..37b18d0d77 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -288,6 +288,8 @@ eccp_general_offline (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
else if (sdialog->source_type == E_CAL_SOURCE_TYPE_TODO)
offline_setting = gtk_check_button_new_with_label (_("Copy task list contents locally for offline operation"));
+ else if(sdialog->source_type == E_CAL_SOURCE_TYPE_JOURNAL)
+ offline_setting = gtk_check_button_new_with_label(_("Copy memo list contents locally for offline operation"));
gtk_widget_show (offline_setting);
g_signal_connect (offline_setting, "toggled", G_CALLBACK (offline_status_changed_cb), sdialog);
@@ -383,6 +385,17 @@ static ECalConfigItem ectp_items[] = {
{ 0 },
};
+static ECalConfigItem ecmp_items[] = {
+ { E_CONFIG_BOOK, "", NULL },
+ { E_CONFIG_PAGE, "00.general", N_("General") },
+ { E_CONFIG_SECTION_TABLE, "00.general/00.source", N_("Memos List") },
+ { E_CONFIG_ITEM_TABLE, "00.general/00.source/00.type", NULL, eccp_get_source_type },
+ { E_CONFIG_ITEM_TABLE, "00.general/00.source/10.name", NULL, eccp_get_source_name },
+ { E_CONFIG_ITEM_TABLE, "00.general/00.source/20.color", NULL, eccp_get_source_color },
+ { E_CONFIG_ITEM_TABLE, "00.general/00.source/30.offline", NULL, eccp_general_offline },
+ { 0 },
+};
+
/**
* calendar_setup_edit_calendar:
* @parent: parent window for dialog (current unused)
@@ -526,3 +539,69 @@ calendar_setup_new_task_list (struct _GtkWindow *parent)
{
calendar_setup_edit_task_list (parent, NULL);
}
+
+void
+calendar_setup_edit_memo_list (struct _GtkWindow *parent, ESource *source)
+{
+ CalendarSourceDialog *sdialog = g_new0 (CalendarSourceDialog, 1);
+ char *xml;
+ ECalConfig *ec;
+ int i;
+ GSList *items = NULL;
+ ECalConfigTargetSource *target;
+
+ if (source) {
+ guint32 color;
+
+ sdialog->original_source = source;
+ g_object_ref (source);
+ sdialog->source_group = e_source_peek_group (source);
+ xml = e_source_to_standalone_xml (source);
+ sdialog->source = e_source_new_from_standalone_xml (xml);
+ g_free (xml);
+
+ e_source_get_color (source, &color);
+ e_source_set_color (sdialog->source, color);
+ } else {
+ GConfClient *gconf;
+ GSList *l;
+
+ sdialog->source = e_source_new ("", "");
+ gconf = gconf_client_get_default ();
+ sdialog->source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/memos/sources");
+ l = e_source_list_peek_groups (sdialog->source_list);
+ sdialog->menu_source_groups = g_slist_copy(l);
+
+ sdialog->source_group = (ESourceGroup *)sdialog->menu_source_groups->data;
+ g_object_unref (gconf);
+ }
+
+ /* HACK: doesn't work if you don't do this */
+ e_source_set_absolute_uri (sdialog->source, NULL);
+ e_source_set_group (sdialog->source, sdialog->source_group);
+
+ sdialog->source_type = E_CAL_SOURCE_TYPE_JOURNAL;
+ sdialog->config = ec = e_cal_config_new (E_CONFIG_BOOK, "org.gnome.evolution.calendar.calendarProperties");
+ for (i = 0; ecmp_items[i].path; i++)
+ items = g_slist_prepend (items, &ecmp_items[i]);
+ e_config_add_items ((EConfig *) ec, items, eccp_commit, NULL, eccp_free, sdialog);
+ e_config_add_page_check ((EConfig *) ec, NULL, eccp_check_complete, sdialog);
+
+ target = e_cal_config_target_new_source (ec, sdialog->source);
+ target->source_type = E_CAL_SOURCE_TYPE_JOURNAL;
+ e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
+
+ sdialog->window = e_config_create_window ((EConfig *)ec, NULL, _("New Memo List"));
+
+ /* forces initial validation */
+ if (!sdialog->original_source)
+ e_config_target_changed ((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE);
+
+ return;
+}
+
+void
+calendar_setup_new_memo_list (struct _GtkWindow *parent)
+{
+ calendar_setup_edit_memo_list (parent, NULL);
+}
diff --git a/calendar/gui/dialogs/calendar-setup.h b/calendar/gui/dialogs/calendar-setup.h
index 3e266df93c..0c4c272405 100644
--- a/calendar/gui/dialogs/calendar-setup.h
+++ b/calendar/gui/dialogs/calendar-setup.h
@@ -36,6 +36,9 @@ void calendar_setup_new_calendar (struct _GtkWindow *parent);
void calendar_setup_edit_task_list (struct _GtkWindow *parent, struct _ESource *source);
void calendar_setup_new_task_list (struct _GtkWindow *parent);
+void calendar_setup_edit_memo_list (struct _GtkWindow *parent, ESource *source);
+void calendar_setup_new_memo_list (struct _GtkWindow *parent);
+
#ifdef __cplusplus
}
#endif
diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c
new file mode 100644
index 0000000000..7946198e9b
--- /dev/null
+++ b/calendar/gui/dialogs/memo-editor.c
@@ -0,0 +1,285 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* Evolution calendar - Memo editor dialog
+ *
+ * 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>
+ * JP Rosevear <jpr@ximian.com>
+ * Nathan Owens <pianocomp81@yahoo.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <glade/glade.h>
+#include <libgnome/gnome-i18n.h>
+
+#include "memo-page.h"
+#include "cancel-comp.h"
+#include "memo-editor.h"
+
+struct _MemoEditorPrivate {
+ MemoPage *memo_page;
+
+ gboolean updating;
+};
+
+static void memo_editor_set_e_cal (CompEditor *editor, ECal *client);
+static void memo_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
+static gboolean memo_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method);
+static void memo_editor_finalize (GObject *object);
+
+static void refresh_memo_cmd (GtkWidget *widget, gpointer data);
+static void cancel_memo_cmd (GtkWidget *widget, gpointer data);
+static void forward_cmd (GtkWidget *widget, gpointer data);
+
+static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
+static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data);
+
+G_DEFINE_TYPE (MemoEditor, memo_editor, TYPE_COMP_EDITOR);
+
+
+
+/**
+ * memo_editor_get_type:
+ *
+ * Registers the #MemoEditor class if necessary, and returns the type ID
+ * associated to it.
+ *
+ * Return value: The type ID of the #MemoEditor class.
+ **/
+
+/* Class initialization function for the event editor */
+static void
+memo_editor_class_init (MemoEditorClass *klass)
+{
+ GObjectClass *object_class;
+ CompEditorClass *editor_class;
+
+ object_class = (GObjectClass *) klass;
+ editor_class = (CompEditorClass *) klass;
+
+ editor_class->set_e_cal = memo_editor_set_e_cal;
+ editor_class->edit_comp = memo_editor_edit_comp;
+ editor_class->send_comp = memo_editor_send_comp;
+
+ object_class->finalize = memo_editor_finalize;
+}
+
+static void
+init_widgets (MemoEditor *me)
+{
+ MemoEditorPrivate *priv;
+
+ priv = me->priv;
+}
+
+static void
+client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
+{
+/* set_menu_sens (MEMO_EDITOR (user_data)); */
+}
+
+/* Object initialization function for the memo editor */
+static void
+memo_editor_init (MemoEditor *te)
+{
+ MemoEditorPrivate *priv;
+
+ priv = g_new0 (MemoEditorPrivate, 1);
+ te->priv = priv;
+
+ priv->updating = FALSE;
+
+ /* TODO add help stuff */
+/* comp_editor_set_help_section (COMP_EDITOR (te), "usage-calendar-memo"); */
+}
+
+MemoEditor *
+memo_editor_construct (MemoEditor *me, ECal *client)
+{
+ MemoEditorPrivate *priv;
+
+ gboolean read_only = FALSE;
+
+ priv = me->priv;
+
+ priv->memo_page = memo_page_new ();
+ g_object_ref (priv->memo_page);
+ gtk_object_sink (GTK_OBJECT (priv->memo_page));
+ comp_editor_append_page (COMP_EDITOR (me),
+ COMP_EDITOR_PAGE (priv->memo_page),
+ _("Memo"));
+ g_signal_connect (G_OBJECT (priv->memo_page), "client_changed",
+ G_CALLBACK (client_changed_cb), me);
+
+ if (!e_cal_is_read_only (client, &read_only, NULL))
+ read_only = TRUE;
+
+ comp_editor_set_e_cal (COMP_EDITOR (me), client);
+
+ init_widgets (me);
+
+ return me;
+}
+
+static void
+memo_editor_set_e_cal (CompEditor *editor, ECal *client)
+{
+ MemoEditor *te;
+ MemoEditorPrivate *priv;
+
+ te = MEMO_EDITOR (editor);
+ priv = te->priv;
+
+ if (COMP_EDITOR_CLASS (memo_editor_parent_class)->set_e_cal)
+ COMP_EDITOR_CLASS (memo_editor_parent_class)->set_e_cal (editor, client);
+}
+
+static void
+memo_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
+{
+ MemoEditor *me;
+ MemoEditorPrivate *priv;
+ ECalComponentOrganizer organizer;
+ ECal *client;
+
+ me = MEMO_EDITOR (editor);
+ priv = me->priv;
+
+ priv->updating = TRUE;
+
+ if (COMP_EDITOR_CLASS (memo_editor_parent_class)->edit_comp)
+ COMP_EDITOR_CLASS (memo_editor_parent_class)->edit_comp (editor, comp);
+
+ client = comp_editor_get_e_cal (COMP_EDITOR (editor));
+
+ priv->updating = FALSE;
+}
+
+static gboolean
+memo_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
+{
+ MemoEditor *me = MEMO_EDITOR (editor);
+ MemoEditorPrivate *priv;
+ ECalComponent *comp = NULL;
+
+ priv = me->priv;
+
+ if (COMP_EDITOR_CLASS (memo_editor_parent_class)->send_comp)
+ return COMP_EDITOR_CLASS (memo_editor_parent_class)->send_comp (editor, method);
+
+ return FALSE;
+}
+
+/* Destroy handler for the event editor */
+static void
+memo_editor_finalize (GObject *object)
+{
+ MemoEditor *me;
+ MemoEditorPrivate *priv;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (IS_MEMO_EDITOR (object));
+
+ me = MEMO_EDITOR (object);
+ priv = me->priv;
+
+ if (priv->memo_page) {
+ g_object_unref (priv->memo_page);
+ priv->memo_page = NULL;
+ }
+
+ g_free (priv);
+
+ if (G_OBJECT_CLASS (memo_editor_parent_class)->finalize)
+ (* G_OBJECT_CLASS (memo_editor_parent_class)->finalize) (object);
+}
+
+/**
+ * memo_editor_new:
+ * @client: an ECal
+ *
+ * Creates a new event editor dialog.
+ *
+ * Return value: A newly-created event editor dialog, or NULL if the event
+ * editor could not be created.
+ **/
+MemoEditor *
+memo_editor_new (ECal *client)
+{
+ MemoEditor *me;
+
+ me = g_object_new (TYPE_MEMO_EDITOR, NULL);
+ return memo_editor_construct (me, client);
+}
+
+static void
+refresh_memo_cmd (GtkWidget *widget, gpointer data)
+{
+ MemoEditor *me = MEMO_EDITOR (data);
+
+ comp_editor_send_comp (COMP_EDITOR (me), E_CAL_COMPONENT_METHOD_REFRESH);
+}
+
+static void
+cancel_memo_cmd (GtkWidget *widget, gpointer data)
+{
+ MemoEditor *me = MEMO_EDITOR (data);
+ ECalComponent *comp;
+
+ comp = comp_editor_get_current_comp (COMP_EDITOR (me));
+ if (cancel_component_dialog ((GtkWindow *) me,
+ comp_editor_get_e_cal (COMP_EDITOR (me)), comp, FALSE)) {
+ comp_editor_send_comp (COMP_EDITOR (me), E_CAL_COMPONENT_METHOD_CANCEL);
+ comp_editor_delete_comp (COMP_EDITOR (me));
+ }
+}
+
+static void
+forward_cmd (GtkWidget *widget, gpointer data)
+{
+ MemoEditor *me = MEMO_EDITOR (data);
+
+ if (comp_editor_save_comp (COMP_EDITOR (me), TRUE))
+ comp_editor_send_comp (COMP_EDITOR (me), E_CAL_COMPONENT_METHOD_PUBLISH);
+}
+
+static void
+model_changed (MemoEditor *me)
+{
+ if (!me->priv->updating) {
+ comp_editor_set_changed (COMP_EDITOR (me), TRUE);
+ comp_editor_set_needs_send (COMP_EDITOR (me), TRUE);
+ }
+}
+
+static void
+model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+{
+ model_changed (MEMO_EDITOR (data));
+}
+
+static void
+model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data)
+{
+ model_changed (MEMO_EDITOR (data));
+}
diff --git a/calendar/gui/dialogs/memo-editor.h b/calendar/gui/dialogs/memo-editor.h
new file mode 100644
index 0000000000..79c86e9d4e
--- /dev/null
+++ b/calendar/gui/dialogs/memo-editor.h
@@ -0,0 +1,59 @@
+/* Evolution calendar - Task editor dialog
+ *
+ * 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>
+ * Nathan Owens <pianocomp81@yahoo.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __MEMO_EDITOR_H__
+#define __MEMO_EDITOR_H__
+
+#include <gtk/gtkobject.h>
+#include "comp-editor.h"
+
+#define TYPE_MEMO_EDITOR (memo_editor_get_type ())
+#define MEMO_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEMO_EDITOR, MemoEditor))
+#define MEMO_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEMO_EDITOR, \
+ MemoEditorClass))
+#define IS_MEMO_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEMO_EDITOR))
+#define IS_MEMO_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEMO_EDITOR))
+
+typedef struct _MemoEditor MemoEditor;
+typedef struct _MemoEditorClass MemoEditorClass;
+typedef struct _MemoEditorPrivate MemoEditorPrivate;
+
+struct _MemoEditor {
+ CompEditor parent;
+
+ /* Private data */
+ MemoEditorPrivate *priv;
+};
+
+struct _MemoEditorClass {
+ CompEditorClass parent_class;
+};
+
+GtkType memo_editor_get_type (void);
+MemoEditor *memo_editor_construct (MemoEditor *te,
+ ECal *client);
+MemoEditor *memo_editor_new (ECal *client);
+
+
+#endif /* __MEMO_EDITOR_H__ */
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
new file mode 100644
index 0000000000..0a2644b699
--- /dev/null
+++ b/calendar/gui/dialogs/memo-page.c
@@ -0,0 +1,618 @@
+/* Evolution calendar - Main page of the memo editor dialog
+ *
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * Authors: Federico Mena-Quintero <federico@ximian.com>
+ * Miguel de Icaza <miguel@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ * JP Rosevear <jpr@ximian.com>
+ * Nathan Owens <pianocomp81@yahoo.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <gtk/gtksignal.h>
+#include <gtk/gtktextview.h>
+#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkspinbutton.h>
+#include <gtk/gtkoptionmenu.h>
+#include <gtk/gtkmessagedialog.h>
+#include <libgnome/gnome-i18n.h>
+#include <glade/glade.h>
+#include <libedataserverui/e-source-option-menu.h>
+#include <widgets/misc/e-dateedit.h>
+
+#include "common/authentication.h"
+#include "e-util/e-dialog-widgets.h"
+#include "e-util/e-categories-config.h"
+#include "../calendar-config.h"
+#include "comp-editor.h"
+#include "comp-editor-util.h"
+#include "e-send-options-utils.h"
+#include "memo-page.h"
+
+
+/* Private part of the TaskPage structure */
+struct _MemoPagePrivate {
+ /* Glade XML data */
+ GladeXML *xml;
+
+ /* Widgets from the Glade file */
+ GtkWidget *main;
+
+ GtkWidget *memo_content;
+
+ GtkWidget *classification;
+
+ GtkWidget *categories_btn;
+ GtkWidget *categories;
+
+ GtkWidget *source_selector;
+
+ gboolean updating;
+};
+
+static const int classification_map[] = {
+ E_CAL_COMPONENT_CLASS_PUBLIC,
+ E_CAL_COMPONENT_CLASS_PRIVATE,
+ E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
+ -1
+};
+
+
+
+static void memo_page_finalize (GObject *object);
+
+static GtkWidget *memo_page_get_widget (CompEditorPage *page);
+static void memo_page_focus_main_widget (CompEditorPage *page);
+static gboolean memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
+static gboolean memo_page_fill_component (CompEditorPage *page, ECalComponent *comp);
+
+G_DEFINE_TYPE (MemoPage, memo_page, TYPE_COMP_EDITOR_PAGE);
+
+
+
+/**
+ * memo_page_get_type:
+ *
+ * Registers the #TaskPage class if necessary, and returns the type ID
+ * associated to it.
+ *
+ * Return value: The type ID of the #TaskPage class.
+ **/
+
+/* Class initialization function for the memo page */
+static void
+memo_page_class_init (MemoPageClass *klass)
+{
+ CompEditorPageClass *editor_page_class;
+ GObjectClass *object_class;
+
+ editor_page_class = (CompEditorPageClass *) klass;
+ object_class = (GObjectClass *) klass;
+
+ editor_page_class->get_widget = memo_page_get_widget;
+ editor_page_class->focus_main_widget = memo_page_focus_main_widget;
+ editor_page_class->fill_widgets = memo_page_fill_widgets;
+ editor_page_class->fill_component = memo_page_fill_component;
+
+ object_class->finalize = memo_page_finalize;
+}
+
+/* Object initialization function for the memo page */
+static void
+memo_page_init (MemoPage *tpage)
+{
+ MemoPagePrivate *priv;
+
+ priv = g_new0 (MemoPagePrivate, 1);
+ tpage->priv = priv;
+
+ priv->xml = NULL;
+
+ priv->main = NULL;
+ priv->memo_content = NULL;
+ priv->classification = NULL;
+ priv->categories_btn = NULL;
+ priv->categories = NULL;
+
+ priv->updating = FALSE;
+}
+
+/* Destroy handler for the memo page */
+static void
+memo_page_finalize (GObject *object)
+{
+ MemoPage *tpage;
+ MemoPagePrivate *priv;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (IS_MEMO_PAGE (object));
+
+ tpage = MEMO_PAGE (object);
+ priv = tpage->priv;
+
+ if (priv->main)
+ gtk_widget_unref (priv->main);
+
+ if (priv->xml) {
+ g_object_unref (priv->xml);
+ priv->xml = NULL;
+ }
+
+ g_free (priv);
+ tpage->priv = NULL;
+
+ if (G_OBJECT_CLASS (memo_page_parent_class)->finalize)
+ (* G_OBJECT_CLASS (memo_page_parent_class)->finalize) (object);
+}
+
+
+
+/* get_widget handler for the task page */
+static GtkWidget *
+memo_page_get_widget (CompEditorPage *page)
+{
+ MemoPage *tpage;
+ MemoPagePrivate *priv;
+
+ tpage = MEMO_PAGE (page);
+ priv = tpage->priv;
+
+ return priv->main;
+}
+
+/* focus_main_widget handler for the memo page */
+static void
+memo_page_focus_main_widget (CompEditorPage *page)
+{
+ MemoPage *tpage;
+ MemoPagePrivate *priv;
+
+ tpage = MEMO_PAGE (page);
+ priv = tpage->priv;
+
+ gtk_widget_grab_focus (priv->memo_content);
+}
+
+/* Fills the widgets with default values */
+static void
+clear_widgets (MemoPage *tpage)
+{
+ MemoPagePrivate *priv;
+
+ priv = tpage->priv;
+
+ /* memo content */
+ gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content)), "", 0);
+
+ /* Classification */
+ e_dialog_option_menu_set (priv->classification, E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
+
+ /* Categories */
+ e_dialog_editable_set (priv->categories, NULL);
+}
+
+/* Decode the radio button group for classifications */
+static ECalComponentClassification
+classification_get (GtkWidget *widget)
+{
+ return e_dialog_option_menu_get (widget, classification_map);
+}
+
+static void
+sensitize_widgets (MemoPage *mpage)
+{
+ gboolean read_only;
+ MemoPagePrivate *priv;
+
+ priv = mpage->priv;
+
+ if (!e_cal_is_read_only (COMP_EDITOR_PAGE (mpage)->client, &read_only, NULL))
+ read_only = TRUE;
+
+ gtk_widget_set_sensitive (priv->memo_content, !read_only);
+ gtk_widget_set_sensitive (priv->classification, !read_only);
+ gtk_widget_set_sensitive (priv->categories_btn, !read_only);
+ gtk_entry_set_editable (GTK_ENTRY (priv->categories), !read_only);
+}
+
+/* fill_widgets handler for the memo page */
+static gboolean
+memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
+{
+ MemoPage *tpage;
+ MemoPagePrivate *priv;
+ ECalComponentClassification cl;
+ GSList *l;
+ const char *categories;
+ ESource *source;
+
+ tpage = MEMO_PAGE (page);
+ priv = tpage->priv;
+
+ priv->updating = TRUE;
+
+ /* Clean the screen */
+ clear_widgets (tpage);
+
+ e_cal_component_get_description_list (comp, &l);
+ if (l && l->data) {
+ ECalComponentText *dtext;
+
+ dtext = l->data;
+ gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content)),
+ dtext->value ? dtext->value : "", -1);
+ } else {
+ gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content)),
+ "", 0);
+ }
+ e_cal_component_free_text_list (l);
+
+ /* Classification. */
+ e_cal_component_get_classification (comp, &cl);
+
+ switch (cl) {
+ case E_CAL_COMPONENT_CLASS_PUBLIC:
+ case E_CAL_COMPONENT_CLASS_PRIVATE:
+ case E_CAL_COMPONENT_CLASS_CONFIDENTIAL:
+ break;
+ default:
+ /* default to PUBLIC */
+ cl = E_CAL_COMPONENT_CLASS_PUBLIC;
+ break;
+ }
+ e_dialog_option_menu_set (priv->classification, cl, classification_map);
+
+ /* Categories */
+ e_cal_component_get_categories (comp, &categories);
+ e_dialog_editable_set (priv->categories, categories);
+
+ /* Source */
+ source = e_cal_get_source (page->client);
+ e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector), source);
+
+ priv->updating = FALSE;
+
+ sensitize_widgets (tpage);
+
+ return TRUE;
+}
+
+/* fill_component handler for the memo page */
+static gboolean
+memo_page_fill_component (CompEditorPage *page, ECalComponent *comp)
+{
+ MemoPage *tpage;
+ MemoPagePrivate *priv;
+ char *cat, *str;
+ int i;
+ GtkTextBuffer *text_buffer;
+ GtkTextIter text_iter_start, text_iter_end;
+
+ tpage = MEMO_PAGE (page);
+ priv = tpage->priv;
+ text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content));
+
+ /* Memo Content */
+
+ gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
+ gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
+ str = gtk_text_buffer_get_text (text_buffer, &text_iter_start, &text_iter_end, FALSE);
+
+ if (!str || strlen (str) == 0){
+ e_cal_component_set_description_list (comp, NULL);
+ e_cal_component_set_summary(comp, NULL);
+ }
+ else {
+ int idxToUse = -1, nstr = strlen(str);
+ gboolean foundNL = FALSE;
+ GSList l;
+ ECalComponentText text, sumText;
+ char *txt;
+
+ for(i = 0; i<nstr && i<50; i++){
+ if(str[i] == '\n'){
+ idxToUse = i;
+ foundNL = TRUE;
+ break;
+ }
+ }
+
+ if(foundNL == FALSE){
+ if(nstr > 50){
+ sumText.value = txt = g_strndup(str, 50);
+ }
+ else{
+ sumText.value = txt = g_strdup(str);
+ }
+ }
+ else{
+ sumText.value = txt = g_strndup(str, idxToUse); /* cuts off '\n' */
+ }
+
+ sumText.altrep = NULL;
+
+ text.value = str;
+ text.altrep = NULL;
+ l.data = &text;
+ l.next = NULL;
+
+ e_cal_component_set_summary(comp, &sumText);
+ e_cal_component_set_description_list (comp, &l);
+
+ g_free(txt);
+ }
+
+ if (str)
+ g_free (str);
+
+ /* Classification. */
+ e_cal_component_set_classification (comp, classification_get (priv->classification));
+
+ /* Categories */
+ cat = e_dialog_editable_get (priv->categories);
+ str = comp_editor_strip_categories (cat);
+ if (cat)
+ g_free (cat);
+
+ e_cal_component_set_categories (comp, str);
+
+ if (str)
+ g_free (str);
+
+ return TRUE;
+}
+
+
+
+
+/* Gets the widgets from the XML file and returns if they are all available. */
+static gboolean
+get_widgets (MemoPage *tpage)
+{
+ CompEditorPage *page = COMP_EDITOR_PAGE (tpage);
+ MemoPagePrivate *priv;
+ GSList *accel_groups;
+ GtkWidget *toplevel;
+
+ priv = tpage->priv;
+
+#define GW(name) glade_xml_get_widget (priv->xml, name)
+
+ priv->main = GW ("memo-page");
+ if (!priv->main){
+ g_warning("couldn't find memo-page!");
+ return FALSE;
+ }
+
+ /* Get the GtkAccelGroup from the toplevel window, so we can install
+ it when the notebook page is mapped. */
+ toplevel = gtk_widget_get_toplevel (priv->main);
+ accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
+ if (accel_groups) {
+ page->accel_group = accel_groups->data;
+ gtk_accel_group_ref (page->accel_group);
+ }
+
+ gtk_widget_ref (priv->main);
+ gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
+
+ priv->memo_content = GW ("memo_content");
+
+ priv->classification = GW ("classification");
+
+ priv->categories_btn = GW ("categories-button");
+ priv->categories = GW ("categories");
+
+ priv->source_selector = GW ("source");
+
+#undef GW
+
+ return (priv->classification
+ && priv->memo_content
+ && priv->categories_btn
+ && priv->categories);
+}
+
+/* Callback used when the categories button is clicked; we must bring up the
+ * category list dialog.
+ */
+static void
+categories_clicked_cb (GtkWidget *button, gpointer data)
+{
+ MemoPage *tpage;
+ MemoPagePrivate *priv;
+ GtkWidget *entry;
+
+ tpage = MEMO_PAGE (data);
+ priv = tpage->priv;
+
+ entry = priv->categories;
+ e_categories_config_open_dialog_for_entry (GTK_ENTRY (entry));
+}
+
+/* This is called when any field is changed; it notifies upstream. */
+static void
+field_changed_cb (GtkWidget *widget, gpointer data)
+{
+ MemoPage *tpage;
+ MemoPagePrivate *priv;
+
+ tpage = MEMO_PAGE (data);
+ priv = tpage->priv;
+
+ if (!priv->updating)
+ comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tpage));
+}
+
+static void
+source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
+{
+ MemoPage *tpage;
+ MemoPagePrivate *priv;
+
+ tpage = MEMO_PAGE (data);
+ priv = tpage->priv;
+
+ if (!priv->updating) {
+ ECal *client;
+
+ client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_JOURNAL);
+ if (!client || !e_cal_open (client, FALSE, NULL)) {
+ GtkWidget *dialog;
+
+ if (client)
+ g_object_unref (client);
+
+ e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector),
+ e_cal_get_source (COMP_EDITOR_PAGE (tpage)->client));
+
+ dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+ _("Unable to open memos in '%s'."),
+ e_source_peek_name (source));
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ } else {
+ comp_editor_notify_client_changed (
+ COMP_EDITOR (gtk_widget_get_toplevel (priv->main)),
+ client);
+ sensitize_widgets (tpage);
+ }
+ }
+}
+
+/* Hooks the widget signals */
+static gboolean
+init_widgets (MemoPage *tpage)
+{
+ MemoPagePrivate *priv;
+ GtkTextBuffer *text_buffer;
+
+ priv = tpage->priv;
+
+ /* Memo Content */
+ text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content));
+
+ gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (priv->memo_content), GTK_WRAP_WORD);
+
+ /* Categories button */
+ g_signal_connect((priv->categories_btn), "clicked",
+ G_CALLBACK (categories_clicked_cb), tpage);
+
+ /* Source selector */
+ g_signal_connect((priv->source_selector), "source_selected",
+ G_CALLBACK (source_changed_cb), tpage);
+
+ /* Connect the default signal handler to use to make sure the "changed"
+ field gets set whenever a field is changed. */
+
+ /* Belongs to priv->memo_content */
+ g_signal_connect ((text_buffer), "changed",
+ G_CALLBACK (field_changed_cb), tpage);
+
+ g_signal_connect((priv->classification), "changed",
+ G_CALLBACK (field_changed_cb), tpage);
+ g_signal_connect((priv->categories), "changed",
+ G_CALLBACK (field_changed_cb), tpage);
+
+ return TRUE;
+}
+
+
+/**
+ * memo_page_construct:
+ * @tpage: An memo page.
+ *
+ * Constructs an memo page by loading its Glade data.
+ *
+ * Return value: The same object as @tpage, or NULL if the widgets could not be
+ * created.
+ **/
+MemoPage *
+memo_page_construct (MemoPage *tpage)
+{
+ MemoPagePrivate *priv;
+
+ priv = tpage->priv;
+
+ priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/memo-page.glade",
+ NULL, NULL);
+ if (!priv->xml) {
+ g_message ("memo_page_construct(): "
+ "Could not load the Glade XML file!");
+ return NULL;
+ }
+
+ if (!get_widgets (tpage)) {
+ g_message ("memo_page_construct(): "
+ "Could not find all widgets in the XML file!");
+ return NULL;
+ }
+
+ if (!init_widgets (tpage)) {
+ g_message ("memo_page_construct(): "
+ "Could not initialize the widgets!");
+ return NULL;
+ }
+
+ return tpage;
+}
+
+/**
+ * memo_page_new:
+ *
+ * Creates a new memo page.
+ *
+ * Return value: A newly-created task page, or NULL if the page could
+ * not be created.
+ **/
+MemoPage *
+memo_page_new (void)
+{
+ MemoPage *tpage;
+
+ tpage = gtk_type_new (TYPE_MEMO_PAGE);
+ if (!memo_page_construct (tpage)) {
+ g_object_unref (tpage);
+ return NULL;
+ }
+
+ return tpage;
+}
+
+GtkWidget *memo_page_create_source_option_menu (void);
+
+GtkWidget *
+memo_page_create_source_option_menu (void)
+{
+ GtkWidget *menu;
+ GConfClient *gconf_client;
+ ESourceList *source_list;
+
+ gconf_client = gconf_client_get_default ();
+ source_list = e_source_list_new_for_gconf (gconf_client, "/apps/evolution/memos/sources");
+
+ menu = e_source_option_menu_new (source_list);
+ g_object_unref (source_list);
+
+ gtk_widget_show (menu);
+ return menu;
+}
diff --git a/calendar/gui/dialogs/memo-page.glade b/calendar/gui/dialogs/memo-page.glade
new file mode 100644
index 0000000000..2553e1a4f2
--- /dev/null
+++ b/calendar/gui/dialogs/memo-page.glade
@@ -0,0 +1,323 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="memo-toplevel">
+ <property name="title" translatable="yes">window1</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+ <child>
+ <widget class="GtkVBox" id="memo-page">
+ <property name="border_width">12</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Basics&lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">12</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="label100">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Classi_fication:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">classification</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkOptionMenu" id="classification">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child>
+ <widget class="GtkMenu" id="menu1">
+
+ <child>
+ <widget class="GtkMenuItem" id="public1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Public</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="private1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Private</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="confidential1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Confidential</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Group:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">12</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">source</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="Custom" id="source">
+ <property name="visible">True</property>
+ <property name="creation_function">memo_page_create_source_option_menu</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Thu, 13 Jan 2004 22:00:00 GMT</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="categories-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Ca_tegories...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="categories">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="memo_content">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_WORD</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">expand|shrink|fill</property>
+ <property name="y_options">expand|shrink|fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Memo Content:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">memo content</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/calendar/gui/dialogs/memo-page.h b/calendar/gui/dialogs/memo-page.h
new file mode 100644
index 0000000000..8df3b5ff65
--- /dev/null
+++ b/calendar/gui/dialogs/memo-page.h
@@ -0,0 +1,56 @@
+/* Evolution calendar - Main page of the memo editor dialog
+ *
+ * Copyright (C) 2001 Ximian, Inc.
+ *
+ * Authors: Federico Mena-Quintero <federico@ximian.com>
+ * Miguel de Icaza <miguel@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ * JP Rosevear <jpr@ximian.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef MEMO_PAGE_H
+#define MEMO_PAGE_H
+
+#include "comp-editor-page.h"
+
+G_BEGIN_DECLS
+
+#define TYPE_MEMO_PAGE (memo_page_get_type ())
+#define MEMO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEMO_PAGE, MemoPage))
+#define MEMO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEMO_PAGE, MemoPageClass))
+#define IS_MEMO_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEMO_PAGE))
+#define IS_MEMO_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TYPE_MEMO_PAGE))
+
+typedef struct _MemoPagePrivate MemoPagePrivate;
+
+typedef struct {
+ CompEditorPage page;
+
+ /* Private data */
+ MemoPagePrivate *priv;
+} MemoPage;
+
+typedef struct {
+ CompEditorPageClass parent_class;
+} MemoPageClass;
+
+GtkType memo_page_get_type (void);
+MemoPage *memo_page_construct (MemoPage *epage);
+MemoPage *memo_page_new (void);
+
+G_END_DECLS
+
+#endif
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index f685bd1014..9e88f302eb 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -90,7 +90,8 @@ send_component_prompt_subject (GtkWindow *parent, ECal *client, ECalComponent *c
case E_CAL_COMPONENT_TODO:
id = "calendar:prompt-send-no-subject-task";
break;
-
+ case E_CAL_COMPONENT_JOURNAL:
+ return TRUE; /* we don't do summaries directly */
default:
g_message ("send_component_prompt_subject(): "
"Cannot handle object of type %d", vtype);