aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/.cvsignore3
-rw-r--r--calendar/gui/dialogs/Makefile.am35
-rw-r--r--calendar/gui/dialogs/alarm-notify-dialog.c231
-rw-r--r--calendar/gui/dialogs/alarm-notify-dialog.h45
-rw-r--r--calendar/gui/dialogs/alarm-notify.glade228
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c456
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.glade1241
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h70
-rw-r--r--calendar/gui/dialogs/delete-comp.c108
-rw-r--r--calendar/gui/dialogs/delete-comp.h31
-rw-r--r--calendar/gui/dialogs/save-comp.c63
-rw-r--r--calendar/gui/dialogs/save-comp.h30
-rw-r--r--calendar/gui/dialogs/task-editor-dialog.glade695
-rw-r--r--calendar/gui/dialogs/task-editor.c1288
-rw-r--r--calendar/gui/dialogs/task-editor.h70
-rw-r--r--calendar/gui/dialogs/task-page.glade695
16 files changed, 0 insertions, 5289 deletions
diff --git a/calendar/gui/dialogs/.cvsignore b/calendar/gui/dialogs/.cvsignore
deleted file mode 100644
index e995588475..0000000000
--- a/calendar/gui/dialogs/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.deps
-Makefile
-Makefile.in
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
deleted file mode 100644
index dd9a2b2540..0000000000
--- a/calendar/gui/dialogs/Makefile.am
+++ /dev/null
@@ -1,35 +0,0 @@
-gladedir = $(datadir)/evolution/glade
-
-INCLUDES = \
- -DG_LOG_DOMAIN=\"calendar-gui\" \
- -I$(top_srcdir) \
- -I$(top_srcdir)/calendar \
- -I$(top_srcdir)/libical/src/libical \
- -I$(top_builddir)/libical/src/libical \
- -I$(includedir) \
- -DEVOLUTION_DATADIR=\""$(datadir)"\" \
- -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
- $(BONOBO_VFS_GNOME_CFLAGS) \
- -DGNOMELOCALEDIR=\""$(localedir)"\"
-
-noinst_LIBRARIES = libcal-dialogs.a
-
-libcal_dialogs_a_SOURCES = \
- alarm-notify-dialog.c \
- alarm-notify-dialog.h \
- cal-prefs-dialog.c \
- cal-prefs-dialog.h \
- delete-comp.c \
- delete-comp.h \
- save-comp.c \
- save-comp.h \
- task-editor.c \
- task-editor.h
-
-glade_DATA = \
- alarm-notify.glade \
- cal-prefs-dialog.glade \
- task-editor-dialog.glade
-
-EXTRA_DIST = \
- $(glade_DATA)
diff --git a/calendar/gui/dialogs/alarm-notify-dialog.c b/calendar/gui/dialogs/alarm-notify-dialog.c
deleted file mode 100644
index 164d043e13..0000000000
--- a/calendar/gui/dialogs/alarm-notify-dialog.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- */
-
-#include <config.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include "alarm-notify-dialog.h"
-
-
-
-/* The useful contents of the alarm notify dialog */
-typedef struct {
- GladeXML *xml;
-
- GtkWidget *dialog;
- GtkWidget *close;
- GtkWidget *snooze;
- GtkWidget *edit;
- GtkWidget *heading;
- GtkWidget *summary;
- GtkWidget *snooze_time;
-
- AlarmNotifyFunc func;
- gpointer func_data;
-} AlarmNotify;
-
-
-
-/* Callback used when the notify dialog is destroyed */
-static void
-dialog_destroy_cb (GtkObject *object, gpointer data)
-{
- AlarmNotify *an;
-
- an = data;
- gtk_object_unref (GTK_OBJECT (an->xml));
- g_free (an);
-}
-
-/* Delete_event handler for the alarm notify dialog */
-static gint
-delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- AlarmNotify *an;
-
- an = data;
- g_assert (an->func != NULL);
-
- (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data);
-
- gtk_widget_destroy (widget);
- return TRUE;
-}
-
-/* Callback for the close button */
-static void
-close_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmNotify *an;
-
- an = data;
- g_assert (an->func != NULL);
-
- (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data);
-
- gtk_widget_destroy (an->dialog);
-}
-
-/* Callback for the snooze button */
-static void
-snooze_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmNotify *an;
- int snooze_time;
-
- an = data;
- g_assert (an->func != NULL);
-
- snooze_time = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (an->snooze_time));
- (* an->func) (ALARM_NOTIFY_SNOOZE, snooze_time, an->func_data);
-
- gtk_widget_destroy (an->dialog);
-}
-
-/* Callback for the edit button */
-static void
-edit_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmNotify *an;
-
- an = data;
- g_assert (an->func != NULL);
-
- (* an->func) (ALARM_NOTIFY_EDIT, -1, an->func_data);
-
- gtk_widget_destroy (an->dialog);
-}
-
-/**
- * alarm_notify_dialog:
- * @trigger: Trigger time for the alarm.
- * @occur: Occurrence time for the event.
- * @comp: Calendar component object which corresponds to the alarm.
- * @func: Function to be called when a dialog action is invoked.
- * @func_data: Closure data for @func.
- *
- * Runs the alarm notification dialog. The specified @func will be used to
- * notify the client about result of the actions in the dialog.
- *
- * Return value: TRUE on success, FALSE if the dialog could not be created.
- **/
-gboolean
-alarm_notify_dialog (time_t trigger, time_t occur, CalComponent *comp,
- AlarmNotifyFunc func, gpointer func_data)
-{
- AlarmNotify *an;
- char buf[256];
- struct tm tm_trigger;
- struct tm tm_occur;
- CalComponentText summary;
-
- g_return_val_if_fail (trigger != -1, FALSE);
- g_return_val_if_fail (occur != -1, FALSE);
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
- g_return_val_if_fail (func != NULL, FALSE);
-
- an = g_new0 (AlarmNotify, 1);
-
- an->func = func;
- an->func_data = func_data;
-
- an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL);
- if (!an->xml) {
- g_message ("alarm_notify_dialog(): Could not load the Glade XML file!");
- g_free (an);
- return FALSE;
- }
-
- an->dialog = glade_xml_get_widget (an->xml, "alarm-notify");
- an->close = glade_xml_get_widget (an->xml, "close");
- an->snooze = glade_xml_get_widget (an->xml, "snooze");
- an->edit = glade_xml_get_widget (an->xml, "edit");
- an->heading = glade_xml_get_widget (an->xml, "heading");
- an->summary = glade_xml_get_widget (an->xml, "summary");
- an->snooze_time = glade_xml_get_widget (an->xml, "snooze-time");
-
- if (!(an->dialog && an->close && an->snooze && an->edit && an->heading && an->summary
- && an->snooze_time)) {
- g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!");
- gtk_object_unref (GTK_OBJECT (an->xml));
- g_free (an);
- return FALSE;
- }
-
- gtk_object_set_data (GTK_OBJECT (an->dialog), "alarm-notify", an);
- gtk_signal_connect (GTK_OBJECT (an->dialog), "destroy",
- GTK_SIGNAL_FUNC (dialog_destroy_cb), an);
-
- /* Title */
-
- /* FIXME: use am_pm_flag or 24-hour time */
-
- tm_trigger = *localtime (&trigger);
- strftime (buf, sizeof (buf), _("Alarm on %A %b %d %Y %H:%M"), &tm_trigger);
- gtk_window_set_title (GTK_WINDOW (an->dialog), buf);
-
- /* Heading */
-
- tm_occur = *localtime (&occur);
- strftime (buf, sizeof (buf),
- _("Notification about your appointment on %A %b %d %Y %H:%M"),
- &tm_occur);
- gtk_label_set_text (GTK_LABEL (an->heading), buf);
-
- /* Summary */
-
- cal_component_get_summary (comp, &summary);
-
- if (summary.value)
- gtk_label_set_text (GTK_LABEL (an->summary), summary.value);
- else
- gtk_label_set_text (GTK_LABEL (an->summary), _("No summary available."));
-
- /* Connect actions */
-
- gtk_signal_connect (GTK_OBJECT (an->dialog), "delete_event",
- GTK_SIGNAL_FUNC (delete_event_cb),
- an);
-
- gtk_signal_connect (GTK_OBJECT (an->close), "clicked",
- GTK_SIGNAL_FUNC (close_clicked_cb),
- an);
-
- gtk_signal_connect (GTK_OBJECT (an->snooze), "clicked",
- GTK_SIGNAL_FUNC (snooze_clicked_cb),
- an);
-
- gtk_signal_connect (GTK_OBJECT (an->edit), "clicked",
- GTK_SIGNAL_FUNC (edit_clicked_cb),
- an);
-
- /* Run! */
-
- gtk_widget_show (an->dialog);
- return TRUE;
-}
diff --git a/calendar/gui/dialogs/alarm-notify-dialog.h b/calendar/gui/dialogs/alarm-notify-dialog.h
deleted file mode 100644
index f2c938c495..0000000000
--- a/calendar/gui/dialogs/alarm-notify-dialog.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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 ALARM_NOTIFY_DIALOG_H
-#define ALARM_NOTIFY_DIALOG_H
-
-#include <time.h>
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-
-
-typedef enum {
- ALARM_NOTIFY_CLOSE,
- ALARM_NOTIFY_SNOOZE,
- ALARM_NOTIFY_EDIT
-} AlarmNotifyResult;
-
-typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpointer data);
-
-gboolean alarm_notify_dialog (time_t trigger, time_t occur, CalComponent *comp,
- AlarmNotifyFunc func, gpointer func_data);
-
-
-
-#endif
diff --git a/calendar/gui/dialogs/alarm-notify.glade b/calendar/gui/dialogs/alarm-notify.glade
deleted file mode 100644
index 41718d0572..0000000000
--- a/calendar/gui/dialogs/alarm-notify.glade
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Evolution Calendar</name>
- <program_name>evolution-calendar</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>False</use_widget_names>
- <output_main_file>True</output_main_file>
- <output_support_files>True</output_support_files>
- <output_build_files>True</output_build_files>
- <backup_source_files>True</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>alarm-notify</name>
- <cxx_use_heap>True</cxx_use_heap>
- <title></title>
- <type>GTK_WINDOW_DIALOG</type>
- <position>GTK_WIN_POS_CENTER</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <border_width>4</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>heading</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>summary</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>close</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Close</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>snooze</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Snooze</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Edit appointment</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Snooze time (minutes)</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>snooze-time</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>5</value>
- <lower>1</lower>
- <upper>1440</upper>
- <step>1</step>
- <page>5</page>
- <page_size>5</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
deleted file mode 100644
index 9839318e8e..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ /dev/null
@@ -1,456 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * 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
- */
-
-/*
- * CalPrefsDialog - a GtkObject which handles a libglade-loaded dialog
- * to edit the calendar preference settings.
- */
-
-#include <config.h>
-#include <glade/glade.h>
-#include <gal/util/e-util.h>
-#include <e-util/e-dialog-widgets.h>
-#include <widgets/misc/e-dateedit.h>
-#include "cal-prefs-dialog.h"
-#include "../calendar-config.h"
-#include "../calendar-commands.h"
-#include "../e-tasks.h"
-
-
-typedef struct {
- /* Glade XML data */
- GladeXML *xml;
-
- GtkWidget *dialog;
-
- GtkWidget *working_days[7];
- GtkWidget *week_start_day;
- GtkWidget *start_of_day;
- GtkWidget *end_of_day;
- GtkWidget *use_12_hour;
- GtkWidget *use_24_hour;
- GtkWidget *time_divisions;
- GtkWidget *show_end_times;
- GtkWidget *compress_weekend;
- GtkWidget *dnav_show_week_no;
-} CalPrefsDialogPrivate;
-
-static const int week_start_day_map[] = {
- 1, 2, 3, 4, 5, 6, 0, -1
-};
-
-static const int time_division_map[] = {
- 60, 30, 15, 10, 5, -1
-};
-
-static void cal_prefs_dialog_class_init (CalPrefsDialogClass *class);
-static void cal_prefs_dialog_init (CalPrefsDialog *prefs);
-static gboolean get_widgets (CalPrefsDialog *prefs);
-static void cal_prefs_dialog_destroy (GtkObject *object);
-static void cal_prefs_dialog_init_widgets (CalPrefsDialog *prefs);
-static void cal_prefs_dialog_button_clicked (GtkWidget *dialog,
- gint button,
- CalPrefsDialog *prefs);
-static void cal_prefs_dialog_use_24_hour_toggled(GtkWidget *button,
- CalPrefsDialog *prefs);
-static void cal_prefs_dialog_show_config (CalPrefsDialog *prefs);
-static void cal_prefs_dialog_update_config (CalPrefsDialog *prefs);
-
-GtkWidget* cal_prefs_dialog_create_time_edit (void);
-
-static GtkObjectClass *parent_class;
-
-E_MAKE_TYPE (cal_prefs_dialog, "CalPrefsDialog", CalPrefsDialog,
- cal_prefs_dialog_class_init, cal_prefs_dialog_init,
- GTK_TYPE_OBJECT)
-
-
-static void
-cal_prefs_dialog_class_init (CalPrefsDialogClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- object_class->destroy = cal_prefs_dialog_destroy;
-}
-
-
-static void
-cal_prefs_dialog_init (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- priv = g_new0 (CalPrefsDialogPrivate, 1);
- prefs->priv = priv;
-
-}
-
-
-/**
- * cal_prefs_dialog_new:
- * @Returns: a new #CalPrefsDialog.
- *
- * Creates a new #CalPrefsDialog.
- **/
-CalPrefsDialog *
-cal_prefs_dialog_new (void)
-{
- CalPrefsDialog *prefs;
-
- prefs = CAL_PREFS_DIALOG (gtk_type_new (cal_prefs_dialog_get_type ()));
- return cal_prefs_dialog_construct (prefs);
-}
-
-
-/**
- * cal_prefs_dialog_construct:
- * @prefs: A #CalPrefsDialog.
- *
- * Constructs a task editor by loading its Glade XML file.
- *
- * Return value: The same object as @prefs, or NULL if the widgets could not be
- * created. In the latter case, the task editor will automatically be
- * destroyed.
- **/
-CalPrefsDialog *
-cal_prefs_dialog_construct (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- g_return_val_if_fail (IS_CAL_PREFS_DIALOG (prefs), NULL);
-
- priv = prefs->priv;
-
- /* Load the content widgets */
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/cal-prefs-dialog.glade", NULL);
- if (!priv->xml) {
- g_message ("cal_prefs_dialog_construct(): Could not load the Glade XML file!");
- goto error;
- }
-
- if (!get_widgets (prefs)) {
- g_message ("cal_prefs_dialog_construct(): Could not find all widgets in the XML file!");
- goto error;
- }
-
- cal_prefs_dialog_init_widgets (prefs);
-
- cal_prefs_dialog_show_config (prefs);
-
- gtk_widget_show (priv->dialog);
-
- return prefs;
-
- error:
-
- gtk_object_unref (GTK_OBJECT (prefs));
- return NULL;
-}
-
-
-/* Gets the widgets from the XML file and returns if they are all available.
- */
-static gboolean
-get_widgets (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- priv = prefs->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->dialog = GW ("cal-prefs-dialog");
-
- /* The indices must match the mktime() values. */
- priv->working_days[0] = GW ("sun_button");
- priv->working_days[1] = GW ("mon_button");
- priv->working_days[2] = GW ("tue_button");
- priv->working_days[3] = GW ("wed_button");
- priv->working_days[4] = GW ("thu_button");
- priv->working_days[5] = GW ("fri_button");
- priv->working_days[6] = GW ("sat_button");
-
- priv->week_start_day = GW ("first_day_of_week");
- priv->start_of_day = GW ("start_of_day");
- priv->end_of_day = GW ("end_of_day");
- priv->use_12_hour = GW ("use_12_hour");
- priv->use_24_hour = GW ("use_24_hour");
- priv->time_divisions = GW ("time_divisions");
- priv->show_end_times = GW ("show_end_times");
- priv->compress_weekend = GW ("compress_weekend");
- priv->dnav_show_week_no = GW ("dnav_show_week_no");
-
-#undef GW
-
- return (priv->dialog
- && priv->working_days[0]
- && priv->working_days[1]
- && priv->working_days[2]
- && priv->working_days[3]
- && priv->working_days[4]
- && priv->working_days[5]
- && priv->working_days[6]
- && priv->week_start_day
- && priv->start_of_day
- && priv->end_of_day
- && priv->use_12_hour
- && priv->use_24_hour
- && priv->time_divisions
- && priv->show_end_times
- && priv->compress_weekend
- && priv->dnav_show_week_no);
-}
-
-
-static void
-cal_prefs_dialog_destroy (GtkObject *object)
-{
- CalPrefsDialog *prefs;
- CalPrefsDialogPrivate *priv;
-
- g_return_if_fail (IS_CAL_PREFS_DIALOG (object));
-
- prefs = CAL_PREFS_DIALOG (object);
- priv = prefs->priv;
-
-
- g_free (priv);
- prefs->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-/* Called by libglade to create our custom EDateEdit widgets. */
-GtkWidget *
-cal_prefs_dialog_create_time_edit (void)
-{
- GtkWidget *dedit;
-
- dedit = e_date_edit_new ();
-
- e_date_edit_set_time_popup_range (E_DATE_EDIT (dedit), 0, 24);
- e_date_edit_set_show_date (E_DATE_EDIT (dedit), FALSE);
-
- return dedit;
-}
-
-
-void
-cal_prefs_dialog_show (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- g_return_if_fail (IS_CAL_PREFS_DIALOG (prefs));
-
- priv = prefs->priv;
-
- /* If the dialog is already show just raise it, otherwise refresh the
- config settings and show it. */
- if (GTK_WIDGET_MAPPED (priv->dialog)) {
- gdk_window_raise (priv->dialog->window);
- } else {
- cal_prefs_dialog_show_config (prefs);
- gtk_widget_show (priv->dialog);
- }
-}
-
-
-/* Connects any necessary signal handlers. */
-static void
-cal_prefs_dialog_init_widgets (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- priv = prefs->priv;
-
- gtk_signal_connect (GTK_OBJECT (priv->dialog), "clicked",
- GTK_SIGNAL_FUNC (cal_prefs_dialog_button_clicked),
- prefs);
-
- gtk_signal_connect (GTK_OBJECT (priv->use_24_hour), "toggled",
- GTK_SIGNAL_FUNC (cal_prefs_dialog_use_24_hour_toggled),
- prefs);
-}
-
-
-static void
-cal_prefs_dialog_button_clicked (GtkWidget *dialog,
- gint button,
- CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
-
- g_return_if_fail (IS_CAL_PREFS_DIALOG (prefs));
-
- priv = prefs->priv;
-
- /* OK & Apply buttons update the config settings. */
- if (button == 0 || button == 1)
- cal_prefs_dialog_update_config (prefs);
-
- /* OK & Close buttons close the dialog. */
- if (button == 0 || button == 2)
- gtk_widget_hide (priv->dialog);
-}
-
-
-static void
-cal_prefs_dialog_use_24_hour_toggled (GtkWidget *button,
- CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
- gboolean use_24_hour;
-
- priv = prefs->priv;
-
- use_24_hour = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->use_24_hour));
-
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (priv->start_of_day),
- use_24_hour);
- e_date_edit_set_use_24_hour_format (E_DATE_EDIT (priv->end_of_day),
- use_24_hour);
-}
-
-
-/* Shows the current config settings in the dialog. */
-static void
-cal_prefs_dialog_show_config (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
- CalWeekdays working_days;
- gint mask, day, week_start_day, time_divisions;
-
- priv = prefs->priv;
-
- /* Working Days. */
- working_days = calendar_config_get_working_days ();
- mask = 1 << 0;
- for (day = 0; day < 7; day++) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->working_days[day]), (working_days & mask) ? TRUE : FALSE);
- mask <<= 1;
- }
-
- /* Week Start Day. */
- week_start_day = calendar_config_get_week_start_day ();
- e_dialog_option_menu_set (priv->week_start_day, week_start_day,
- week_start_day_map);
-
- /* Start of Day. */
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_of_day),
- calendar_config_get_day_start_hour (),
- calendar_config_get_day_start_minute ());
-
- /* End of Day. */
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_of_day),
- calendar_config_get_day_end_hour (),
- calendar_config_get_day_end_minute ());
-
- /* 12/24 Hour Format. */
- if (calendar_config_get_24_hour_format ())
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->use_24_hour), TRUE);
- else
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->use_12_hour), TRUE);
-
- /* Time Divisions. */
- time_divisions = calendar_config_get_time_divisions ();
- e_dialog_option_menu_set (priv->time_divisions, time_divisions,
- time_division_map);
-
- /* Show Appointment End Times. */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->show_end_times),
- calendar_config_get_show_event_end ());
-
- /* Compress Weekend. */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->compress_weekend), calendar_config_get_compress_weekend ());
-
- /* Date Navigator - Show Week Numbers. */
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->dnav_show_week_no), calendar_config_get_dnav_show_week_no ());
-}
-
-
-/* Updates the config values based on the settings in the dialog. */
-static void
-cal_prefs_dialog_update_config (CalPrefsDialog *prefs)
-{
- CalPrefsDialogPrivate *priv;
- CalWeekdays working_days;
- gint mask, day, week_start_day, time_divisions, hour, minute;
-
- priv = prefs->priv;
-
- /* Working Days. */
- working_days = 0;
- mask = 1 << 0;
- for (day = 0; day < 7; day++) {
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->working_days[day])))
- working_days |= mask;
- mask <<= 1;
- }
- calendar_config_set_working_days (working_days);
-
- /* Week Start Day. */
- week_start_day = e_dialog_option_menu_get (priv->week_start_day,
- week_start_day_map);
- calendar_config_set_week_start_day (week_start_day);
-
- /* Start of Day. */
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_of_day),
- &hour, &minute);
- calendar_config_set_day_start_hour (hour);
- calendar_config_set_day_start_minute (minute);
-
- /* End of Day. */
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_of_day),
- &hour, &minute);
- calendar_config_set_day_end_hour (hour);
- calendar_config_set_day_end_minute (minute);
-
- /* 12/24 Hour Format. */
- calendar_config_set_24_hour_format (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->use_24_hour)));
-
- /* Time Divisions. */
- time_divisions = e_dialog_option_menu_get (priv->time_divisions,
- time_division_map);
- calendar_config_set_time_divisions (time_divisions);
-
- /* Show Appointment End Times. */
- calendar_config_set_show_event_end (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->show_end_times)));
-
- /* Compress Weekend. */
- calendar_config_set_compress_weekend (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->compress_weekend)));
-
- /* Date Navigator - Show Week Numbers. */
- calendar_config_set_dnav_show_week_no (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->dnav_show_week_no)));
-
- calendar_config_write ();
- update_all_config_settings ();
- e_tasks_update_all_config_settings ();
-}
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.glade b/calendar/gui/dialogs/cal-prefs-dialog.glade
deleted file mode 100644
index f6eccb163d..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.glade
+++ /dev/null
@@ -1,1241 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>preferences</name>
- <program_name>preferences</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>cal-prefs-dialog</name>
- <title>Calendar Preferences</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>True</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>hbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkNotebook</class>
- <name>notebook1</name>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox8</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>6</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame9</name>
- <label>Work week</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox9</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>3</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox8</name>
- <homogeneous>True</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>mon_button</name>
- <can_focus>True</can_focus>
- <label>Mon</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>tue_button</name>
- <can_focus>True</can_focus>
- <label>Tue</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>wed_button</name>
- <can_focus>True</can_focus>
- <label>Wed</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>thu_button</name>
- <can_focus>True</can_focus>
- <label>Thu</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>fri_button</name>
- <can_focus>True</can_focus>
- <label>Fri</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>sat_button</name>
- <can_focus>True</can_focus>
- <label>Sat</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>sun_button</name>
- <can_focus>True</can_focus>
- <label>Sun</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox9</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label>First day of week:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>first_day_of_week</name>
- <can_focus>True</can_focus>
- <items>Monday
-Tuesday
-Wednesday
-Thursday
-Friday
-Saturday
-Sunday
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox11</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label17</name>
- <label>Start of day:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start_of_day</name>
- <creation_function>cal_prefs_dialog_create_time_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 10 Oct 2000 15:12:12 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label18</name>
- <label>End of day:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>end_of_day</name>
- <creation_function>cal_prefs_dialog_create_time_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Tue, 10 Oct 2000 15:12:21 GMT</last_modification_time>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame10</name>
- <label>Display options</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>4</border_width>
- <rows>4</rows>
- <columns>3</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>0</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label19</name>
- <label>Time divisions:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label20</name>
- <label>Time format:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>show_end_times</name>
- <can_focus>True</can_focus>
- <label>Show appointment end times</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>compress_weekend</name>
- <can_focus>True</can_focus>
- <label>Compress weekends</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <left_attach>0</left_attach>
- <right_attach>3</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox10</name>
- <homogeneous>True</homogeneous>
- <spacing>4</spacing>
- <child>
- <left_attach>1</left_attach>
- <right_attach>3</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>use_12_hour</name>
- <can_focus>True</can_focus>
- <label>12 hour (am/pm)</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>time_format_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>use_24_hour</name>
- <can_focus>True</can_focus>
- <label>24 hour</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>time_format_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment4</name>
- <xalign>7.45058e-09</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>time_divisions</name>
- <can_focus>True</can_focus>
- <items>60 minutes
-30 minutes
-15 minutes
-10 minutes
-05 minutes
-</items>
- <initial_choice>0</initial_choice>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame11</name>
- <label>Date navigator options</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>dnav_show_week_no</name>
- <border_width>4</border_width>
- <can_focus>True</can_focus>
- <label>Show week numbers</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label7</name>
- <label>Calendar</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox3</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame3</name>
- <label>Show</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton1</name>
- <can_focus>True</can_focus>
- <label>Due Date</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton2</name>
- <can_focus>True</can_focus>
- <label>Time Until Due</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton3</name>
- <can_focus>True</can_focus>
- <label>Priority</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame4</name>
- <label>Highlight</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton4</name>
- <can_focus>True</can_focus>
- <label>Overdue Items</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton5</name>
- <can_focus>True</can_focus>
- <label>Items Due Today</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton6</name>
- <can_focus>True</can_focus>
- <label>Items Not Yet Due</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame5</name>
- <label>Colors</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table3</name>
- <border_width>4</border_width>
- <rows>3</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>colorpicker1</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Pick a color</title>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>colorpicker2</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Pick a color</title>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeColorPicker</class>
- <name>colorpicker3</name>
- <can_focus>True</can_focus>
- <dither>True</dither>
- <use_alpha>False</use_alpha>
- <title>Pick a color</title>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>Items Not Yet Due:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment2</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>Items Due Today:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>True</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>alignment3</name>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xscale>1</xscale>
- <yscale>1</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label10</name>
- <label>Overdue Items:</label>
- <justify>GTK_JUSTIFY_RIGHT</justify>
- <wrap>False</wrap>
- <xalign>1</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label11</name>
- <label>TaskPad</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox6</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame6</name>
- <border_width>4</border_width>
- <label>Defaults</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox5</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton7</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <label>Remind me of all appointments</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton1</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <label>minutes before they occur.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>3</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame7</name>
- <border_width>4</border_width>
- <label>Visual Alarms</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton8</name>
- <border_width>4</border_width>
- <can_focus>True</can_focus>
- <label>Beep when alarm windows appear.</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame8</name>
- <border_width>4</border_width>
- <label>Audio Alarms</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>4</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox7</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton9</name>
- <can_focus>True</can_focus>
- <label>Alarms timeout after</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton2</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>5</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label13</name>
- <label>seconds.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox7</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>checkbutton10</name>
- <can_focus>True</can_focus>
- <label>Enable snoozing for</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton3</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>600</value>
- <lower>0</lower>
- <upper>1000</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>seconds.</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label15</name>
- <label>Reminders</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h
deleted file mode 100644
index 9d744f806d..0000000000
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * 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
- */
-
-/*
- * CalPrefsDialog - a GtkObject which handles a libglade-loaded dialog
- * to edit the calendar preference settings.
- */
-
-#ifndef _CAL_PREFS_DIALOG_H_
-#define _CAL_PREFS_DIALOG_H_
-
-#include <gtk/gtkobject.h>
-#include <libgnome/gnome-defs.h>
-
-BEGIN_GNOME_DECLS
-
-
-#define CAL_PREFS_DIALOG(obj) GTK_CHECK_CAST (obj, cal_prefs_dialog_get_type (), CalPrefsDialog)
-#define CAL_PREFS_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, cal_prefs_dialog_get_type (), CalPrefsDialogClass)
-#define IS_CAL_PREFS_DIALOG(obj) GTK_CHECK_TYPE (obj, cal_prefs_dialog_get_type ())
-
-
-typedef struct _CalPrefsDialog CalPrefsDialog;
-typedef struct _CalPrefsDialogClass CalPrefsDialogClass;
-
-struct _CalPrefsDialog
-{
- GtkObject object;
-
- /* Private data */
- gpointer priv;
-};
-
-struct _CalPrefsDialogClass
-{
- GtkObjectClass parent_class;
-};
-
-
-GtkType cal_prefs_dialog_get_type (void);
-CalPrefsDialog* cal_prefs_dialog_construct (CalPrefsDialog *prefs);
-CalPrefsDialog* cal_prefs_dialog_new (void);
-
-void cal_prefs_dialog_show (CalPrefsDialog *prefs);
-
-END_GNOME_DECLS
-
-#endif /* _CAL_PREFS_DIALOG_H_ */
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
deleted file mode 100644
index f24c3493fb..0000000000
--- a/calendar/gui/dialogs/delete-comp.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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 <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <gal/widgets/e-unicode.h>
-#include "delete-comp.h"
-
-
-
-/**
- * delete_component_dialog:
- * @comp: A calendar component.
- * @widget: A widget to use as a basis for conversion from UTF8 into font
- * encoding.
- *
- * Pops up a dialog box asking the user whether he wants to delete a particular
- * calendar component.
- *
- * Return value: TRUE if the user clicked Yes, FALSE otherwise.
- **/
-gboolean
-delete_component_dialog (CalComponent *comp, GtkWidget *widget)
-{
- CalComponentText summary;
- CalComponentVType vtype;
- char *str, *tmp;
- GtkWidget *dialog;
-
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
- g_return_val_if_fail (widget != NULL, FALSE);
- g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
-
- vtype = cal_component_get_vtype (comp);
- cal_component_get_summary (comp, &summary);
-
- tmp = e_utf8_to_gtk_string (widget, summary.value);
-
- switch (vtype) {
- case CAL_COMPONENT_EVENT:
- if (tmp)
- str = g_strdup_printf (_("Are you sure you want to delete the appointment "
- "`%s'?"), tmp);
- else
- str = g_strdup (_("Are you sure you want to delete this "
- "untitled appointment?"));
- break;
-
- case CAL_COMPONENT_TODO:
- if (tmp)
- str = g_strdup_printf (_("Are you sure you want to delete the task "
- "`%s'?"), tmp);
- else
- str = g_strdup (_("Are you sure you want to delete this "
- "untitled task?"));
- break;
-
- case CAL_COMPONENT_JOURNAL:
- if (tmp)
- str = g_strdup_printf (_("Are you sure you want to delete the journal entry "
- "`%s'?"), tmp);
- else
- str = g_strdup (_("Are you sure want to delete this "
- "untitled journal entry?"));
- break;
-
- default:
- g_message ("delete_component_dialog(): Cannot handle object of type %d", vtype);
- return FALSE;
- }
-
- dialog = gnome_question_dialog_modal (str, NULL, NULL);
- g_free (tmp);
- g_free (str);
-
- if (gnome_dialog_run (GNOME_DIALOG (dialog)) == GNOME_YES)
- return TRUE;
- else
- return FALSE;
-}
diff --git a/calendar/gui/dialogs/delete-comp.h b/calendar/gui/dialogs/delete-comp.h
deleted file mode 100644
index d7243e75c4..0000000000
--- a/calendar/gui/dialogs/delete-comp.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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 DELETE_COMP_H
-#define DELETE_COMP_H
-
-#include <gtk/gtkwidget.h>
-#include <cal-util/cal-component.h>
-
-gboolean delete_component_dialog (CalComponent *comp, GtkWidget *widget);
-
-#endif
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
deleted file mode 100644
index c36e98cb5a..0000000000
--- a/calendar/gui/dialogs/save-comp.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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 <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock.h>
-#include <gal/widgets/e-unicode.h>
-#include "save-comp.h"
-
-
-
-/**
- * save_component_dialog:
- * @parent: Window to use as the transient dialog's parent.
- *
- * Pops up a dialog box asking the user whether he wants to save changes for
- * a calendar component.
- *
- * Return value: TRUE if changes shold be saved, FALSE otherwise.
- **/
-gint
-save_component_dialog (GtkWindow *parent)
-{
- GtkWidget *dialog;
-
- dialog = gnome_message_box_new (_("Do you want to save changes?"),
- GNOME_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- gnome_dialog_grab_focus (GNOME_DIALOG (dialog), 0);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent);
-
- return gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-}
diff --git a/calendar/gui/dialogs/save-comp.h b/calendar/gui/dialogs/save-comp.h
deleted file mode 100644
index 8b1db3c503..0000000000
--- a/calendar/gui/dialogs/save-comp.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Evolution calendar - Delete calendar component dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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 SAVE_COMP_H
-#define SAVE_COMP_H
-
-#include <gtk/gtkwindow.h>
-
-gint save_component_dialog (GtkWindow *parent);
-
-#endif
diff --git a/calendar/gui/dialogs/task-editor-dialog.glade b/calendar/gui/dialogs/task-editor-dialog.glade
deleted file mode 100644
index ae7ea9681a..0000000000
--- a/calendar/gui/dialogs/task-editor-dialog.glade
+++ /dev/null
@@ -1,695 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>task-editor-dialog</name>
- <program_name>task-editor-dialog</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>task-editor-dialog</name>
- <visible>False</visible>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table3</name>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Su_mmary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>summary</default_focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame2</name>
- <label>Date &amp; Time</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>Sta_rt Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Due Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>due-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:32:18 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:33:31 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>description</name>
- <height>80</height>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame23</name>
- <label>Progress</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>_Status:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>status</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>status</name>
- <can_focus>True</can_focus>
- <items>Not Started
-In Progress
-Completed
-Cancelled
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>_Priority:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>priority</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>priority</name>
- <can_focus>True</can_focus>
- <items>High
-Normal
-Low
-Undefined
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>% Comp_lete:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>percent-complete</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>percent-complete</name>
- <width>60</width>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>0</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>10</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame24</name>
- <label>Classification</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <border_width>2</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-public</name>
- <can_focus>True</can_focus>
- <label>Pu_blic</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-private</name>
- <can_focus>True</can_focus>
- <label>Pri_vate</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-confidential</name>
- <can_focus>True</can_focus>
- <label>_Confidential</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>contacts-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label>_Contacts...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>contacts</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>categories-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label17</name>
- <label>Ca_tegories...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>categories</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label1</name>
- <label>Task</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <label>Date Completed:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>URL:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>url</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>completed-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:34:07 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label2</name>
- <label>Details</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
deleted file mode 100644
index 30e5987eea..0000000000
--- a/calendar/gui/dialogs/task-editor.c
+++ /dev/null
@@ -1,1288 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * 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
- */
-
-/*
- * TaskEditor - a GtkObject which handles a libglade-loaded dialog to edit
- * tasks.
- */
-
-#include <config.h>
-#include <glade/glade.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-#include <gal/widgets/e-categories.h>
-#include <e-util/e-dialog-widgets.h>
-#include <widgets/misc/e-dateedit.h>
-#include <cal-util/timeutil.h>
-#include "delete-comp.h"
-#include "save-comp.h"
-#include "task-editor.h"
-#include "../calendar-config.h"
-#include "../widget-util.h"
-
-
-typedef struct {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Client to use */
- CalClient *client;
-
- /* Calendar component we are editing; this is an internal copy and is
- * not one of the read-only objects from the parent calendar.
- */
- CalComponent *comp;
-
-
- /* This is TRUE while we are setting the widget values. We just return
- from any signal handlers. */
- gboolean ignore_callbacks;
-
- /* Widgets from the Glade file */
-
- GtkWidget *app;
-
- GtkWidget *summary;
-
- GtkWidget *due_date;
- GtkWidget *start_date;
-
- GtkWidget *percent_complete;
-
- GtkWidget *status;
- GtkWidget *priority;
-
- GtkWidget *description;
-
- GtkWidget *classification_public;
- GtkWidget *classification_private;
- GtkWidget *classification_confidential;
-
- GtkWidget *contacts;
- GtkWidget *categories_btn;
- GtkWidget *categories;
-
- GtkWidget *completed_date;
- GtkWidget *url;
-
- /* Call task_editor_set_changed() to set this to TRUE when any field
- in the dialog is changed. When the user closes the dialog we will
- prompt to save changes. */
- gboolean changed;
-} TaskEditorPrivate;
-
-
-/* Note that these two arrays must match. */
-static const int status_map[] = {
- ICAL_STATUS_NEEDSACTION,
- ICAL_STATUS_INPROCESS,
- ICAL_STATUS_COMPLETED,
- ICAL_STATUS_CANCELLED,
- -1
-};
-
-typedef enum {
- PRIORITY_HIGH,
- PRIORITY_NORMAL,
- PRIORITY_LOW,
- PRIORITY_UNDEFINED,
-} TaskEditorPriority;
-
-static const int priority_map[] = {
- PRIORITY_HIGH,
- PRIORITY_NORMAL,
- PRIORITY_LOW,
- PRIORITY_UNDEFINED,
- -1
-};
-
-static const int classification_map[] = {
- CAL_COMPONENT_CLASS_PUBLIC,
- CAL_COMPONENT_CLASS_PRIVATE,
- CAL_COMPONENT_CLASS_CONFIDENTIAL,
- -1
-};
-
-static void task_editor_class_init (TaskEditorClass *class);
-static void task_editor_init (TaskEditor *tedit);
-static void tedit_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data);
-static gint tedit_close_event_cb (GtkWidget *widget, gpointer data);
-static gint tedit_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data);
-static void close_dialog (TaskEditor *tedit);
-static gboolean get_widgets (TaskEditor *tedit);
-static void init_widgets (TaskEditor *tedit);
-static void task_editor_destroy (GtkObject *object);
-static char * make_title_from_comp (CalComponent *comp);
-static void set_title_from_comp (TaskEditor *tedit, CalComponent *comp);
-static void clear_widgets (TaskEditor *tedit);
-static void fill_widgets (TaskEditor *tedit);
-
-static void save_todo_object (TaskEditor *tedit);
-static void dialog_to_comp_object (TaskEditor *tedit);
-
-static void obj_updated_cb (CalClient *client, const char *uid, gpointer data);
-static void obj_removed_cb (CalClient *client, const char *uid, gpointer data);
-static void raise_and_focus (GtkWidget *widget);
-
-static TaskEditorPriority priority_value_to_index (int priority_value);
-static int priority_index_to_value (TaskEditorPriority priority);
-
-static void completed_changed (EDateEdit *dedit,
- TaskEditor *tedit);
-static void status_changed (GtkMenu *menu,
- TaskEditor *tedit);
-static void percent_complete_changed (GtkAdjustment *adj,
- TaskEditor *tedit);
-static void field_changed (GtkWidget *widget,
- TaskEditor *tedit);
-static void task_editor_set_changed (TaskEditor *tedit,
- gboolean changed);
-static gboolean prompt_to_save_changes (TaskEditor *tedit);
-static CalComponentClassification classification_get (GtkWidget *widget);
-static void categories_clicked (GtkWidget *button,
- TaskEditor *editor);
-
-/* The function libglade calls to create the EDateEdit widgets in the GUI. */
-GtkWidget * task_editor_create_date_edit (void);
-
-static GtkObjectClass *parent_class;
-
-E_MAKE_TYPE(task_editor, "TaskEditor", TaskEditor,
- task_editor_class_init, task_editor_init, GTK_TYPE_OBJECT)
-
-
-static void
-task_editor_class_init (TaskEditorClass *class)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass *) class;
-
- parent_class = gtk_type_class (GTK_TYPE_OBJECT);
-
- object_class->destroy = task_editor_destroy;
-}
-
-
-static void
-task_editor_init (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = g_new0 (TaskEditorPrivate, 1);
- tedit->priv = priv;
-
- priv->ignore_callbacks = FALSE;
-
- task_editor_set_changed (tedit, FALSE);
-}
-
-
-/**
- * task_editor_new:
- * @Returns: a new #TaskEditor.
- *
- * Creates a new #TaskEditor.
- **/
-TaskEditor *
-task_editor_new (void)
-{
- TaskEditor *tedit;
-
- tedit = TASK_EDITOR (gtk_type_new (task_editor_get_type ()));
- return task_editor_construct (tedit);
-}
-
-/**
- * task_editor_construct:
- * @tedit: A #TaskEditor.
- *
- * Constructs a task editor by loading its Glade XML file.
- *
- * Return value: The same object as @tedit, or NULL if the widgets could not be
- * created. In the latter case, the task editor will automatically be
- * destroyed.
- **/
-TaskEditor *
-task_editor_construct (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- g_return_val_if_fail (tedit != NULL, NULL);
- g_return_val_if_fail (IS_TASK_EDITOR (tedit), NULL);
-
- priv = tedit->priv;
-
- /* Load the content widgets */
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/task-editor-dialog.glade", NULL);
- if (!priv->xml) {
- g_message ("task_editor_construct(): Could not load the Glade XML file!");
- goto error;
- }
-
- if (!get_widgets (tedit)) {
- g_message ("task_editor_construct(): Could not find all widgets in the XML file!");
- goto error;
- }
-
- init_widgets (tedit);
-
- /* Hook to destruction of the dialog */
- gtk_signal_connect (GTK_OBJECT (priv->app), "apply",
- GTK_SIGNAL_FUNC (tedit_apply_event_cb), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->app), "close",
- GTK_SIGNAL_FUNC (tedit_close_event_cb), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->app), "delete_event",
- GTK_SIGNAL_FUNC (tedit_delete_event_cb), tedit);
-
- /* Add focus to the summary entry */
- gtk_widget_grab_focus (GTK_WIDGET (priv->summary));
-
-
- return tedit;
-
- error:
-
- gtk_object_unref (GTK_OBJECT (tedit));
- return NULL;
-}
-
-
-/* Called by libglade to create our custom EDateEdit widgets. */
-GtkWidget *
-task_editor_create_date_edit (void)
-{
- GtkWidget *dedit;
-
- dedit = date_edit_new (TRUE, TRUE);
- e_date_edit_set_allow_no_date_set (E_DATE_EDIT (dedit), TRUE);
-
- return dedit;
-}
-
-/* Callback used when the dialog box is destroyed */
-static void
-tedit_apply_event_cb (GtkWidget *widget, gint page_num, gpointer data)
-{
- TaskEditor *tedit;
-
- g_return_if_fail (IS_TASK_EDITOR (data));
-
- tedit = TASK_EDITOR (data);
-
- if (page_num != -1)
- return;
-
- save_todo_object (tedit);
-}
-
-/* Callback used when the dialog box is destroyed */
-static gint
-tedit_close_event_cb (GtkWidget *widget, gpointer data)
-{
- TaskEditor *tedit;
-
- g_return_val_if_fail (IS_TASK_EDITOR (data), TRUE);
-
- tedit = TASK_EDITOR (data);
-
- if (prompt_to_save_changes (tedit))
- close_dialog (tedit);
-
- return TRUE;
-}
-
-/* Callback used when the dialog box is destroyed */
-static gint
-tedit_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- TaskEditor *tedit;
-
- g_return_val_if_fail (IS_TASK_EDITOR (data), TRUE);
-
- tedit = TASK_EDITOR (data);
-
- if (prompt_to_save_changes (tedit))
- close_dialog (tedit);
-
- return TRUE;
-}
-
-
-/* Closes the dialog box and emits the appropriate signals */
-static void
-close_dialog (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
- g_assert (priv->app != NULL);
-
- gtk_object_destroy (GTK_OBJECT (tedit));
-}
-
-
-/* Gets the widgets from the XML file and returns if they are all available.
- * For the widgets whose values can be simply set with e-dialog-utils, it does
- * that as well.
- */
-static gboolean
-get_widgets (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->app = GW ("task-editor-dialog");
-
- priv->summary = GW ("summary");
-
- priv->due_date = GW ("due-date");
- priv->start_date = GW ("start-date");
-
- priv->percent_complete = GW ("percent-complete");
-
- priv->status = GW ("status");
- priv->priority = GW ("priority");
-
- priv->description = GW ("description");
-
- priv->classification_public = GW ("classification-public");
- priv->classification_private = GW ("classification-private");
- priv->classification_confidential = GW ("classification-confidential");
-
- priv->contacts = GW ("contacts");
- priv->categories_btn = GW ("categories-button");
- priv->categories = GW ("categories");
-
- priv->completed_date = GW ("completed-date");
- priv->url = GW ("url");
-
-#undef GW
-
- return (priv->app
- && priv->summary
- && priv->due_date
- && priv->start_date
- && priv->percent_complete
- && priv->status
- && priv->priority
- && priv->classification_public
- && priv->classification_private
- && priv->classification_confidential
- && priv->description
- && priv->contacts
- && priv->categories_btn
- && priv->categories
- && priv->completed_date
- && priv->url);
-}
-
-
-/* Hooks the widget signals */
-static void
-init_widgets (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
- /* Connect signals. The Status, Percent Complete & Date Completed
- properties are closely related so whenever one changes we may need
- to update the other 2. */
- gtk_signal_connect (GTK_OBJECT (priv->completed_date), "changed",
- GTK_SIGNAL_FUNC (completed_changed), tedit);
-
- gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (priv->status)->menu),
- "deactivate",
- GTK_SIGNAL_FUNC (status_changed), tedit);
-
- gtk_signal_connect (GTK_OBJECT (GTK_SPIN_BUTTON (priv->percent_complete)->adjustment),
- "value_changed",
- GTK_SIGNAL_FUNC (percent_complete_changed), tedit);
-
- /* Classification */
- gtk_signal_connect (GTK_OBJECT (priv->description), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->classification_public),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->classification_private),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->classification_confidential),
- "toggled",
- GTK_SIGNAL_FUNC (field_changed), tedit);
-
- /* Connect the default signal handler to use to make sure the "changed"
- field gets set whenever a field is changed. */
- gtk_signal_connect (GTK_OBJECT (priv->summary), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->due_date), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->start_date), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (priv->priority)->menu),
- "deactivate",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->description), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->contacts), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->categories), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->url), "changed",
- GTK_SIGNAL_FUNC (field_changed), tedit);
-
- /* Button clicks */
- gtk_signal_connect (GTK_OBJECT (priv->categories_btn), "clicked",
- GTK_SIGNAL_FUNC (categories_clicked), tedit);
-}
-
-static void
-task_editor_destroy (GtkObject *object)
-{
- TaskEditor *tedit;
- TaskEditorPrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_TASK_EDITOR (object));
-
- tedit = TASK_EDITOR (object);
- priv = tedit->priv;
-
- if (priv->app) {
- gtk_widget_destroy (priv->app);
- priv->app = NULL;
- }
-
- if (priv->comp) {
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- }
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client),
- tedit);
- gtk_object_unref (GTK_OBJECT (priv->client));
- priv->client = NULL;
- }
-
- if (priv->xml) {
- gtk_object_unref (GTK_OBJECT (priv->xml));
- priv->xml = NULL;
- }
-
- g_free (priv);
- tedit->priv = NULL;
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-
-void
-task_editor_set_cal_client (TaskEditor *tedit,
- CalClient *client)
-{
- TaskEditorPrivate *priv;
-
- g_return_if_fail (tedit != NULL);
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (client == priv->client)
- return;
-
- if (client)
- g_return_if_fail (IS_CAL_CLIENT (client));
-
- if (client)
- g_return_if_fail (cal_client_get_load_state (client) == CAL_CLIENT_LOAD_LOADED);
-
- if (client)
- gtk_object_ref (GTK_OBJECT (client));
-
- if (priv->client) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client),
- tedit);
- gtk_object_unref (GTK_OBJECT (priv->client));
- }
-
- priv->client = client;
-
- if (priv->client) {
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_updated",
- GTK_SIGNAL_FUNC (obj_updated_cb), tedit);
- gtk_signal_connect (GTK_OBJECT (priv->client), "obj_removed",
- GTK_SIGNAL_FUNC (obj_removed_cb), tedit);
- }
-}
-
-
-/* Callback used when the calendar client tells us that an object changed */
-static void
-obj_updated_cb (CalClient *client, const char *uid, gpointer data)
-{
- /* FIXME: Do something sensible if the component changes under our feet */
-#if 0
- TaskEditor *tedit;
- TaskEditorPrivate *priv;
- CalComponent *comp;
- CalClientGetStatus status;
- const gchar *editing_uid;
-
- tedit = TASK_EDITOR (data);
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- /* If we aren't showing the object which has been updated, return. */
- if (!priv->comp)
- return;
- cal_component_get_uid (priv->comp, &editing_uid);
- if (strcmp (uid, editing_uid))
- return;
-
-
- /* Get the task from the server. */
- status = cal_client_get_object (priv->client, uid, &comp);
-
- switch (status) {
- case CAL_CLIENT_GET_SUCCESS:
- /* Everything is fine */
- break;
-
- case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("obj_updated_cb(): Syntax error when getting object `%s'", uid);
- return;
-
- case CAL_CLIENT_GET_NOT_FOUND:
- /* The object is no longer in the server, so do nothing */
- return;
-
- default:
- g_assert_not_reached ();
- return;
- }
-
- raise_and_focus (priv->app);
-#endif
-}
-
-/* Callback used when the calendar client tells us that an object was removed */
-static void
-obj_removed_cb (CalClient *client, const char *uid, gpointer data)
-{
- /* FIXME: Do something sensible if the component is removed under our
- * feet.
- */
-#if 0
- TaskEditor *tedit;
- TaskEditorPrivate *priv;
- const gchar *editing_uid;
-
- tedit = TASK_EDITOR (data);
-
- g_return_if_fail (tedit != NULL);
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- /* If we aren't showing the object which has been updated, return. */
- if (!priv->comp)
- return;
- cal_component_get_uid (priv->comp, &editing_uid);
- if (strcmp (uid, editing_uid))
- return;
-
-
- raise_and_focus (priv->app);
-#endif
-}
-
-
-/* Brings attention to a window by raising it and giving it focus */
-static void
-raise_and_focus (GtkWidget *widget)
-{
- g_assert (GTK_WIDGET_REALIZED (widget));
- gdk_window_show (widget->window);
- gtk_widget_grab_focus (widget);
-}
-
-
-/**
- * task_editor_set_todo_object:
- * @tedit: A #TaskEditor.
- * @comp: A todo object.
- *
- * Sets the todo object that a task editor dialog will manipulate.
- **/
-void
-task_editor_set_todo_object (TaskEditor *tedit,
- CalComponent *comp)
-{
- TaskEditorPrivate *priv;
-
- g_return_if_fail (tedit != NULL);
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->comp) {
- gtk_object_unref (GTK_OBJECT (priv->comp));
- priv->comp = NULL;
- }
-
- if (comp)
- priv->comp = cal_component_clone (comp);
-
- set_title_from_comp (tedit, priv->comp);
- fill_widgets (tedit);
-}
-
-void
-task_editor_focus (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- g_return_if_fail (tedit != NULL);
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
- gtk_widget_show_now (priv->app);
- raise_and_focus (priv->app);
-}
-
-/* Creates an appropriate title for the task editor dialog */
-static char *
-make_title_from_comp (CalComponent *comp)
-{
- const char *summary;
- CalComponentVType type;
- CalComponentText text;
-
- if (!comp)
- return g_strdup (_("Edit Task"));
-
- cal_component_get_summary (comp, &text);
- if (text.value)
- summary = text.value;
- else
- summary = _("No summary");
-
-
- type = cal_component_get_vtype (comp);
- switch (type) {
- case CAL_COMPONENT_EVENT:
- return g_strdup_printf (_("Appointment - %s"), summary);
-
- case CAL_COMPONENT_TODO:
- return g_strdup_printf (_("Task - %s"), summary);
-
- case CAL_COMPONENT_JOURNAL:
- return g_strdup_printf (_("Journal entry - %s"), summary);
-
- default:
- g_message ("make_title_from_comp(): Cannot handle object of type %d", type);
- return NULL;
- }
-}
-
-/* Sets the event editor's window title from a calendar component */
-static void
-set_title_from_comp (TaskEditor *tedit, CalComponent *comp)
-{
- TaskEditorPrivate *priv;
- char *title, *tmp;
-
- priv = tedit->priv;
-
- title = make_title_from_comp (comp);
- tmp = e_utf8_to_gtk_string (priv->app, title);
- g_free (title);
-
- if (tmp) {
- gtk_window_set_title (GTK_WINDOW (priv->app), tmp);
- g_free (tmp);
- } else {
- g_message ("set_title_from_comp(): Could not convert the title from UTF8");
- gtk_window_set_title (GTK_WINDOW (priv->app), "");
- }
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
-
-}
-
-/* Fills in the widgets with the proper values */
-static void
-fill_widgets (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- CalComponentText text;
- CalComponentDateTime d;
- CalComponentClassification cl;
- struct icaltimetype *completed;
- GSList *l;
- time_t t;
- int *priority_value, *percent;
- icalproperty_status status;
- TaskEditorPriority priority;
- const char *url;
- const char *categories;
-
- priv = tedit->priv;
-
- task_editor_set_changed (tedit, FALSE);
-
- clear_widgets (tedit);
-
- if (!priv->comp)
- return;
-
- /* We want to ignore any signals emitted while changing fields. */
- priv->ignore_callbacks = TRUE;
-
-
- cal_component_get_summary (priv->comp, &text);
- e_dialog_editable_set (priv->summary, text.value);
-
- cal_component_get_description_list (priv->comp, &l);
- if (l) {
- text = *(CalComponentText *)l->data;
- e_dialog_editable_set (priv->description, text.value);
- } else {
- e_dialog_editable_set (priv->description, NULL);
- }
- cal_component_free_text_list (l);
-
- /* Due Date. */
- cal_component_get_due (priv->comp, &d);
- if (d.value) {
- t = icaltime_as_timet (*d.value);
- } else {
- t = -1;
- }
- e_date_edit_set_time (E_DATE_EDIT (priv->due_date), t);
-
- /* Start Date. */
- cal_component_get_dtstart (priv->comp, &d);
- if (d.value) {
- t = icaltime_as_timet (*d.value);
- } else {
- t = -1;
- }
- e_date_edit_set_time (E_DATE_EDIT (priv->start_date), t);
-
- /* Completed Date. */
- cal_component_get_completed (priv->comp, &completed);
- if (completed) {
- t = icaltime_as_timet (*completed);
- cal_component_free_icaltimetype (completed);
- } else {
- t = -1;
- }
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), t);
-
- /* Percent Complete. */
- cal_component_get_percent (priv->comp, &percent);
- if (percent) {
- e_dialog_spin_set (priv->percent_complete, *percent);
- cal_component_free_percent (percent);
- } else {
- /* FIXME: Could check if task is completed and set 100%. */
- e_dialog_spin_set (priv->percent_complete, 0);
- }
-
- /* Status. */
- cal_component_get_status (priv->comp, &status);
- if (status == ICAL_STATUS_NONE) {
- /* Try to user the percent value. */
- if (percent) {
- if (*percent == 0)
- status = ICAL_STATUS_NEEDSACTION;
- else if (*percent == 100)
- status = ICAL_STATUS_COMPLETED;
- else
- status = ICAL_STATUS_INPROCESS;
- } else
- status = ICAL_STATUS_NEEDSACTION;
- }
- e_dialog_option_menu_set (priv->status, status, status_map);
-
- /* Priority. */
- cal_component_get_priority (priv->comp, &priority_value);
- if (priority_value) {
- priority = priority_value_to_index (*priority_value);
- cal_component_free_priority (priority_value);
- } else {
- priority = PRIORITY_UNDEFINED;
- }
- e_dialog_option_menu_set (priv->priority, priority, priority_map);
-
-
- /* Classification. */
- cal_component_get_classification (priv->comp, &cl);
-
- switch (cl) {
- case CAL_COMPONENT_CLASS_PUBLIC:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- case CAL_COMPONENT_CLASS_PRIVATE:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_PRIVATE,
- classification_map);
- case CAL_COMPONENT_CLASS_CONFIDENTIAL:
- e_dialog_radio_set (priv->classification_public, CAL_COMPONENT_CLASS_CONFIDENTIAL,
- classification_map);
- default:
- /* What do do? We can't g_assert_not_reached() since it is a
- * value from an external file.
- */
- }
-
- /* Categories */
- cal_component_get_categories (priv->comp, &categories);
- e_dialog_editable_set (priv->categories, categories);
-
- /* URL. */
- cal_component_get_url (priv->comp, &url);
- e_dialog_editable_set (priv->url, url);
-
- priv->ignore_callbacks = FALSE;
-}
-
-
-static void
-save_todo_object (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
- g_return_if_fail (priv->client != NULL);
-
- if (!priv->comp)
- return;
-
- dialog_to_comp_object (tedit);
- set_title_from_comp (tedit, priv->comp);
-
- if (!cal_client_update_object (priv->client, priv->comp))
- g_message ("save_todo_object(): Could not update the object!");
- else
- task_editor_set_changed (tedit, FALSE);
-}
-
-
-/* Get the values of the widgets in the event editor and put them in the iCalObject */
-static void
-dialog_to_comp_object (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- CalComponent *comp;
- CalComponentDateTime date;
- time_t t;
- icalproperty_status status;
- TaskEditorPriority priority;
- int priority_value, percent;
- char *url, *cat;
- char *str;
-
- priv = tedit->priv;
- comp = priv->comp;
-
- /* Summary. */
-
- str = e_dialog_editable_get (priv->summary);
- if (!str || strlen (str) == 0)
- cal_component_set_summary (comp, NULL);
- else {
- CalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
-
- cal_component_set_summary (comp, &text);
- }
-
- if (str)
- g_free (str);
-
- /* Description */
-
- str = e_dialog_editable_get (priv->description);
- if (!str || strlen (str) == 0)
- cal_component_set_description_list (comp, NULL);
- else {
- GSList l;
- CalComponentText text;
-
- text.value = str;
- text.altrep = NULL;
- l.data = &text;
- l.next = NULL;
-
- cal_component_set_description_list (comp, &l);
- }
-
- if (!str)
- g_free (str);
-
- /* Dates */
-
- date.value = g_new (struct icaltimetype, 1);
- date.tzid = NULL;
-
- /* Due Date. */
- t = e_date_edit_get_time (E_DATE_EDIT (priv->due_date));
- if (t != -1) {
- *date.value = icaltime_from_timet (t, FALSE);
- cal_component_set_due (comp, &date);
- } else {
- cal_component_set_due (comp, NULL);
- }
-
- /* Start Date. */
- t = e_date_edit_get_time (E_DATE_EDIT (priv->start_date));
- if (t != -1) {
- *date.value = icaltime_from_timet (t, FALSE);
- cal_component_set_dtstart (comp, &date);
- } else {
- cal_component_set_dtstart (comp, NULL);
- }
-
- /* Completed Date. */
- t = e_date_edit_get_time (E_DATE_EDIT (priv->completed_date));
- if (t != -1) {
- *date.value = icaltime_from_timet (t, FALSE);
- cal_component_set_completed (comp, date.value);
- } else {
- cal_component_set_completed (comp, NULL);
- }
-
- g_free (date.value);
-
- /* Percent Complete. */
- percent = e_dialog_spin_get_int (priv->percent_complete);
- cal_component_set_percent (comp, &percent);
-
- /* Status. */
- status = e_dialog_option_menu_get (priv->status, status_map);
- cal_component_set_status (comp, status);
-
- /* Priority. */
- priority = e_dialog_option_menu_get (priv->priority, priority_map);
- priority_value = priority_index_to_value (priority);
- cal_component_set_priority (comp, &priority_value);
-
- /* Classification. */
- cal_component_set_classification (comp, classification_get (priv->classification_public));
-
- /* Categories */
- cat = e_dialog_editable_get (priv->categories);
- cal_component_set_categories (comp, cat);
-
- if (cat)
- g_free (cat);
-
- /* URL. */
- url = e_dialog_editable_get (priv->url);
- cal_component_set_url (comp, url);
-
- if (url)
- g_free (url);
-
- cal_component_commit_sequence (comp);
-}
-
-static TaskEditorPriority
-priority_value_to_index (int priority_value)
-{
- TaskEditorPriority retval;
-
- if (priority_value == 0)
- retval = PRIORITY_UNDEFINED;
- else if (priority_value <= 4)
- retval = PRIORITY_HIGH;
- else if (priority_value == 5)
- retval = PRIORITY_NORMAL;
- else
- retval = PRIORITY_LOW;
-
- return retval;
-}
-
-
-static int
-priority_index_to_value (TaskEditorPriority priority)
-{
- int retval;
-
- switch (priority) {
- case PRIORITY_UNDEFINED:
- retval = 0;
- break;
- case PRIORITY_HIGH:
- retval = 3;
- break;
- case PRIORITY_NORMAL:
- retval = 5;
- break;
- case PRIORITY_LOW:
- retval = 7;
- break;
- default:
- retval = -1;
- g_assert_not_reached ();
- break;
- }
-
- return retval;
-}
-
-
-static void
-completed_changed (EDateEdit *dedit,
- TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- time_t t;
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->ignore_callbacks)
- return;
-
- task_editor_set_changed (tedit, TRUE);
-
- priv->ignore_callbacks = TRUE;
- t = e_date_edit_get_time (E_DATE_EDIT (priv->completed_date));
- if (t == -1) {
- /* If the 'Completed Date' is set to 'None', we set the
- status to 'Not Started' and the percent-complete to 0.
- The task may actually be partially-complete, but we leave
- it to the user to set those fields. */
- e_dialog_option_menu_set (priv->status, ICAL_STATUS_NEEDSACTION,
- status_map);
- e_dialog_spin_set (priv->percent_complete, 0);
- } else {
- e_dialog_option_menu_set (priv->status, ICAL_STATUS_COMPLETED,
- status_map);
- e_dialog_spin_set (priv->percent_complete, 100);
- }
- priv->ignore_callbacks = FALSE;
-}
-
-
-static void
-status_changed (GtkMenu *menu,
- TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- icalproperty_status status;
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->ignore_callbacks)
- return;
-
- task_editor_set_changed (tedit, TRUE);
-
- status = e_dialog_option_menu_get (priv->status, status_map);
- priv->ignore_callbacks = TRUE;
- if (status == ICAL_STATUS_NEEDSACTION) {
- e_dialog_spin_set (priv->percent_complete, 0);
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), -1);
- } else if (status == ICAL_STATUS_COMPLETED) {
- e_dialog_spin_set (priv->percent_complete, 100);
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date),
- time (NULL));
- }
- priv->ignore_callbacks = FALSE;
-}
-
-
-static void
-percent_complete_changed (GtkAdjustment *adj,
- TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
- gint percent;
- icalproperty_status status;
- time_t date_completed;
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->ignore_callbacks)
- return;
-
- task_editor_set_changed (tedit, TRUE);
-
- percent = e_dialog_spin_get_int (priv->percent_complete);
- priv->ignore_callbacks = TRUE;
-
- if (percent == 100) {
- date_completed = time (NULL);
- status = ICAL_STATUS_COMPLETED;
- } else {
- /* FIXME: Set to 'None'. */
- date_completed = time (NULL);
-
- if (percent == 0)
- status = ICAL_STATUS_NEEDSACTION;
- else
- status = ICAL_STATUS_INPROCESS;
- }
-
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date),
- date_completed);
- e_dialog_option_menu_set (priv->status, status, status_map);
-
- priv->ignore_callbacks = FALSE;
-}
-
-/* Decode the radio button group for classifications */
-static CalComponentClassification
-classification_get (GtkWidget *widget)
-{
- return e_dialog_radio_get (widget, classification_map);
-}
-
-
-/* This is called when all fields except those handled above (status, percent
- complete & completed date) are changed. It just sets the "changed" flag. */
-static void
-field_changed (GtkWidget *widget,
- TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- g_return_if_fail (IS_TASK_EDITOR (tedit));
-
- priv = tedit->priv;
-
- if (priv->ignore_callbacks)
- return;
-
- task_editor_set_changed (tedit, TRUE);
-}
-
-
-static void
-task_editor_set_changed (TaskEditor *tedit,
- gboolean changed)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
-#if 0
- g_print ("In task_editor_set_changed: %s\n",
- changed ? "TRUE" : "FALSE");
-#endif
-
- priv->changed = changed;
-
- if (priv->app)
- gnome_property_box_set_state (GNOME_PROPERTY_BOX (priv->app), changed);
-}
-
-
-/* This checks if the "changed" field is set, and if so it prompts to save
- the changes using a "Save/Discard/Cancel" modal dialog. It then saves the
- changes if requested. It returns TRUE if the dialog should now be closed. */
-static gboolean
-prompt_to_save_changes (TaskEditor *tedit)
-{
- TaskEditorPrivate *priv;
-
- priv = tedit->priv;
-
- if (!priv->changed)
- return TRUE;
-
- switch (save_component_dialog (GTK_WINDOW (priv->app))) {
- case 0: /* Save */
- /* FIXME: If an error occurs here, we should popup a dialog
- and then return FALSE. */
- save_todo_object (tedit);
- return TRUE;
- case 1: /* Discard */
- return TRUE;
- case 2: /* Cancel */
- default:
- return FALSE;
- break;
- }
-
-}
-
-static void
-categories_clicked(GtkWidget *button, TaskEditor *tedit)
-{
- char *categories;
- GnomeDialog *dialog;
- int result;
- GtkWidget *entry;
-
- entry = ((TaskEditorPrivate *)tedit->priv)->categories;
- categories = e_utf8_gtk_entry_get_text (GTK_ENTRY (entry));
-
- dialog = GNOME_DIALOG (e_categories_new (categories));
- result = gnome_dialog_run (dialog);
- g_free (categories);
-
- if (result == 0) {
- gtk_object_get (GTK_OBJECT (dialog),
- "categories", &categories,
- NULL);
- e_utf8_gtk_entry_set_text (GTK_ENTRY (entry), categories);
- g_free (categories);
- }
- gtk_object_destroy (GTK_OBJECT (dialog));
-}
diff --git a/calendar/gui/dialogs/task-editor.h b/calendar/gui/dialogs/task-editor.h
deleted file mode 100644
index 7327803a72..0000000000
--- a/calendar/gui/dialogs/task-editor.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- * Author :
- * Damon Chaplin <damon@ximian.com>
- *
- * Copyright 2000, Helix Code, Inc.
- * Copyright 2000, Ximian, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * 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 _TASK_EDITOR_H_
-#define _TASK_EDITOR_H_
-
-#include <gtk/gtkobject.h>
-#include <libgnome/gnome-defs.h>
-#include <bonobo.h>
-#include <cal-client/cal-client.h>
-
-BEGIN_GNOME_DECLS
-
-
-#define TASK_EDITOR(obj) GTK_CHECK_CAST (obj, task_editor_get_type (), TaskEditor)
-#define TASK_EDITOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, task_editor_get_type (), TaskEditorClass)
-#define IS_TASK_EDITOR(obj) GTK_CHECK_TYPE (obj, task_editor_get_type ())
-
-
-typedef struct _TaskEditor TaskEditor;
-typedef struct _TaskEditorClass TaskEditorClass;
-
-struct _TaskEditor
-{
- GtkObject object;
-
- /* Private data */
- gpointer priv;
-};
-
-struct _TaskEditorClass
-{
- GtkObjectClass parent_class;
-};
-
-GtkType task_editor_get_type (void);
-TaskEditor* task_editor_construct (TaskEditor *tedit);
-TaskEditor* task_editor_new (void);
-void task_editor_set_cal_client (TaskEditor *tedit,
- CalClient *client);
-void task_editor_set_todo_object (TaskEditor *tedit,
- CalComponent *comp);
-void task_editor_focus (TaskEditor *tedit);
-
-
-
-END_GNOME_DECLS
-
-#endif /* _TASK_EDITOR_H_ */
diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade
deleted file mode 100644
index ae7ea9681a..0000000000
--- a/calendar/gui/dialogs/task-page.glade
+++ /dev/null
@@ -1,695 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>task-editor-dialog</name>
- <program_name>task-editor-dialog</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomePropertyBox</class>
- <name>task-editor-dialog</name>
- <visible>False</visible>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkNotebook</class>
- <child_name>GnomeDock:contents</child_name>
- <name>notebook1</name>
- <border_width>2</border_width>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table3</name>
- <rows>1</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Su_mmary:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>summary</default_focus_target>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>False</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>summary</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame2</name>
- <label>Date &amp; Time</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label6</name>
- <label>Sta_rt Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>_Due Date:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>due-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:32:18 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>start-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:33:31 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkText</class>
- <name>description</name>
- <height>80</height>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text></text>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame23</name>
- <label>Progress</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label7</name>
- <label>_Status:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>status</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>status</name>
- <can_focus>True</can_focus>
- <items>Not Started
-In Progress
-Completed
-Cancelled
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label8</name>
- <label>_Priority:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>priority</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>priority</name>
- <can_focus>True</can_focus>
- <items>High
-Normal
-Low
-Undefined
-</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label9</name>
- <label>% Comp_lete:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <default_focus_target>percent-complete</default_focus_target>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>percent-complete</name>
- <width>60</width>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>0</value>
- <lower>0</lower>
- <upper>100</upper>
- <step>10</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame24</name>
- <label>Classification</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox6</name>
- <border_width>2</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-public</name>
- <can_focus>True</can_focus>
- <label>Pu_blic</label>
- <active>True</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-private</name>
- <can_focus>True</can_focus>
- <label>Pri_vate</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>classification-confidential</name>
- <can_focus>True</can_focus>
- <label>_Confidential</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>classification_radio_group</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>2</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>contacts-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label16</name>
- <label>_Contacts...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>contacts</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>categories-button</name>
- <can_focus>True</can_focus>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label17</name>
- <label>Ca_tegories...</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>4</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>categories</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label1</name>
- <label>Task</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table4</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>2</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkLabel</class>
- <name>label12</name>
- <label>Date Completed:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label14</name>
- <label>URL:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>url</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>Custom</class>
- <name>completed-date</name>
- <creation_function>task_editor_create_date_edit</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Sun, 10 Sep 2000 17:34:07 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label2</name>
- <label>Details</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>