aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-06-23 06:35:41 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-06-23 06:35:41 +0800
commit2e266d5ae53296ce9b647c2318b42b2d9111a7b1 (patch)
treeae3635b63e45a7d0d4ef9e2c46ee0d860da27601 /calendar/gui
parent433db9d759e49c0200d9b27553add4afcddc100d (diff)
downloadgsoc2013-evolution-2e266d5ae53296ce9b647c2318b42b2d9111a7b1.tar
gsoc2013-evolution-2e266d5ae53296ce9b647c2318b42b2d9111a7b1.tar.gz
gsoc2013-evolution-2e266d5ae53296ce9b647c2318b42b2d9111a7b1.tar.bz2
gsoc2013-evolution-2e266d5ae53296ce9b647c2318b42b2d9111a7b1.tar.lz
gsoc2013-evolution-2e266d5ae53296ce9b647c2318b42b2d9111a7b1.tar.xz
gsoc2013-evolution-2e266d5ae53296ce9b647c2318b42b2d9111a7b1.tar.zst
gsoc2013-evolution-2e266d5ae53296ce9b647c2318b42b2d9111a7b1.zip
HIGify and newer design; alarm page is gone, Cancel/OK buttons for the
2004-06-22 JP Rosevear <jpr@novell.com> * gui/dialogs/Makefile.am, gui/dialogs/alarm-dialog.c, gui/dialogs/alarm-dialog.glade, gui/dialogs/alarm-dialog.h, gui/dialogs/alarm-list-dialog.c, gui/dialogs/alarm-list-dialog.glade, gui/dialogs/alarm-list-dialog.h, gui/dialogs/alarm-options.c, gui/dialogs/alarm-options.h, gui/dialogs/alarm-page.c, gui/dialogs/alarm-page.glade, gui/dialogs/alarm-page.h, gui/dialogs/comp-editor.c, gui/dialogs/comp-editor.h, gui/dialogs/event-editor.c, gui/dialogs/event-page.c, gui/dialogs/event-page.glade, gui/dialogs/meeting-page.c, gui/dialogs/meeting-page.glade, gui/dialogs/recurrence-page.c, gui/dialogs/recurrence-page.glade, gui/dialogs/task-details-page.c, gui/dialogs/task-details-page.glade, gui/dialogs/task-editor.c, gui/dialogs/task-page.c, gui/dialogs/task-page.glade: HIGify and newer design; alarm page is gone, Cancel/OK buttons for the dialog, no more menus; slightly improve read-only workings for entry areas svn path=/trunk/; revision=26463
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/Makefile.am6
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c324
-rw-r--r--calendar/gui/dialogs/alarm-dialog.glade336
-rw-r--r--calendar/gui/dialogs/alarm-dialog.h (renamed from calendar/gui/dialogs/alarm-page.h)35
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c244
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.glade219
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.h38
-rw-r--r--calendar/gui/dialogs/alarm-options.c8
-rw-r--r--calendar/gui/dialogs/alarm-options.h2
-rw-r--r--calendar/gui/dialogs/alarm-page.c897
-rw-r--r--calendar/gui/dialogs/alarm-page.glade545
-rw-r--r--calendar/gui/dialogs/comp-editor.c553
-rw-r--r--calendar/gui/dialogs/comp-editor.h15
-rw-r--r--calendar/gui/dialogs/event-editor.c69
-rw-r--r--calendar/gui/dialogs/event-page.c428
-rw-r--r--calendar/gui/dialogs/event-page.glade998
-rw-r--r--calendar/gui/dialogs/meeting-page.c38
-rw-r--r--calendar/gui/dialogs/meeting-page.glade502
-rw-r--r--calendar/gui/dialogs/recurrence-page.c337
-rw-r--r--calendar/gui/dialogs/recurrence-page.glade925
-rw-r--r--calendar/gui/dialogs/task-details-page.c32
-rw-r--r--calendar/gui/dialogs/task-details-page.glade628
-rw-r--r--calendar/gui/dialogs/task-editor.c61
-rw-r--r--calendar/gui/dialogs/task-page.c116
-rw-r--r--calendar/gui/dialogs/task-page.glade765
25 files changed, 4079 insertions, 4042 deletions
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index dfe84f1a3c..393d9744be 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -32,6 +32,10 @@ noinst_LTLIBRARIES = libcal-dialogs.la
libcal_dialogs_la_SOURCES = \
$(IDL_GENERATED) \
+ alarm-dialog.c \
+ alarm-dialog.h \
+ alarm-list-dialog.c \
+ alarm-list-dialog.h \
alarm-options.c \
alarm-options.h \
alarm-page.c \
@@ -86,6 +90,8 @@ libcal_dialogs_la_SOURCES = \
url-editor-dialog.h
glade_DATA = \
+ alarm-dialog.glade \
+ alarm-list-dialog.glade \
alarm-options.glade \
alarm-page.glade \
cal-prefs-dialog.glade \
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
new file mode 100644
index 0000000000..0b886eabba
--- /dev/null
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -0,0 +1,324 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/* Evolution calendar - Alarm page of the calendar component dialogs
+ *
+ * Copyright (C) 2001-2003 Ximian, Inc.
+ *
+ * Authors: Federico Mena-Quintero <federico@ximian.com>
+ * Miguel de Icaza <miguel@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ * JP Rosevear <jpr@ximian.com>
+ * Hans Petter Jansson <hpj@ximian.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkcellrenderertext.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtksignal.h>
+#include <gtk/gtktreeview.h>
+#include <gtk/gtktreeselection.h>
+#include <gtk/gtkoptionmenu.h>
+#include <libgnome/gnome-i18n.h>
+#include <glade/glade.h>
+#include "e-util/e-dialog-widgets.h"
+#include "e-util/e-time-utils.h"
+#include <libecal/e-cal-util.h>
+#include <libecal/e-cal-time-util.h>
+#include "e-util/e-dialog-widgets.h"
+#include "e-util/e-icon-factory.h"
+#include "../calendar-config.h"
+#include "comp-editor-util.h"
+#include "alarm-options.h"
+#include "alarm-dialog.h"
+
+
+
+typedef struct {
+ /* Glade XML data */
+ GladeXML *xml;
+
+ /* The alarm */
+ ECalComponentAlarm *alarm;
+
+ /* The client */
+ ECal *ecal;
+
+ /* Toplevel */
+ GtkWidget *toplevel;
+
+ GtkWidget *action;
+ GtkWidget *interval_value;
+ GtkWidget *value_units;
+ GtkWidget *relative;
+ GtkWidget *time;
+
+ GtkWidget *button_options;
+} Dialog;
+
+/* "relative" types */
+enum {
+ BEFORE,
+ AFTER
+};
+
+/* Time units */
+enum {
+ MINUTES,
+ HOURS,
+ DAYS
+};
+
+/* Option menu maps */
+static const int action_map[] = {
+ E_CAL_COMPONENT_ALARM_DISPLAY,
+ E_CAL_COMPONENT_ALARM_AUDIO,
+ E_CAL_COMPONENT_ALARM_PROCEDURE,
+ E_CAL_COMPONENT_ALARM_EMAIL,
+ -1
+};
+
+static const char *action_map_cap[] = {
+ CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS,
+ CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS,
+ CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS,
+ CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS
+};
+
+static const int value_map[] = {
+ MINUTES,
+ HOURS,
+ DAYS,
+ -1
+};
+
+static const int relative_map[] = {
+ BEFORE,
+ AFTER,
+ -1
+};
+
+static const int time_map[] = {
+ E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START,
+ E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END,
+ -1
+};
+
+/* Fills the widgets with default values */
+static void
+clear_widgets (Dialog *dialog)
+{
+ /* Sane defaults */
+ e_dialog_option_menu_set (dialog->action, E_CAL_COMPONENT_ALARM_DISPLAY, action_map);
+ e_dialog_spin_set (dialog->interval_value, 15);
+ e_dialog_option_menu_set (dialog->value_units, MINUTES, value_map);
+ e_dialog_option_menu_set (dialog->relative, BEFORE, relative_map);
+ e_dialog_option_menu_set (dialog->time, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map);
+}
+
+/* fill_widgets handler for the alarm page */
+static void
+alarm_to_dialog (Dialog *dialog)
+{
+ GtkWidget *menu;
+ GList *l;
+ int i;
+
+ /* Clean the page */
+ clear_widgets (dialog);
+
+ /* Alarm types */
+ menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dialog->action));
+ for (i = 0, l = GTK_MENU_SHELL (menu)->children; action_map[i] != -1; i++, l = l->next) {
+ if (e_cal_get_static_capability (dialog->ecal, action_map_cap[i]))
+ gtk_widget_set_sensitive (l->data, FALSE);
+ else
+ gtk_widget_set_sensitive (l->data, TRUE);
+ }
+}
+
+/* fill_component handler for the alarm page */
+static void
+dialog_to_alarm (Dialog *dialog)
+{
+ ECalComponentAlarmTrigger trigger;
+ ECalComponentAlarmAction action;
+
+ memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
+ trigger.type = e_dialog_option_menu_get (dialog->time, time_map);
+ if (e_dialog_option_menu_get (dialog->relative, relative_map) == BEFORE)
+ trigger.u.rel_duration.is_neg = 1;
+ else
+ trigger.u.rel_duration.is_neg = 0;
+
+ switch (e_dialog_option_menu_get (dialog->value_units, value_map)) {
+ case MINUTES:
+ trigger.u.rel_duration.minutes =
+ e_dialog_spin_get_int (dialog->interval_value);
+ break;
+
+ case HOURS:
+ trigger.u.rel_duration.hours =
+ e_dialog_spin_get_int (dialog->interval_value);
+ break;
+
+ case DAYS:
+ trigger.u.rel_duration.days =
+ e_dialog_spin_get_int (dialog->interval_value);
+ break;
+
+ default:
+ g_assert_not_reached ();
+ }
+ e_cal_component_alarm_set_trigger (dialog->alarm, trigger);
+
+ action = e_dialog_option_menu_get (dialog->action, action_map);
+ e_cal_component_alarm_set_action (dialog->alarm, action);
+ if (action == E_CAL_COMPONENT_ALARM_EMAIL && !e_cal_component_alarm_has_attendees (dialog->alarm)) {
+ char *email;
+
+ if (!e_cal_get_static_capability (dialog->ecal, CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS)
+ && e_cal_get_alarm_email_address (dialog->ecal, &email, NULL)) {
+ ECalComponentAttendee *a;
+ GSList attendee_list;
+
+ a = g_new0 (ECalComponentAttendee, 1);
+ a->value = email;
+ attendee_list.data = a;
+ attendee_list.next = NULL;
+ e_cal_component_alarm_set_attendee_list (dialog->alarm, &attendee_list);
+ g_free (email);
+ g_free (a);
+ }
+ }
+}
+
+/* Gets the widgets from the XML file and returns TRUE if they are all available. */
+static gboolean
+get_widgets (Dialog *dialog)
+{
+#define GW(name) glade_xml_get_widget (dialog->xml, name)
+
+ dialog->toplevel = GW ("alarm-dialog");
+ if (!dialog->toplevel)
+ return FALSE;
+
+ dialog->action = GW ("action");
+ dialog->interval_value = GW ("interval-value");
+ dialog->value_units = GW ("value-units");
+ dialog->relative = GW ("relative");
+ dialog->time = GW ("time");
+
+ dialog->button_options = GW ("button-options");
+
+#undef GW
+
+ return (dialog->action
+ && dialog->interval_value
+ && dialog->value_units
+ && dialog->relative
+ && dialog->time
+ && dialog->button_options);
+}
+
+/* Callback used when the alarm options button is clicked */
+static void
+show_options (Dialog *dialog)
+{
+ gboolean repeat;
+ char *email;
+
+ e_cal_component_alarm_set_action (dialog->alarm,
+ e_dialog_option_menu_get (dialog->action, action_map));
+
+ repeat = !e_cal_get_static_capability (dialog->ecal, CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT);
+
+ if (e_cal_get_static_capability (dialog->ecal, CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS)
+ || e_cal_get_alarm_email_address (dialog->ecal, &email, NULL)) {
+ if (!alarm_options_dialog_run (dialog->toplevel, dialog->alarm, email, repeat))
+ g_message (G_STRLOC ": not create the alarm options dialog");
+ }
+}
+
+/* Hooks the widget signals */
+static void
+init_widgets (Dialog *dialog)
+{
+
+}
+
+gboolean
+alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm)
+{
+ Dialog dialog;
+ int response_id;
+ GList *icon_list;
+
+ g_return_val_if_fail (alarm != NULL, FALSE);
+
+ dialog.alarm = alarm;
+ dialog.ecal = ecal;
+
+ dialog.xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-dialog.glade", NULL, NULL);
+ if (!dialog.xml) {
+ g_message (G_STRLOC ": Could not load the Glade XML file!");
+ return FALSE;
+ }
+
+ if (!get_widgets (&dialog)) {
+ g_object_unref(dialog.xml);
+ return FALSE;
+ }
+
+ init_widgets (&dialog);
+
+ alarm_to_dialog (&dialog);
+
+ icon_list = e_icon_factory_get_icon_list ("stock_calendar");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (dialog.toplevel), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
+ gtk_window_set_transient_for (GTK_WINDOW (dialog.toplevel),
+ GTK_WINDOW (parent));
+
+ keep_alive:
+ response_id = gtk_dialog_run (GTK_DIALOG (dialog.toplevel));
+ switch (response_id) {
+ case GTK_RESPONSE_APPLY:
+ show_options (&dialog);
+ goto keep_alive;
+
+ case GTK_RESPONSE_OK:
+ gtk_widget_hide (dialog.toplevel);
+ dialog_to_alarm (&dialog);
+ break;
+
+ default:
+ break;
+ }
+
+ gtk_widget_destroy (dialog.toplevel);
+ g_object_unref (dialog.xml);
+
+ return response_id == GTK_RESPONSE_OK ? TRUE : FALSE;
+}
diff --git a/calendar/gui/dialogs/alarm-dialog.glade b/calendar/gui/dialogs/alarm-dialog.glade
new file mode 100644
index 0000000000..e95e699453
--- /dev/null
+++ b/calendar/gui/dialogs/alarm-dialog.glade
@@ -0,0 +1,336 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="alarm-dialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Add Alarm</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="modal">True</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-10</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox55">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-preferences</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Options...</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button-options">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox54">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkOptionMenu" id="action">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget1">
+ <property name="visible">True</property>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Pop up an alert</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Play a sound</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Run a program</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="send_an_email1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Send an email</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="interval-value">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">1 0 999 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkOptionMenu" id="value-units">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget5">
+ <property name="visible">True</property>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">minute(s)</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">hour(s)</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">day(s)</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkOptionMenu" id="relative">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget9">
+ <property name="visible">True</property>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">before</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">after</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkOptionMenu" id="time">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget12">
+ <property name="visible">True</property>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget13">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">start of appointment</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget14">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">end of appointment</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/calendar/gui/dialogs/alarm-page.h b/calendar/gui/dialogs/alarm-dialog.h
index d814e850b3..8e57579d9f 100644
--- a/calendar/gui/dialogs/alarm-page.h
+++ b/calendar/gui/dialogs/alarm-dialog.h
@@ -22,40 +22,15 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef ALARM_PAGE_H
-#define ALARM_PAGE_H
+#ifndef ALARM_DIALOG_H
+#define ALARM_DIALOG_H
-#include "comp-editor-page.h"
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-component.h>
G_BEGIN_DECLS
-
-
-#define TYPE_ALARM_PAGE (alarm_page_get_type ())
-#define ALARM_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALARM_PAGE, AlarmPage))
-#define ALARM_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALARM_PAGE, AlarmPageClass))
-#define IS_ALARM_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALARM_PAGE))
-#define IS_ALARM_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), TYPE_ALARM_PAGE))
-
-typedef struct _AlarmPagePrivate AlarmPagePrivate;
-
-typedef struct {
- CompEditorPage page;
-
- /* Private data */
- AlarmPagePrivate *priv;
-} AlarmPage;
-
-typedef struct {
- CompEditorPageClass parent_class;
-} AlarmPageClass;
-
-
-GtkType alarm_page_get_type (void);
-AlarmPage *alarm_page_construct (AlarmPage *apage);
-AlarmPage *alarm_page_new (void);
-
-
+gboolean alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm);
G_END_DECLS
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
new file mode 100644
index 0000000000..42b992dde7
--- /dev/null
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -0,0 +1,244 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/* Evolution calendar - Alarm page of the calendar component dialogs
+ *
+ * Copyright (C) 2001-2003 Ximian, Inc.
+ *
+ * Authors: Federico Mena-Quintero <federico@ximian.com>
+ * Miguel de Icaza <miguel@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ * JP Rosevear <jpr@ximian.com>
+ * Hans Petter Jansson <hpj@ximian.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtkcellrenderertext.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtksignal.h>
+#include <gtk/gtktreeview.h>
+#include <gtk/gtktreeselection.h>
+#include <gtk/gtkoptionmenu.h>
+#include <libgnome/gnome-i18n.h>
+#include <glade/glade.h>
+#include "e-util/e-dialog-widgets.h"
+#include "e-util/e-time-utils.h"
+#include <libecal/e-cal-util.h>
+#include <libecal/e-cal-time-util.h>
+#include "e-util/e-dialog-widgets.h"
+#include "e-util/e-icon-factory.h"
+#include "alarm-dialog.h"
+#include "alarm-list-dialog.h"
+
+
+
+typedef struct {
+ /* Glade XML data */
+ GladeXML *xml;
+
+ /* The client */
+ ECal *ecal;
+
+ /* The list store */
+ EAlarmList *list_store;
+
+ /* Toplevel */
+ GtkWidget *toplevel;
+
+ GtkWidget *list;
+ GtkWidget *add;
+ GtkWidget *delete;
+} Dialog;
+
+/* Gets the widgets from the XML file and returns TRUE if they are all available. */
+static gboolean
+get_widgets (Dialog *dialog)
+{
+#define GW(name) glade_xml_get_widget (dialog->xml, name)
+
+ dialog->toplevel = GW ("alarm-list-dialog");
+ if (!dialog->toplevel)
+ return FALSE;
+
+ dialog->list = GW ("list");
+ dialog->add = GW ("add");
+ dialog->delete = GW ("delete");
+
+#undef GW
+
+ return (dialog->list
+ && dialog->add
+ && dialog->delete);
+}
+
+static void
+sensitize_buttons (Dialog *dialog)
+{
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ gboolean have_selected;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->list));
+ have_selected = gtk_tree_selection_get_selected (selection, NULL, &iter);
+
+ if (e_cal_get_one_alarm_only (dialog->ecal) && have_selected)
+ gtk_widget_set_sensitive (dialog->add, FALSE);
+ else
+ gtk_widget_set_sensitive (dialog->add, TRUE);
+ gtk_widget_set_sensitive (dialog->delete, have_selected);
+}
+
+/* Callback used for the "add reminder" button */
+static void
+add_clicked_cb (GtkButton *button, gpointer data)
+{
+ Dialog *dialog = data;
+ ECalComponentAlarm *alarm;
+ GtkTreeView *view;
+ GtkTreeIter iter;
+ icalcomponent *icalcomp;
+ icalproperty *icalprop;
+
+ view = GTK_TREE_VIEW (dialog->list);
+
+ alarm = e_cal_component_alarm_new ();
+
+ icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
+ icalprop = icalproperty_new_x ("1");
+ icalproperty_set_x_name (icalprop, "X-EVOLUTION-NEEDS-DESCRIPTION");
+ icalcomponent_add_property (icalcomp, icalprop);
+
+ if (alarm_dialog_run (dialog->toplevel, dialog->ecal, alarm)) {
+ e_alarm_list_append (dialog->list_store, &iter, alarm);
+ gtk_tree_selection_select_iter (gtk_tree_view_get_selection (view), &iter);
+ } else {
+ e_cal_component_alarm_free (alarm);
+ }
+
+ sensitize_buttons (dialog);
+}
+
+/* Callback used for the "delete reminder" button */
+static void
+delete_clicked_cb (GtkButton *button, gpointer data)
+{
+ Dialog *dialog = data;
+ GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ GtkTreePath *path;
+ gboolean valid_iter;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->list));
+ if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
+ g_warning ("Could not get a selection to delete.");
+ return;
+ }
+
+ path = gtk_tree_model_get_path (GTK_TREE_MODEL (dialog->list_store), &iter);
+ e_alarm_list_remove (dialog->list_store, &iter);
+
+ /* Select closest item after removal */
+ valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->list_store), &iter, path);
+ if (!valid_iter) {
+ gtk_tree_path_prev (path);
+ valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->list_store), &iter, path);
+ }
+
+ if (valid_iter)
+ gtk_tree_selection_select_iter (selection, &iter);
+
+ sensitize_buttons (dialog);
+
+ gtk_tree_path_free (path);
+}
+
+/* Hooks the widget signals */
+static void
+init_widgets (Dialog *dialog)
+{
+ GtkTreeViewColumn *column;
+ GtkCellRenderer *cell_renderer;
+
+ /* View */
+ gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->list),
+ GTK_TREE_MODEL (dialog->list_store));
+
+ column = gtk_tree_view_column_new ();
+ gtk_tree_view_column_set_title (column, _("Action/Trigger"));
+ cell_renderer = GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
+ gtk_tree_view_column_pack_start (column, cell_renderer, TRUE);
+ gtk_tree_view_column_add_attribute (column, cell_renderer, "text", E_ALARM_LIST_COLUMN_DESCRIPTION);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->list), column);
+
+ /* Reminder buttons */
+ g_signal_connect (dialog->add, "clicked",
+ G_CALLBACK (add_clicked_cb), dialog);
+ g_signal_connect (dialog->delete, "clicked",
+ G_CALLBACK (delete_clicked_cb), dialog);
+}
+
+gboolean
+alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store)
+{
+ Dialog dialog;
+ int response_id;
+ GList *icon_list;
+
+ dialog.ecal = ecal;
+ dialog.list_store = list_store;
+
+ dialog.xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-list-dialog.glade", NULL, NULL);
+ if (!dialog.xml) {
+ g_message (G_STRLOC ": Could not load the Glade XML file!");
+ return FALSE;
+ }
+
+ if (!get_widgets (&dialog)) {
+ g_object_unref(dialog.xml);
+ return FALSE;
+ }
+
+ init_widgets (&dialog);
+
+ sensitize_buttons (&dialog);
+
+ icon_list = e_icon_factory_get_icon_list ("stock_calendar");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (dialog.toplevel), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+
+ gtk_window_set_transient_for (GTK_WINDOW (dialog.toplevel),
+ GTK_WINDOW (parent));
+
+ response_id = gtk_dialog_run (GTK_DIALOG (dialog.toplevel));
+ gtk_widget_hide (dialog.toplevel);
+
+#if 0
+ if (response_id == GTK_RESPONSE_OK)
+ dialog_to_alarm (&dialog);
+#endif
+
+ gtk_widget_destroy (dialog.toplevel);
+ g_object_unref (dialog.xml);
+
+ return TRUE;
+}
diff --git a/calendar/gui/dialogs/alarm-list-dialog.glade b/calendar/gui/dialogs/alarm-list-dialog.glade
new file mode 100644
index 0000000000..6143b5c6a7
--- /dev/null
+++ b/calendar/gui/dialogs/alarm-list-dialog.glade
@@ -0,0 +1,219 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkDialog" id="alarm-list-dialog">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Alarms</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+ <property name="modal">True</property>
+ <property name="default_width">320</property>
+ <property name="default_height">240</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="has_separator">True</property>
+
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+ <child>
+ <widget class="GtkButton" id="cancelbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-6</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="okbutton1">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-ok</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="response_id">-5</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox53">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox55">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow13">
+ <property name="visible">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTreeView" id="list">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">True</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox2">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkButton" id="add">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox56">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-add</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label65">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">A_dd</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="delete">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
+</glade-interface>
diff --git a/calendar/gui/dialogs/alarm-list-dialog.h b/calendar/gui/dialogs/alarm-list-dialog.h
new file mode 100644
index 0000000000..a46bcccfa4
--- /dev/null
+++ b/calendar/gui/dialogs/alarm-list-dialog.h
@@ -0,0 +1,38 @@
+/* Evolution calendar - Alarm page of the calendar component dialogs
+ *
+ * Copyright (C) 2001-2003 Ximian, Inc.
+ *
+ * Authors: Federico Mena-Quintero <federico@ximian.com>
+ * Miguel de Icaza <miguel@ximian.com>
+ * Seth Alves <alves@hungry.com>
+ * JP Rosevear <jpr@ximian.com>
+ * Hans Petter Jansson <hpj@ximian.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef ALARM_LIST_DIALOG_H
+#define ALARM_LIST_DIALOG_H
+
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-component.h>
+#include "../e-alarm-list.h"
+
+G_BEGIN_DECLS
+
+gboolean alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store);
+
+G_END_DECLS
+
+#endif
diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c
index 7022325ae3..bb77cb61f4 100644
--- a/calendar/gui/dialogs/alarm-options.c
+++ b/calendar/gui/dialogs/alarm-options.c
@@ -770,7 +770,7 @@ dialog_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
* Return value: TRUE if the dialog could be created, FALSE otherwise.
**/
gboolean
-alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean repeat)
+alarm_options_dialog_run (GtkWidget *parent, ECalComponentAlarm *alarm, const char *email, gboolean repeat)
{
Dialog dialog;
int response_id;
@@ -782,7 +782,7 @@ alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean
dialog.email = email;
dialog.xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-options.glade", NULL, NULL);
if (!dialog.xml) {
- g_message ("alarm_options_dialog_new(): Could not load the Glade XML file!");
+ g_message (G_STRLOC ": Could not load the Glade XML file!");
return FALSE;
}
@@ -807,6 +807,9 @@ alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean
g_list_free (icon_list);
}
+ gtk_window_set_transient_for (GTK_WINDOW (dialog.toplevel),
+ GTK_WINDOW (parent));
+
response_id = gtk_dialog_run (GTK_DIALOG (dialog.toplevel));
gtk_widget_hide (dialog.toplevel);
@@ -818,3 +821,4 @@ alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean
return TRUE;
}
+
diff --git a/calendar/gui/dialogs/alarm-options.h b/calendar/gui/dialogs/alarm-options.h
index 5a07935810..9811edf253 100644
--- a/calendar/gui/dialogs/alarm-options.h
+++ b/calendar/gui/dialogs/alarm-options.h
@@ -23,6 +23,6 @@
#include <libecal/e-cal-component.h>
-gboolean alarm_options_dialog_run (ECalComponentAlarm *alarm, const char *email, gboolean repeat);
+gboolean alarm_options_dialog_run (GtkWidget *parent, ECalComponentAlarm *alarm, const char *email, gboolean repeat);
#endif
diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c
deleted file mode 100644
index 8270332707..0000000000
--- a/calendar/gui/dialogs/alarm-page.c
+++ /dev/null
@@ -1,897 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/* Evolution calendar - Alarm page of the calendar component dialogs
- *
- * Copyright (C) 2001-2003 Ximian, Inc.
- *
- * Authors: Federico Mena-Quintero <federico@ximian.com>
- * Miguel de Icaza <miguel@ximian.com>
- * Seth Alves <alves@hungry.com>
- * JP Rosevear <jpr@ximian.com>
- * Hans Petter Jansson <hpj@ximian.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkcellrenderertext.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtktreeview.h>
-#include <gtk/gtktreeselection.h>
-#include <gtk/gtkoptionmenu.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include "e-util/e-dialog-widgets.h"
-#include "e-util/e-time-utils.h"
-#include <libecal/e-cal-util.h>
-#include <libecal/e-cal-time-util.h>
-#include "../calendar-config.h"
-#include "comp-editor-util.h"
-#include "alarm-options.h"
-#include "../e-alarm-list.h"
-#include "alarm-page.h"
-
-
-
-/* Private part of the AlarmPage structure */
-struct _AlarmPagePrivate {
- /* Glade XML data */
- GladeXML *xml;
-
- /* Widgets from the Glade file */
-
- GtkWidget *main;
-
- GtkWidget *summary;
- GtkWidget *date_time;
-
- GtkWidget *list;
- GtkWidget *add;
- GtkWidget *delete;
-
- GtkWidget *action;
- GtkWidget *interval_value;
- GtkWidget *value_units;
- GtkWidget *relative;
- GtkWidget *time;
-
- GtkWidget *button_options;
-
- /* Alarm options dialog and the alarm we maintain */
- ECalComponentAlarm *alarm;
-
- /* Alarm store for the GtkTreeView list widget */
- EAlarmList *list_store;
-
- gboolean updating;
-
- /* Old summary, to detect changes */
- gchar *old_summary;
-};
-
-/* "relative" types */
-enum {
- BEFORE,
- AFTER
-};
-
-/* Time units */
-enum {
- MINUTES,
- HOURS,
- DAYS
-};
-
-/* Option menu maps */
-static const int action_map[] = {
- E_CAL_COMPONENT_ALARM_DISPLAY,
- E_CAL_COMPONENT_ALARM_AUDIO,
- E_CAL_COMPONENT_ALARM_PROCEDURE,
- E_CAL_COMPONENT_ALARM_EMAIL,
- -1
-};
-
-static const char *action_map_cap[] = {
- CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS,
- CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS,
- CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS,
- CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS
-};
-
-static const int value_map[] = {
- MINUTES,
- HOURS,
- DAYS,
- -1
-};
-
-static const int relative_map[] = {
- BEFORE,
- AFTER,
- -1
-};
-
-static const int time_map[] = {
- E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START,
- E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END,
- -1
-};
-
-
-
-static void alarm_page_class_init (AlarmPageClass *class);
-static void alarm_page_init (AlarmPage *apage);
-static void alarm_page_finalize (GObject *object);
-
-static GtkWidget *alarm_page_get_widget (CompEditorPage *page);
-static void alarm_page_focus_main_widget (CompEditorPage *page);
-static gboolean alarm_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
-static gboolean alarm_page_fill_component (CompEditorPage *page, ECalComponent *comp);
-static void alarm_page_set_summary (CompEditorPage *page, const char *summary);
-static void alarm_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
-
-static CompEditorPageClass *parent_class = NULL;
-
-
-
-/**
- * alarm_page_get_type:
- *
- * Registers the #AlarmPage class if necessary, and returns the type ID
- * associated to it.
- *
- * Return value: The type ID of the #AlarmPage class.
- **/
-
-E_MAKE_TYPE (alarm_page, "AlarmPage", AlarmPage, alarm_page_class_init,
- alarm_page_init, TYPE_COMP_EDITOR_PAGE);
-
-/* Class initialization function for the alarm page */
-static void
-alarm_page_class_init (AlarmPageClass *class)
-{
- CompEditorPageClass *editor_page_class;
- GObjectClass *gobject_class;
-
- editor_page_class = (CompEditorPageClass *) class;
- gobject_class = (GObjectClass *) class;
-
- parent_class = g_type_class_ref (TYPE_COMP_EDITOR_PAGE);
-
- editor_page_class->get_widget = alarm_page_get_widget;
- editor_page_class->focus_main_widget = alarm_page_focus_main_widget;
- editor_page_class->fill_widgets = alarm_page_fill_widgets;
- editor_page_class->fill_component = alarm_page_fill_component;
- editor_page_class->set_summary = alarm_page_set_summary;
- editor_page_class->set_dates = alarm_page_set_dates;
-
- gobject_class->finalize = alarm_page_finalize;
-}
-
-/* Object initialization function for the alarm page */
-static void
-alarm_page_init (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
- icalcomponent *icalcomp;
- icalproperty *icalprop;
-
- priv = g_new0 (AlarmPagePrivate, 1);
- apage->priv = priv;
-
- priv->xml = NULL;
-
- priv->main = NULL;
- priv->summary = NULL;
- priv->date_time = NULL;
- priv->list = NULL;
- priv->add = NULL;
- priv->delete = NULL;
- priv->action = NULL;
- priv->interval_value = NULL;
- priv->value_units = NULL;
- priv->relative = NULL;
- priv->time = NULL;
- priv->button_options = NULL;
-
- /* create the default alarm, which will contain the
- * X-EVOLUTION-NEEDS-DESCRIPTION property, so that we
- * set a correct description if none is set */
- priv->alarm = e_cal_component_alarm_new ();
-
- icalcomp = e_cal_component_alarm_get_icalcomponent (priv->alarm);
- icalprop = icalproperty_new_x ("1");
- icalproperty_set_x_name (icalprop, "X-EVOLUTION-NEEDS-DESCRIPTION");
- icalcomponent_add_property (icalcomp, icalprop);
-
- priv->updating = FALSE;
- priv->old_summary = NULL;
-}
-
-/* Destroy handler for the alarm page */
-static void
-alarm_page_finalize (GObject *object)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ALARM_PAGE (object));
-
- apage = ALARM_PAGE (object);
- priv = apage->priv;
-
- if (priv->main)
- gtk_widget_unref (priv->main);
-
- if (priv->xml) {
- g_object_unref (priv->xml);
- priv->xml = NULL;
- }
-
- if (priv->alarm) {
- e_cal_component_alarm_free (priv->alarm);
- priv->alarm = NULL;
- }
-
- if (priv->list_store) {
- g_object_unref (priv->list_store);
- priv->list_store = NULL;
- }
-
- if (priv->old_summary) {
- g_free (priv->old_summary);
- priv->old_summary = NULL;
- }
-
- g_free (priv);
- apage->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-
-
-/* get_widget handler for the alarm page */
-static GtkWidget *
-alarm_page_get_widget (CompEditorPage *page)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- return priv->main;
-}
-
-/* focus_main_widget handler for the alarm page */
-static void
-alarm_page_focus_main_widget (CompEditorPage *page)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- gtk_widget_grab_focus (priv->action);
-}
-
-/* Fills the widgets with default values */
-static void
-clear_widgets (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
-
- priv = apage->priv;
-
- /* Summary */
- gtk_label_set_text (GTK_LABEL (priv->summary), "");
-
- /* Start date */
- gtk_label_set_text (GTK_LABEL (priv->date_time), "");
-
- /* Sane defaults */
- e_dialog_option_menu_set (priv->action, E_CAL_COMPONENT_ALARM_DISPLAY, action_map);
- e_dialog_spin_set (priv->interval_value, 15);
- e_dialog_option_menu_set (priv->value_units, MINUTES, value_map);
- e_dialog_option_menu_set (priv->relative, BEFORE, relative_map);
- e_dialog_option_menu_set (priv->time, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map);
-
- /* List data */
- e_alarm_list_clear (priv->list_store);
-}
-
-static void
-sensitize_buttons (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
- ECal *client;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- gboolean have_selected, read_only, sensitivity;
-
- priv = apage->priv;
-
- client = COMP_EDITOR_PAGE (apage)->client;
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list));
- have_selected = gtk_tree_selection_get_selected (selection, NULL, &iter);
-
- if (e_cal_is_read_only (COMP_EDITOR_PAGE (apage)->client, &read_only, NULL) && read_only)
- sensitivity = FALSE;
- else
- sensitivity = TRUE;
-
- if (e_cal_get_one_alarm_only (COMP_EDITOR_PAGE (apage)->client) && have_selected)
- gtk_widget_set_sensitive (apage->priv->add, FALSE);
- else
- gtk_widget_set_sensitive (apage->priv->add, sensitivity);
- gtk_widget_set_sensitive (priv->delete, have_selected && !read_only ? TRUE : FALSE);
- gtk_widget_set_sensitive (priv->action, sensitivity);
- gtk_widget_set_sensitive (priv->interval_value, sensitivity);
- gtk_widget_set_sensitive (priv->value_units, sensitivity);
- gtk_widget_set_sensitive (priv->relative, sensitivity);
- gtk_widget_set_sensitive (priv->time, sensitivity);
- gtk_widget_set_sensitive (priv->button_options, sensitivity);
-}
-
-/* Appends an alarm to the list */
-static void
-append_reminder (AlarmPage *apage, ECalComponentAlarm *alarm)
-{
- AlarmPagePrivate *priv;
- GtkTreeView *view;
- GtkTreeIter iter;
-
- priv = apage->priv;
- view = GTK_TREE_VIEW (priv->list);
-
- e_alarm_list_append (priv->list_store, &iter, alarm);
- gtk_tree_selection_select_iter (gtk_tree_view_get_selection (view), &iter);
-
- sensitize_buttons (apage);
-}
-
-/* fill_widgets handler for the alarm page */
-static gboolean
-alarm_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- GtkWidget *menu;
- ECalComponentText text;
- GList *alarms, *l;
- CompEditorPageDates dates;
- int i;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- /* Don't send off changes during this time */
- priv->updating = TRUE;
-
- /* Clean the page */
- clear_widgets (apage);
-
- /* Summary */
- e_cal_component_get_summary (comp, &text);
- alarm_page_set_summary (page, text.value);
-
- /* Dates */
- comp_editor_dates (&dates, comp);
- alarm_page_set_dates (page, &dates);
- comp_editor_free_dates (&dates);
-
- /* List */
- if (!e_cal_component_has_alarms (comp))
- goto out;
-
- alarms = e_cal_component_get_alarm_uids (comp);
-
- for (l = alarms; l != NULL; l = l->next) {
- ECalComponentAlarm *ca, *ca_copy;
- const char *auid;
-
- auid = l->data;
- ca = e_cal_component_get_alarm (comp, auid);
- g_assert (ca != NULL);
-
- ca_copy = e_cal_component_alarm_clone (ca);
- e_cal_component_alarm_free (ca);
-
- append_reminder (apage, ca_copy);
- }
- cal_obj_uid_list_free (alarms);
-
- out:
-
- /* Alarm types */
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->action));
- for (i = 0, l = GTK_MENU_SHELL (menu)->children; action_map[i] != -1; i++, l = l->next) {
- if (e_cal_get_static_capability (page->client, action_map_cap[i]))
- gtk_widget_set_sensitive (l->data, FALSE);
- else
- gtk_widget_set_sensitive (l->data, TRUE);
- }
-
- sensitize_buttons (apage);
-
- priv->updating = FALSE;
-
- return TRUE;
-}
-
-/* fill_component handler for the alarm page */
-static gboolean
-alarm_page_fill_component (CompEditorPage *page, ECalComponent *comp)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- GtkTreeView *view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean valid_iter;
- GList *list, *l;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- /* Remove all the alarms from the component */
-
- list = e_cal_component_get_alarm_uids (comp);
- for (l = list; l; l = l->next) {
- const char *auid;
-
- auid = l->data;
- e_cal_component_remove_alarm (comp, auid);
- }
- cal_obj_uid_list_free (list);
-
- /* Add the new alarms */
-
- view = GTK_TREE_VIEW (priv->list);
- model = GTK_TREE_MODEL (priv->list_store);
-
- for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
- valid_iter = gtk_tree_model_iter_next (model, &iter)) {
- ECalComponentAlarm *alarm, *alarm_copy;
- icalcomponent *icalcomp;
- icalproperty *icalprop;
-
- alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
- g_assert (alarm != NULL);
-
- /* We set the description of the alarm if it's got
- * the X-EVOLUTION-NEEDS-DESCRIPTION property.
- */
- icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
- icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
- while (icalprop) {
- const char *x_name;
- ECalComponentText summary;
-
- x_name = icalproperty_get_x_name (icalprop);
- if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) {
- e_cal_component_get_summary (comp, &summary);
- e_cal_component_alarm_set_description (alarm, &summary);
-
- icalcomponent_remove_property (icalcomp, icalprop);
- break;
- }
-
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
- }
-
- /* We clone the alarm to maintain the invariant that the alarm
- * structures in the list did *not* come from the component.
- */
-
- alarm_copy = e_cal_component_alarm_clone (alarm);
- e_cal_component_add_alarm (comp, alarm_copy);
- e_cal_component_alarm_free (alarm_copy);
- }
-
- return TRUE;
-}
-
-/* set_summary handler for the alarm page */
-static void
-alarm_page_set_summary (CompEditorPage *page, const char *summary)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- gtk_label_set_text (GTK_LABEL (priv->summary), summary);
-
- /* iterate over all alarms */
- if (priv->old_summary) {
- GtkTreeView *view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean valid_iter;
-
- view = GTK_TREE_VIEW (priv->list);
- model = GTK_TREE_MODEL (priv->list_store);
-
- for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
- valid_iter = gtk_tree_model_iter_next (model, &iter)) {
- ECalComponentAlarm *alarm;
- ECalComponentText desc;
-
- alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->list_store, &iter);
- g_assert (alarm != NULL);
-
- e_cal_component_alarm_get_description (alarm, &desc);
- if (desc.value && *desc.value) {
- if (!strcmp (desc.value, priv->old_summary)) {
- desc.value = summary;
- e_cal_component_alarm_set_description (alarm, &desc);
- }
- }
- }
-
- g_free (priv->old_summary);
- }
-
- /* update old summary */
- priv->old_summary = g_strdup (summary);
-}
-
-/* set_dates handler for the alarm page */
-static void
-alarm_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (page);
- priv = apage->priv;
-
- comp_editor_date_label (dates, priv->date_time);
-}
-
-
-
-/* Gets the widgets from the XML file and returns TRUE if they are all available. */
-static gboolean
-get_widgets (AlarmPage *apage)
-{
- CompEditorPage *page = COMP_EDITOR_PAGE (apage);
- AlarmPagePrivate *priv;
- GSList *accel_groups;
- GtkWidget *toplevel;
-
- priv = apage->priv;
-
-#define GW(name) glade_xml_get_widget (priv->xml, name)
-
- priv->main = GW ("alarm-page");
- if (!priv->main)
- return FALSE;
-
- /* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
- toplevel = gtk_widget_get_toplevel (priv->main);
- accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
- if (accel_groups) {
- page->accel_group = accel_groups->data;
- gtk_accel_group_ref (page->accel_group);
- }
-
- gtk_widget_ref (priv->main);
- gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
-
- priv->summary = GW ("summary");
- priv->date_time = GW ("date-time");
-
- priv->list = GW ("list");
- priv->add = GW ("add");
- priv->delete = GW ("delete");
-
- priv->action = GW ("action");
- priv->interval_value = GW ("interval-value");
- priv->value_units = GW ("value-units");
- priv->relative = GW ("relative");
- priv->time = GW ("time");
-
- priv->button_options = GW ("button-options");
-
-#undef GW
-
- return (priv->summary
- && priv->date_time
- && priv->list
- && priv->add
- && priv->delete
- && priv->action
- && priv->interval_value
- && priv->value_units
- && priv->relative
- && priv->time
- && priv->button_options);
-}
-
-/* This is called when any field is changed; it notifies upstream. */
-static void
-field_changed_cb (GtkWidget *widget, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- if (!priv->updating)
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (apage));
-}
-
-/* Callback used for the "add reminder" button */
-static void
-add_clicked_cb (GtkButton *button, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- ECalComponentAlarm *alarm;
- ECalComponentAlarmTrigger trigger;
- ECalComponentAlarmAction action;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- alarm = e_cal_component_alarm_clone (priv->alarm);
-
- memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
- trigger.type = e_dialog_option_menu_get (priv->time, time_map);
- if (e_dialog_option_menu_get (priv->relative, relative_map) == BEFORE)
- trigger.u.rel_duration.is_neg = 1;
- else
- trigger.u.rel_duration.is_neg = 0;
-
- switch (e_dialog_option_menu_get (priv->value_units, value_map)) {
- case MINUTES:
- trigger.u.rel_duration.minutes =
- e_dialog_spin_get_int (priv->interval_value);
- break;
-
- case HOURS:
- trigger.u.rel_duration.hours =
- e_dialog_spin_get_int (priv->interval_value);
- break;
-
- case DAYS:
- trigger.u.rel_duration.days =
- e_dialog_spin_get_int (priv->interval_value);
- break;
-
- default:
- g_assert_not_reached ();
- }
- e_cal_component_alarm_set_trigger (alarm, trigger);
-
- action = e_dialog_option_menu_get (priv->action, action_map);
- e_cal_component_alarm_set_action (alarm, action);
- if (action == E_CAL_COMPONENT_ALARM_EMAIL && !e_cal_component_alarm_has_attendees (alarm)) {
- char *email;
-
- if (!e_cal_get_static_capability (COMP_EDITOR_PAGE (apage)->client, CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS)
- && e_cal_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client, &email, NULL)) {
- ECalComponentAttendee *a;
- GSList attendee_list;
-
- a = g_new0 (ECalComponentAttendee, 1);
- a->value = email;
- attendee_list.data = a;
- attendee_list.next = NULL;
- e_cal_component_alarm_set_attendee_list (alarm, &attendee_list);
- g_free (email);
- g_free (a);
- }
- }
-
- append_reminder (apage, alarm);
-}
-
-/* Callback used for the "delete reminder" button */
-static void
-delete_clicked_cb (GtkButton *button, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GtkTreePath *path;
- gboolean valid_iter;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list));
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter)) {
- g_warning ("Could not get a selection to delete.");
- return;
- }
-
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->list_store), &iter);
- e_alarm_list_remove (priv->list_store, &iter);
-
- /* Select closest item after removal */
- valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->list_store), &iter, path);
- if (!valid_iter) {
- gtk_tree_path_prev (path);
- valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->list_store), &iter, path);
- }
-
- if (valid_iter)
- gtk_tree_selection_select_iter (selection, &iter);
-
- sensitize_buttons (apage);
-
- gtk_tree_path_free (path);
-}
-
-/* Callback used when the alarm options button is clicked */
-static void
-button_options_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmPage *apage;
- AlarmPagePrivate *priv;
- gboolean repeat;
- char *email;
-
- apage = ALARM_PAGE (data);
- priv = apage->priv;
-
- e_cal_component_alarm_set_action (priv->alarm,
- e_dialog_option_menu_get (priv->action, action_map));
-
- repeat = !e_cal_get_static_capability (COMP_EDITOR_PAGE (apage)->client,
- CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT);
-
- if (e_cal_get_static_capability (COMP_EDITOR_PAGE (apage)->client, CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS)
- || e_cal_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client, &email, NULL)) {
- if (!alarm_options_dialog_run (priv->alarm, email, repeat))
- g_message ("button_options_clicked_cb(): Could not create the alarm options dialog");
- }
-}
-
-/* Hooks the widget signals */
-static void
-init_widgets (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
- GtkTreeViewColumn *column;
- GtkCellRenderer *cell_renderer;
-
- priv = apage->priv;
-
- /* Reminder buttons */
- g_signal_connect ((priv->add), "clicked",
- G_CALLBACK (add_clicked_cb), apage);
- g_signal_connect ((priv->delete), "clicked",
- G_CALLBACK (delete_clicked_cb), apage);
-
- /* Connect the default signal handler to use to make sure we notify
- * upstream of changes to the widget values.
- */
- g_signal_connect ((priv->add), "clicked",
- G_CALLBACK (field_changed_cb), apage);
- g_signal_connect ((priv->delete), "clicked",
- G_CALLBACK (field_changed_cb), apage);
-
- /* Options button */
- g_signal_connect ((priv->button_options), "clicked",
- G_CALLBACK (button_options_clicked_cb), apage);
-
- /* Alarm list */
-
- /* Model */
- priv->list_store = e_alarm_list_new ();
- gtk_tree_view_set_model (GTK_TREE_VIEW (priv->list),
- GTK_TREE_MODEL (priv->list_store));
-
- /* View */
- column = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_title (column, _("Action/Trigger"));
- cell_renderer = GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- gtk_tree_view_column_pack_start (column, cell_renderer, TRUE);
- gtk_tree_view_column_add_attribute (column, cell_renderer, "text", E_ALARM_LIST_COLUMN_DESCRIPTION);
- gtk_tree_view_append_column (GTK_TREE_VIEW (priv->list), column);
-
-#if 0
- /* If we want the alarm setup widgets to reflect the currently selected alarm, we
- * need to do something like this */
- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list)), "changed",
- G_CALLBACK (alarm_selection_changed_cb), apage);
-#endif
-}
-
-
-
-static void
-client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
-{
- AlarmPage *apage = ALARM_PAGE (page);
-
- sensitize_buttons (apage);
-}
-
-/**
- * alarm_page_construct:
- * @apage: An alarm page.
- *
- * Constructs an alarm page by loading its Glade data.
- *
- * Return value: The same object as @apage, or NULL if the widgets could not be
- * created.
- **/
-AlarmPage *
-alarm_page_construct (AlarmPage *apage)
-{
- AlarmPagePrivate *priv;
-
- priv = apage->priv;
-
- priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-page.glade",
- NULL, NULL);
- if (!priv->xml) {
- g_message ("alarm_page_construct(): "
- "Could not load the Glade XML file!");
- return NULL;
- }
-
- if (!get_widgets (apage)) {
- g_message ("alarm_page_construct(): "
- "Could not find all widgets in the XML file!");
- return NULL;
- }
-
- init_widgets (apage);
-
- g_signal_connect_after (G_OBJECT (apage), "client_changed",
- G_CALLBACK (client_changed_cb), NULL);
-
- return apage;
-}
-
-/**
- * alarm_page_new:
- *
- * Creates a new alarm page.
- *
- * Return value: A newly-created alarm page, or NULL if the page could not be
- * created.
- **/
-AlarmPage *
-alarm_page_new (void)
-{
- AlarmPage *apage;
-
- apage = g_object_new (TYPE_ALARM_PAGE, NULL);
- if (!alarm_page_construct (apage)) {
- g_object_unref (apage);
- return NULL;
- }
-
- return apage;
-}
diff --git a/calendar/gui/dialogs/alarm-page.glade b/calendar/gui/dialogs/alarm-page.glade
deleted file mode 100644
index c1a89727c7..0000000000
--- a/calendar/gui/dialogs/alarm-page.glade
+++ /dev/null
@@ -1,545 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkWindow" id="alarm-toplevel">
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="alarm-page">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkFrame" id="frame33">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="table13">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label62">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Summary:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label63">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Date/Time:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="summary">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="date-time">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Basics</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame34">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkVBox" id="vbox53">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox54">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkOptionMenu" id="action">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Pop up an alert</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Play a sound</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Run a program</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="send_an_email1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Send an email</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="interval-value">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="value-units">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget5">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minute(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">hour(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">day(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="relative">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget9">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">before</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">after</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="time">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget12">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">start of appointment</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget14">
- <property name="visible">True</property>
- <property name="label" translatable="yes">end of appointment</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-options">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Options...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox55">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow13">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="add">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox56">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label65">
- <property name="visible">True</property>
- <property name="label" translatable="yes">A_dd</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="delete">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label64">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reminders</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 9dcbf1d80a..16d89055c2 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -34,8 +34,6 @@
#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomeui/gnome-messagebox.h>
-#include <bonobo/bonobo-ui-container.h>
-#include <bonobo/bonobo-ui-util.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-icon-factory.h>
#include <evolution-shell-component-utils.h>
@@ -68,14 +66,9 @@ struct _CompEditorPrivate {
/* The pages we have */
GList *pages;
- /* UI Component for the dialog */
- BonoboUIComponent *uic;
-
/* Notebook to hold the pages */
GtkNotebook *notebook;
-
- GtkWidget *filesel;
-
+
gboolean changed;
gboolean needs_send;
@@ -119,42 +112,12 @@ static void close_cmd (GtkWidget *widget, gpointer data);
static gint delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data);
-static EPixmap pixmaps [] =
-{
- E_PIXMAP ("/menu/File/FileSave", "stock_save", E_ICON_SIZE_MENU),
- E_PIXMAP ("/menu/File/FileSaveAndClose", "stock_save", E_ICON_SIZE_MENU),
- E_PIXMAP ("/menu/File/FileSaveAs", "stock_save-as", E_ICON_SIZE_MENU),
-
- E_PIXMAP ("/menu/File/FileDelete", "stock_delete", E_ICON_SIZE_MENU),
-
- E_PIXMAP ("/menu/File/FilePrint", "stock_print", E_ICON_SIZE_MENU),
- E_PIXMAP ("/menu/File/FilePrintPreview", "stock_print-preview", E_ICON_SIZE_MENU),
-
- E_PIXMAP ("/Toolbar/FileSaveAndClose", "stock_save", E_ICON_SIZE_LARGE_TOOLBAR),
- E_PIXMAP ("/Toolbar/FilePrint", "stock_print", E_ICON_SIZE_LARGE_TOOLBAR),
- E_PIXMAP ("/Toolbar/FileDelete", "stock_delete", E_ICON_SIZE_LARGE_TOOLBAR),
-
- E_PIXMAP_END
-};
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("FileSaveAndClose", save_close_cmd),
- BONOBO_UI_UNSAFE_VERB ("FileSaveAs", save_as_cmd),
- BONOBO_UI_UNSAFE_VERB ("FileDelete", delete_cmd),
- BONOBO_UI_UNSAFE_VERB ("FilePrint", print_cmd),
- BONOBO_UI_UNSAFE_VERB ("FilePrintPreview", print_preview_cmd),
- BONOBO_UI_UNSAFE_VERB ("FilePrintSetup", print_setup_cmd),
- BONOBO_UI_UNSAFE_VERB ("FileClose", close_cmd),
-
- BONOBO_UI_VERB_END
-};
-
static GtkObjectClass *parent_class;
E_MAKE_TYPE (comp_editor, "CompEditor", CompEditor, comp_editor_class_init, comp_editor_init,
- BONOBO_TYPE_WINDOW);
+ GTK_TYPE_DIALOG);
/* Class initialization function for the calendar component editor */
static void
@@ -163,11 +126,10 @@ comp_editor_class_init (CompEditorClass *klass)
GObjectClass *object_class;
GtkWidgetClass *widget_class;
+ parent_class = g_type_class_peek_parent (klass);
object_class = G_OBJECT_CLASS (klass);
widget_class = GTK_WIDGET_CLASS (klass);
- parent_class = g_type_class_ref(BONOBO_TYPE_WINDOW);
-
klass->set_e_cal = real_set_e_cal;
klass->edit_comp = real_edit_comp;
klass->send_comp = real_send_comp;
@@ -176,135 +138,6 @@ comp_editor_class_init (CompEditorClass *klass)
object_class->finalize = comp_editor_finalize;
}
-/* Creates the basic in the editor */
-static void
-setup_widgets (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- BonoboUIContainer *container;
- GtkWidget *vbox;
-
- priv = editor->priv;
-
- /* Window and basic vbox */
- container = bonobo_ui_container_new ();
- editor = (CompEditor *) bonobo_window_construct (BONOBO_WINDOW (editor), container,
- "event-editor", "iCalendar Editor");
- g_signal_connect((editor), "delete_event",
- G_CALLBACK (delete_event_cb), editor);
-
- priv->uic = bonobo_ui_component_new_default ();
- bonobo_ui_component_set_container (priv->uic,
- bonobo_object_corba_objref (BONOBO_OBJECT (container)),
- NULL);
- bonobo_ui_engine_config_set_path (bonobo_window_get_ui_engine (BONOBO_WINDOW (editor)),
- "/evolution/UIConf/kvps");
-
- bonobo_ui_component_add_verb_list_with_data (priv->uic, verbs, editor);
- bonobo_ui_util_set_ui (priv->uic, PREFIX,
- EVOLUTION_UIDIR "/evolution-comp-editor.xml",
- "evolution-calendar", NULL);
- e_pixmaps_update (priv->uic, pixmaps);
-
- vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_widget_show (vbox);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD_SMALL);
- bonobo_window_set_contents (BONOBO_WINDOW (editor), vbox);
-
- /* Notebook */
- priv->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
- gtk_widget_show (GTK_WIDGET (priv->notebook));
- gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (priv->notebook),
- TRUE, TRUE, 6);
-}
-
-/* Object initialization function for the calendar component editor */
-static void
-comp_editor_init (CompEditor *editor)
-{
- CompEditorPrivate *priv;
-
- priv = g_new0 (CompEditorPrivate, 1);
- editor->priv = priv;
-
- setup_widgets (editor);
-
- priv->pages = NULL;
- priv->changed = FALSE;
- priv->needs_send = FALSE;
- priv->mod = CALOBJ_MOD_ALL;
- priv->existing_org = FALSE;
- priv->user_org = FALSE;
- priv->warned = FALSE;
-}
-
-
-static gint
-comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e)
-{
- if (e->keyval == GDK_Escape) {
- if (prompt_to_save_changes (COMP_EDITOR (d), TRUE))
- close_dialog (COMP_EDITOR (d));
- return TRUE;
- }
-
- if (GTK_WIDGET_CLASS (parent_class)->key_press_event)
- return (* GTK_WIDGET_CLASS (parent_class)->key_press_event) (d, e);
-
- return FALSE;
-}
-
-/* Destroy handler for the calendar component editor */
-static void
-comp_editor_finalize (GObject *object)
-{
- CompEditor *editor;
- CompEditorPrivate *priv;
- GList *l;
-
- editor = COMP_EDITOR (object);
- priv = editor->priv;
-
- if (priv->client) {
- g_object_unref (priv->client);
- priv->client = NULL;
- }
-
- if (priv->source_client) {
- g_object_unref (priv->source_client);
- priv->source_client = NULL;
- }
-
- if (priv->view) {
- g_signal_handlers_disconnect_matched (G_OBJECT (priv->view),
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- editor);
-
- g_object_unref (priv->view);
- priv->view = NULL;
- }
-
- /* We want to destroy the pages after the widgets get destroyed,
- since they have lots of signal handlers connected to the widgets
- with the pages as the data. */
- for (l = priv->pages; l != NULL; l = l->next)
- g_object_unref (l->data);
-
- if (priv->comp) {
- g_object_unref (priv->comp);
- priv->comp = NULL;
- }
-
- bonobo_object_unref (priv->uic);
-
- g_free (priv);
- editor->priv = NULL;
-
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
static void
listen_for_changes (CompEditor *editor)
{
@@ -332,7 +165,6 @@ listen_for_changes (CompEditor *editor)
char *query;
query = g_strdup_printf ("(uid? \"%s\")", uid);
- g_message ("%s", query);
e_cal_get_query (priv->source_client, query, &priv->view, NULL);
g_free (query);
}
@@ -348,6 +180,19 @@ listen_for_changes (CompEditor *editor)
}
}
+/* This sets the focus to the toplevel, so any field being edited is committed.
+ FIXME: In future we may also want to check some of the fields are valid,
+ e.g. the EDateEdit fields. */
+static void
+commit_all_fields (CompEditor *editor)
+{
+ CompEditorPrivate *priv;
+
+ priv = editor->priv;
+
+ gtk_window_set_focus (GTK_WINDOW (editor), NULL);
+}
+
static void
send_timezone (gpointer key, gpointer value, gpointer user_data)
{
@@ -481,19 +326,6 @@ save_comp_with_send (CompEditor *editor)
return TRUE;
}
-static void
-delete_comp (CompEditor *editor)
-{
- CompEditorPrivate *priv;
- const char *uid;
-
- priv = editor->priv;
-
- e_cal_component_get_uid (priv->comp, &uid);
- e_cal_remove_object (priv->client, uid, NULL);
- close_dialog (editor);
-}
-
static gboolean
prompt_to_save_changes (CompEditor *editor, gboolean send)
{
@@ -528,17 +360,164 @@ prompt_to_save_changes (CompEditor *editor, gboolean send)
}
}
-/* This sets the focus to the toplevel, so any field being edited is committed.
- FIXME: In future we may also want to check some of the fields are valid,
- e.g. the EDateEdit fields. */
static void
-commit_all_fields (CompEditor *editor)
+response_cb (GtkWidget *widget, int response, gpointer data)
{
+ CompEditor *editor = COMP_EDITOR (data);
CompEditorPrivate *priv;
+
+ priv = editor->priv;
+
+ switch (response) {
+ case GTK_RESPONSE_OK:
+ commit_all_fields (editor);
+
+ if (e_cal_component_is_instance (priv->comp))
+ if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
+ return;
+
+ if (save_comp_with_send (editor))
+ close_dialog (editor);
+ break;
+ case GTK_RESPONSE_CANCEL:
+ case GTK_RESPONSE_DELETE_EVENT:
+ commit_all_fields (editor);
+
+ if (prompt_to_save_changes (editor, TRUE))
+ close_dialog (editor);
+ break;
+ }
+}
+
+/* Creates the basic in the editor */
+static void
+setup_widgets (CompEditor *editor)
+{
+ CompEditorPrivate *priv;
+ GtkWidget *vbox;
priv = editor->priv;
- gtk_window_set_focus (GTK_WINDOW (editor), NULL);
+ /* Basic vbox */
+ vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
+ gtk_widget_show (vbox);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD_SMALL);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editor)->vbox), vbox,
+ TRUE, TRUE, 6);
+
+ /* Notebook */
+ priv->notebook = GTK_NOTEBOOK (gtk_notebook_new ());
+ gtk_widget_show (GTK_WIDGET (priv->notebook));
+ gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (priv->notebook),
+ TRUE, TRUE, 6);
+
+ /* Buttons */
+ gtk_dialog_add_button (GTK_DIALOG (editor), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ gtk_dialog_add_button (GTK_DIALOG (editor), GTK_STOCK_OK, GTK_RESPONSE_OK);
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), GTK_RESPONSE_OK, FALSE);
+
+ g_signal_connect (editor, "response", G_CALLBACK (response_cb), editor);
+}
+
+/* Object initialization function for the calendar component editor */
+static void
+comp_editor_init (CompEditor *editor)
+{
+ CompEditorPrivate *priv;
+
+ priv = g_new0 (CompEditorPrivate, 1);
+ editor->priv = priv;
+
+ setup_widgets (editor);
+
+ priv->pages = NULL;
+ priv->changed = FALSE;
+ priv->needs_send = FALSE;
+ priv->mod = CALOBJ_MOD_ALL;
+ priv->existing_org = FALSE;
+ priv->user_org = FALSE;
+ priv->warned = FALSE;
+}
+
+
+static gint
+comp_editor_key_press_event (GtkWidget *d, GdkEventKey *e)
+{
+#if 0
+ if (e->keyval == GDK_Escape) {
+ if (prompt_to_save_changes (COMP_EDITOR (d), TRUE))
+ close_dialog (COMP_EDITOR (d));
+ return TRUE;
+ }
+#endif
+
+ if (GTK_WIDGET_CLASS (parent_class)->key_press_event)
+ return (* GTK_WIDGET_CLASS (parent_class)->key_press_event) (d, e);
+
+ return FALSE;
+}
+
+/* Destroy handler for the calendar component editor */
+static void
+comp_editor_finalize (GObject *object)
+{
+ CompEditor *editor;
+ CompEditorPrivate *priv;
+ GList *l;
+
+ editor = COMP_EDITOR (object);
+ priv = editor->priv;
+
+ if (priv->client) {
+ g_object_unref (priv->client);
+ priv->client = NULL;
+ }
+
+ if (priv->source_client) {
+ g_object_unref (priv->source_client);
+ priv->source_client = NULL;
+ }
+
+ if (priv->view) {
+ g_signal_handlers_disconnect_matched (G_OBJECT (priv->view),
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL,
+ editor);
+
+ g_object_unref (priv->view);
+ priv->view = NULL;
+ }
+
+ /* We want to destroy the pages after the widgets get destroyed,
+ since they have lots of signal handlers connected to the widgets
+ with the pages as the data. */
+ for (l = priv->pages; l != NULL; l = l->next)
+ g_object_unref (l->data);
+
+ if (priv->comp) {
+ g_object_unref (priv->comp);
+ priv->comp = NULL;
+ }
+
+ g_free (priv);
+ editor->priv = NULL;
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+
+static void
+delete_comp (CompEditor *editor)
+{
+ CompEditorPrivate *priv;
+ const char *uid;
+
+ priv = editor->priv;
+
+ e_cal_component_get_uid (priv->comp, &uid);
+ e_cal_remove_object (priv->client, uid, NULL);
+ close_dialog (editor);
}
/* Closes the dialog box and emits the appropriate signals */
@@ -629,6 +608,9 @@ comp_editor_set_changed (CompEditor *editor, gboolean changed)
priv = editor->priv;
priv->changed = changed;
+
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), GTK_RESPONSE_OK, changed);
+ gtk_dialog_set_default_response (GTK_DIALOG (editor), GTK_RESPONSE_OK);
}
/**
@@ -1254,65 +1236,6 @@ comp_editor_close (CompEditor *editor)
return close;
}
-/**
- * comp_editor_merge_ui:
- * @editor:
- * @filename:
- * @verbs:
- *
- *
- **/
-void
-comp_editor_merge_ui (CompEditor *editor,
- const char *filename,
- BonoboUIVerb *verbs,
- EPixmap *component_pixmaps)
-{
- CompEditorPrivate *priv;
- char *path;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- path = g_strconcat (EVOLUTION_UIDIR "/", filename, NULL);
-
- bonobo_ui_util_set_ui (priv->uic, EVOLUTION_DATADIR, path, "evolution-calendar", NULL);
- bonobo_ui_component_add_verb_list_with_data (priv->uic, verbs, editor);
-
- g_free (path);
-
- if (component_pixmaps != NULL)
- e_pixmaps_update (priv->uic, component_pixmaps);
-}
-
-/**
- * comp_editor_set_ui_prop:
- * @editor:
- * @path:
- * @attr:
- * @val:
- *
- *
- **/
-void
-comp_editor_set_ui_prop (CompEditor *editor,
- const char *path,
- const char *attr,
- const char *val)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (editor != NULL);
- g_return_if_fail (IS_COMP_EDITOR (editor));
-
- priv = editor->priv;
-
- bonobo_ui_component_set_prop (priv->uic, path, attr, val, NULL);
-}
-
-
/* Brings attention to a window by raising it and giving it focus */
static void
raise_and_focus (GtkWidget *widget)
@@ -1367,129 +1290,6 @@ comp_editor_notify_client_changed (CompEditor *editor, ECal *client)
comp_editor_page_notify_client_changed (COMP_EDITOR_PAGE (l->data), client);
}
-/* Menu Commands */
-static void
-save_close_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- commit_all_fields (editor);
-
- if (e_cal_component_is_instance (priv->comp))
- if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor)))
- return;
-
- if (save_comp_with_send (editor))
- close_dialog (editor);
-}
-
-static void
-save_as_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- char *filename;
- char *ical_string;
- FILE *file;
-
- priv = editor->priv;
-
- commit_all_fields (editor);
-
- filename = e_file_dialog_save (_("Save as..."));
- if (filename == NULL)
- return;
-
- ical_string = e_cal_get_component_as_string (priv->client,
- e_cal_component_get_icalcomponent (priv->comp));
- if (ical_string == NULL) {
- g_warning ("Couldn't convert item to a string");
- return;
- }
-
- file = fopen (filename, "w");
- if (file == NULL) {
- g_warning ("Couldn't save item");
- return;
- }
-
- fprintf (file, ical_string);
- g_free (ical_string);
- fclose (file);
-}
-
-static void
-delete_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
- ECalComponentVType vtype;
-
- priv = editor->priv;
-
- vtype = e_cal_component_get_vtype (priv->comp);
-
- if (delete_component_dialog (priv->comp, FALSE, 1, vtype, GTK_WIDGET (editor))) {
- if (itip_organizer_is_user (priv->comp, priv->client)
- && cancel_component_dialog ((GtkWindow *) editor,
- priv->client, priv->comp, TRUE))
- itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, priv->comp, priv->client, NULL);
-
- delete_comp (editor);
- }
-}
-
-static void
-print_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- ECalComponent *comp;
-
- commit_all_fields (editor);
-
- comp = comp_editor_get_current_comp (editor);
- print_comp (comp, editor->priv->client, FALSE);
- g_object_unref (comp);
-}
-
-static void
-print_preview_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- ECalComponent *comp;
-
- commit_all_fields (editor);
-
- comp = comp_editor_get_current_comp (editor);
- print_comp (comp, editor->priv->client, TRUE);
- g_object_unref (comp);
-}
-
-static void
-print_setup_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- CompEditorPrivate *priv;
-
- priv = editor->priv;
-
- print_setup ();
-}
-
-static void
-close_cmd (GtkWidget *widget, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
-
- commit_all_fields (editor);
-
- if (prompt_to_save_changes (editor, TRUE))
- close_dialog (editor);
-}
-
static void
page_changed_cb (GtkObject *obj, gpointer data)
{
@@ -1607,14 +1407,3 @@ obj_removed_cb (ECal *client, GList *uids, gpointer data)
if (changed_component_dialog ((GtkWindow *) editor, priv->comp, TRUE, priv->changed))
close_dialog (editor);
}
-
-static gint
-delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- CompEditor *editor = COMP_EDITOR (data);
-
- if (prompt_to_save_changes (editor, TRUE))
- close_dialog (editor);
-
- return TRUE;
-}
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index b0b9521868..14846ec615 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -22,9 +22,6 @@
#define COMP_EDITOR_H
#include <gtk/gtk.h>
-#include <bonobo/bonobo-window.h>
-#include <bonobo/bonobo-ui-engine.h>
-#include <bonobo/bonobo-ui-component.h>
#include <libecal/e-cal.h>
#include "../itip-utils.h"
#include "comp-editor-page.h"
@@ -43,14 +40,14 @@ G_BEGIN_DECLS
typedef struct _CompEditorPrivate CompEditorPrivate;
typedef struct {
- BonoboWindow object;
+ GtkDialog object;
/* Private data */
CompEditorPrivate *priv;
} CompEditor;
typedef struct {
- BonoboWindowClass parent_class;
+ GtkDialogClass parent_class;
/* Virtual functions */
void (* set_e_cal) (CompEditor *page, ECal *client);
@@ -91,14 +88,6 @@ void comp_editor_delete_comp (CompEditor *editor);
gboolean comp_editor_send_comp (CompEditor *editor,
ECalComponentItipMethod method);
gboolean comp_editor_close (CompEditor *editor);
-void comp_editor_merge_ui (CompEditor *editor,
- const char *filename,
- BonoboUIVerb *verbs,
- EPixmap *pixmaps);
-void comp_editor_set_ui_prop (CompEditor *editor,
- const char *path,
- const char *attr,
- const char *val);
void comp_editor_focus (CompEditor *editor);
void comp_editor_notify_client_changed (CompEditor *editor, ECal *client);
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index a035f6b87e..52065ea0b2 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -32,7 +32,6 @@
#include <e-util/e-icon-factory.h>
#include "event-page.h"
-#include "alarm-page.h"
#include "recurrence-page.h"
#include "meeting-page.h"
#include "schedule-page.h"
@@ -41,7 +40,6 @@
struct _EventEditorPrivate {
EventPage *event_page;
- AlarmPage *alarm_page;
RecurrencePage *recur_page;
MeetingPage *meet_page;
SchedulePage *sched_page;
@@ -69,19 +67,6 @@ static void forward_cmd (GtkWidget *widget, gpointer data);
static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data);
-static EPixmap pixmaps [] = {
- E_PIXMAP ("/Toolbar/Actions/ActionScheduleMeeting", "stock_people", E_ICON_SIZE_LARGE_TOOLBAR),
- E_PIXMAP_END
-};
-
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ActionScheduleMeeting", schedule_meeting_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionRefreshMeeting", refresh_meeting_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionCancelMeeting", cancel_meeting_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionForward", forward_cmd),
-
- BONOBO_UI_VERB_END
-};
static CompEditorClass *parent_class;
@@ -119,45 +104,6 @@ event_editor_class_init (EventEditorClass *klass)
}
static void
-set_menu_sens (EventEditor *ee)
-{
- EventEditorPrivate *priv;
- gboolean sens, existing, user, read_only = TRUE;
-
- priv = ee->priv;
-
- existing = comp_editor_get_existing_org (COMP_EDITOR (ee));
- user = comp_editor_get_user_org (COMP_EDITOR (ee));
-
- e_cal_is_read_only (comp_editor_get_e_cal (COMP_EDITOR (ee)), &read_only, NULL);
-
- sens = priv->meeting_shown;
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionScheduleMeeting",
- "sensitive", sens || read_only ? "0" : "1");
-
- sens = priv->meeting_shown && existing && !user && !read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionRefreshMeeting",
- "sensitive", sens ? "1" : "0");
-
- sens = priv->meeting_shown && existing && user && !read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/ActionCancelMeeting",
- "sensitive", sens ? "1" : "0");
-
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/FileSave",
- "sensitive", read_only ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/FileSaveAndClose",
- "sensitive", read_only ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (ee),
- "/commands/FileDelete",
- "sensitive", read_only ? "0" : "1");
-}
-
-static void
init_widgets (EventEditor *ee)
{
EventEditorPrivate *priv;
@@ -175,7 +121,7 @@ init_widgets (EventEditor *ee)
static void
client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
{
- set_menu_sens (EVENT_EDITOR (user_data));
+ //set_menu_sens (EVENT_EDITOR (user_data));
}
/* Object initialization function for the event editor */
@@ -208,13 +154,6 @@ event_editor_construct (EventEditor *ee, ECal *client)
g_signal_connect (G_OBJECT (priv->event_page), "client_changed",
G_CALLBACK (client_changed_cb), ee);
- priv->alarm_page = alarm_page_new ();
- g_object_ref (priv->alarm_page);
- gtk_object_sink (GTK_OBJECT (priv->alarm_page));
- comp_editor_append_page (COMP_EDITOR (ee),
- COMP_EDITOR_PAGE (priv->alarm_page),
- _("Reminder"));
-
priv->recur_page = recurrence_page_new ();
g_object_ref (priv->recur_page);
gtk_object_sink (GTK_OBJECT (priv->recur_page));
@@ -238,10 +177,7 @@ event_editor_construct (EventEditor *ee, ECal *client)
comp_editor_set_e_cal (COMP_EDITOR (ee), client);
- comp_editor_merge_ui (COMP_EDITOR (ee), "evolution-event-editor.xml", verbs, pixmaps);
-
init_widgets (ee);
- set_menu_sens (ee);
gtk_window_set_default_size (GTK_WINDOW (ee), 300, 225);
return ee;
@@ -349,7 +285,6 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
}
e_cal_component_free_attendee_list (attendees);
- set_menu_sens (ee);
comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown && itip_organizer_is_user (comp, client));
priv->updating = FALSE;
@@ -403,7 +338,6 @@ event_editor_finalize (GObject *object)
priv = ee->priv;
g_object_unref (priv->event_page);
- g_object_unref (priv->alarm_page);
g_object_unref (priv->recur_page);
g_object_unref (priv->meet_page);
g_object_unref (priv->sched_page);
@@ -450,7 +384,6 @@ show_meeting (EventEditor *ee)
_("Meeting"));
priv->meeting_shown = TRUE;
- set_menu_sens (ee);
comp_editor_set_changed (COMP_EDITOR (ee), priv->meeting_shown);
comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown);
}
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index d832cf4873..9c9d88f25b 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -43,6 +43,8 @@
#include "../e-timezone-entry.h"
#include "comp-editor.h"
#include "comp-editor-util.h"
+#include "../e-alarm-list.h"
+#include "alarm-list-dialog.h"
#include "event-page.h"
@@ -57,7 +59,9 @@ struct _EventPagePrivate {
GtkWidget *main;
GtkWidget *summary;
+ GtkWidget *summary_label;
GtkWidget *location;
+ GtkWidget *location_label;
GtkWidget *start_time;
GtkWidget *end_time;
@@ -67,19 +71,22 @@ struct _EventPagePrivate {
GtkWidget *description;
- GtkWidget *classification_public;
- GtkWidget *classification_private;
- GtkWidget *classification_confidential;
+ GtkWidget *classification;
- GtkWidget *show_time_frame;
- GtkWidget *show_time_as_free;
GtkWidget *show_time_as_busy;
+ GtkWidget *alarm;
+ GtkWidget *alarm_time;
+ GtkWidget *alarm_warning;
+ GtkWidget *alarm_custom;
+
GtkWidget *categories_btn;
GtkWidget *categories;
GtkWidget *source_selector;
+ EAlarmList *alarm_list_store;
+
gboolean updating;
/* This is TRUE if both the start & end timezone are the same. If the
@@ -154,19 +161,20 @@ event_page_init (EventPage *epage)
priv->main = NULL;
priv->summary = NULL;
+ priv->summary_label = NULL;
priv->location = NULL;
+ priv->location_label = NULL;
priv->start_time = NULL;
priv->end_time = NULL;
priv->start_timezone = NULL;
priv->end_timezone = NULL;
priv->all_day_event = NULL;
priv->description = NULL;
- priv->classification_public = NULL;
- priv->classification_private = NULL;
- priv->classification_confidential = NULL;
- priv->show_time_frame = NULL;
- priv->show_time_as_free = NULL;
+ priv->classification = NULL;
priv->show_time_as_busy = NULL;
+ priv->alarm = NULL;
+ priv->alarm_time = NULL;
+ priv->alarm_custom = NULL;
priv->categories_btn = NULL;
priv->categories = NULL;
@@ -195,6 +203,11 @@ event_page_finalize (GObject *object)
priv->xml = NULL;
}
+ if (priv->alarm_list_store) {
+ g_object_unref (priv->alarm_list_store);
+ priv->alarm_list_store = NULL;
+ }
+
g_free (priv);
epage->priv = NULL;
@@ -211,9 +224,18 @@ static const int classification_map[] = {
-1
};
-static const int transparency_map[] = {
- E_CAL_COMPONENT_TRANSP_TRANSPARENT,
- E_CAL_COMPONENT_TRANSP_OPAQUE,
+enum {
+ ALARM_15_MINUTES,
+ ALARM_1_HOUR,
+ ALARM_1_DAY,
+ ALARM_USER_TIME
+};
+
+static const int alarm_map[] = {
+ ALARM_15_MINUTES,
+ ALARM_1_HOUR,
+ ALARM_1_DAY,
+ ALARM_USER_TIME,
-1
};
@@ -398,43 +420,165 @@ clear_widgets (EventPage *epage)
set_all_day (epage, FALSE);
/* Classification */
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
+ e_dialog_option_menu_set (priv->classification, E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
/* Show Time As (Transparency) */
- e_dialog_radio_set (priv->show_time_as_free,
- E_CAL_COMPONENT_TRANSP_OPAQUE, transparency_map);
+ e_dialog_toggle_set (priv->show_time_as_busy, TRUE);
+ /* Alarm */
+ e_dialog_toggle_set (priv->alarm, FALSE);
+
/* Categories */
e_dialog_editable_set (priv->categories, NULL);
}
+static gboolean
+is_custom_alarm (ECalComponentAlarm *ca, int *alarm_type)
+{
+ ECalComponentAlarmTrigger trigger;
+ ECalComponentAlarmRepeat repeat;
+ ECalComponentAlarmAction action;
+ icalattach *attach;
+
+ e_cal_component_alarm_get_action (ca, &action);
+ if (action != E_CAL_COMPONENT_ALARM_DISPLAY)
+ return TRUE;
+
+ e_cal_component_alarm_get_attach (ca, &attach);
+ if (attach)
+ return TRUE;
+
+#if 0
+ e_cal_component_alarm_get_description (ca, &desc);
+ if (attach)
+ return TRUE;
+#endif
+
+ e_cal_component_alarm_get_repeat (ca, &repeat);
+ if (repeat.repetitions != 0)
+ return TRUE;
+
+ if (e_cal_component_alarm_has_attendees (ca))
+ return TRUE;
+
+ e_cal_component_alarm_get_trigger (ca, &trigger);
+ if (trigger.type != E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START)
+ return TRUE;
+
+ if (trigger.u.rel_duration.is_neg != 1)
+ return TRUE;
+
+ if (trigger.u.rel_duration.weeks != 0)
+ return TRUE;
+
+ if (trigger.u.rel_duration.seconds != 0)
+ return TRUE;
+
+ if (trigger.u.rel_duration.days == 1
+ && trigger.u.rel_duration.hours == 0
+ && trigger.u.rel_duration.minutes == 0) {
+ if (alarm_type)
+ *alarm_type = ALARM_1_DAY;
+ return FALSE;
+ }
+
+ if (trigger.u.rel_duration.days == 0
+ && trigger.u.rel_duration.hours == 1
+ && trigger.u.rel_duration.minutes == 0) {
+ if (alarm_type)
+ *alarm_type = ALARM_1_HOUR;
+ return FALSE;
+ }
+
+ if (trigger.u.rel_duration.days == 0
+ && trigger.u.rel_duration.hours == 0
+ && trigger.u.rel_duration.minutes == 15) {
+ if (alarm_type)
+ *alarm_type = ALARM_15_MINUTES;
+ return FALSE;
+ }
+
+ /* FIXME User defined time */
+
+ return TRUE;
+}
+
+static gboolean
+is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, int *alarm_type)
+{
+ ECalComponentAlarm *ca;
+ gboolean result;
+
+ if (g_list_length (alarms) > 1)
+ return TRUE;
+
+ ca = e_cal_component_get_alarm (comp, alarms->data);
+ result = is_custom_alarm (ca, alarm_type);
+ e_cal_component_alarm_free (ca);
+
+ return result;
+}
+
+static gboolean
+is_custom_alarm_store (EAlarmList *alarm_list_store, int *alarm_type)
+{
+ const ECalComponentAlarm *alarm;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ gboolean valid_iter;
+
+ model = GTK_TREE_MODEL (alarm_list_store);
+
+ valid_iter = gtk_tree_model_get_iter_first (model, &iter);
+ if (!valid_iter)
+ return FALSE;
+
+ alarm = e_alarm_list_get_alarm (alarm_list_store, &iter);
+ if (is_custom_alarm (( ECalComponentAlarm *)alarm, alarm_type))
+ return TRUE;
+
+ valid_iter = gtk_tree_model_iter_next (model, &iter);
+ if (valid_iter)
+ return TRUE;
+
+ return FALSE;
+}
+
static void
sensitize_widgets (EventPage *epage)
{
- gboolean read_only;
+ gboolean read_only, custom, alarm;
EventPagePrivate *priv;
-
+
priv = epage->priv;
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (epage)->client, &read_only, NULL))
read_only = TRUE;
- gtk_widget_set_sensitive (priv->summary, !read_only);
- gtk_widget_set_sensitive (priv->location, !read_only);
+ custom = is_custom_alarm_store (priv->alarm_list_store, NULL);
+ alarm = e_dialog_toggle_get (priv->alarm);
+
+ gtk_widget_set_sensitive (priv->summary_label, !read_only);
+ gtk_entry_set_editable (GTK_ENTRY (priv->summary), !read_only);
+ gtk_widget_set_sensitive (priv->location_label, !read_only);
+ gtk_entry_set_editable (GTK_ENTRY (priv->location), !read_only);
gtk_widget_set_sensitive (priv->start_time, !read_only);
gtk_widget_set_sensitive (priv->start_timezone, !read_only);
gtk_widget_set_sensitive (priv->end_time, !read_only);
gtk_widget_set_sensitive (priv->end_timezone, !read_only);
gtk_widget_set_sensitive (priv->all_day_event, !read_only);
gtk_widget_set_sensitive (priv->description, !read_only);
- gtk_widget_set_sensitive (priv->classification_public, !read_only);
- gtk_widget_set_sensitive (priv->classification_private, !read_only);
- gtk_widget_set_sensitive (priv->classification_confidential, !read_only);
- gtk_widget_set_sensitive (priv->show_time_as_free, !read_only);
+ gtk_widget_set_sensitive (priv->classification, !read_only);
gtk_widget_set_sensitive (priv->show_time_as_busy, !read_only);
+ gtk_widget_set_sensitive (priv->alarm, !read_only);
+ gtk_widget_set_sensitive (priv->alarm_time, !read_only && !custom && alarm);
+ gtk_widget_set_sensitive (priv->alarm_custom, !read_only && alarm);
+ if (custom)
+ gtk_widget_show (priv->alarm_warning);
+ else
+ gtk_widget_hide (priv->alarm_warning);
gtk_widget_set_sensitive (priv->categories_btn, !read_only);
- gtk_widget_set_sensitive (priv->categories, !read_only);
+ gtk_entry_set_editable (GTK_ENTRY (priv->categories), !read_only);
}
/* fill_widgets handler for the event page */
@@ -499,57 +643,61 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
e_cal_component_free_datetime (&end_date);
/* Classification */
-
e_cal_component_get_classification (comp, &cl);
switch (cl) {
case E_CAL_COMPONENT_CLASS_PUBLIC:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- break;
-
case E_CAL_COMPONENT_CLASS_PRIVATE:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PRIVATE,
- classification_map);
- break;
-
case E_CAL_COMPONENT_CLASS_CONFIDENTIAL:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
- classification_map);
break;
-
default:
- /* default to PUBLIC */
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
+ cl = E_CAL_COMPONENT_CLASS_PUBLIC;
break;
}
-
+ e_dialog_option_menu_set (priv->classification, cl, classification_map);
/* Show Time As (Transparency) */
e_cal_component_get_transparency (comp, &transparency);
switch (transparency) {
case E_CAL_COMPONENT_TRANSP_TRANSPARENT:
- e_dialog_radio_set (priv->show_time_as_free,
- E_CAL_COMPONENT_TRANSP_TRANSPARENT,
- transparency_map);
+ e_dialog_toggle_set (priv->show_time_as_busy, FALSE);
break;
default:
- e_dialog_radio_set (priv->show_time_as_free,
- E_CAL_COMPONENT_TRANSP_OPAQUE,
- transparency_map);
+ e_dialog_toggle_set (priv->show_time_as_busy, TRUE);
break;
}
if (e_cal_get_static_capability (page->client, CAL_STATIC_CAPABILITY_NO_TRANSPARENCY))
- gtk_widget_hide (priv->show_time_frame);
+ gtk_widget_hide (priv->show_time_as_busy);
else
- gtk_widget_show (priv->show_time_frame);
+ gtk_widget_show (priv->show_time_as_busy);
+ /* Alarms */
+ g_signal_handlers_block_matched (priv->alarm, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
+ if (e_cal_component_has_alarms (comp)) {
+ GList *alarms, *l;
+ int alarm_type;
+
+ e_dialog_toggle_set (priv->alarm, TRUE);
+
+ alarms = e_cal_component_get_alarm_uids (comp);
+ if (!is_custom_alarm_uid_list (comp, alarms, &alarm_type))
+ e_dialog_option_menu_set (priv->alarm_time, alarm_type, alarm_map);
+
+ for (l = alarms; l != NULL; l = l->next) {
+ ECalComponentAlarm *ca;
+
+ ca = e_cal_component_get_alarm (comp, l->data);
+ e_alarm_list_append (priv->alarm_list_store, NULL, ca);
+ e_cal_component_alarm_free (ca);
+ }
+
+ cal_obj_uid_list_free (alarms);
+ } else {
+ e_dialog_toggle_set (priv->alarm, FALSE);
+ }
+ g_signal_handlers_unblock_matched (priv->alarm, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
+
/* Categories */
e_cal_component_get_categories (comp, &categories);
e_dialog_editable_set (priv->categories, categories);
@@ -573,10 +721,9 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
EventPagePrivate *priv;
ECalComponentDateTime start_date, end_date;
struct icaltimetype start_tt, end_tt;
- gboolean all_day_event, start_date_set, end_date_set;
+ gboolean all_day_event, start_date_set, end_date_set, busy;
char *cat, *str;
ECalComponentClassification classif;
- ECalComponentTransparency transparency;
GtkTextBuffer *text_buffer;
GtkTextIter text_iter_start, text_iter_end;
@@ -715,17 +862,54 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
g_free (str);
/* Classification */
-
- classif = e_dialog_radio_get (priv->classification_public,
- classification_map);
+ classif = e_dialog_option_menu_get (priv->classification, classification_map);
e_cal_component_set_classification (comp, classif);
/* Show Time As (Transparency) */
+ busy = e_dialog_toggle_get (priv->show_time_as_busy);
+ e_cal_component_set_transparency (comp, busy ? E_CAL_COMPONENT_TRANSP_TRANSPARENT : E_CAL_COMPONENT_TRANSP_OPAQUE);
+
+ /* Alarm */
+ e_cal_component_remove_all_alarms (comp);
+ if (e_dialog_toggle_get (priv->alarm)) {
+ ECalComponentAlarm *ca;
+ ECalComponentText summary;
+ ECalComponentAlarmTrigger trigger;
+ int alarm_type;
+
+ ca = e_cal_component_alarm_new ();
+
+ e_cal_component_get_summary (comp, &summary);
+ e_cal_component_alarm_set_description (ca, &summary);
+
+ e_cal_component_alarm_set_action (ca, E_CAL_COMPONENT_ALARM_DISPLAY);
- transparency = e_dialog_radio_get (priv->show_time_as_free,
- transparency_map);
- e_cal_component_set_transparency (comp, transparency);
-
+ memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
+ trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
+ trigger.u.rel_duration.is_neg = 1;
+
+ alarm_type = e_dialog_option_menu_get (priv->alarm_time, alarm_map);
+ switch (alarm_type) {
+ case ALARM_15_MINUTES:
+ trigger.u.rel_duration.minutes = 15;
+ break;
+
+ case ALARM_1_HOUR:
+ trigger.u.rel_duration.hours = 1;
+ break;
+
+ case ALARM_1_DAY:
+ trigger.u.rel_duration.days = 1;
+ break;
+
+ default:
+ break;
+ }
+ e_cal_component_alarm_set_trigger (ca, trigger);
+
+ e_cal_component_add_alarm (comp, ca);
+ }
+
return TRUE;
}
@@ -801,8 +985,10 @@ get_widgets (EventPage *epage)
gtk_widget_ref (priv->main);
gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
- priv->summary = GW ("general-summary");
+ priv->summary = GW ("summary");
+ priv->summary_label = GW ("summary-label");
priv->location = GW ("location");
+ priv->location_label = GW ("location-label");
/* Glade's visibility flag doesn't seem to work for custom widgets */
priv->start_time = GW ("start-time");
@@ -816,14 +1002,15 @@ get_widgets (EventPage *epage)
priv->description = GW ("description");
- priv->classification_public = GW ("classification-public");
- priv->classification_private = GW ("classification-private");
- priv->classification_confidential = GW ("classification-confidential");
+ priv->classification = GW ("classification");
- priv->show_time_frame = GW ("show-time-frame");
- priv->show_time_as_free = GW ("show-time-as-free");
priv->show_time_as_busy = GW ("show-time-as-busy");
+ priv->alarm = GW ("alarm");
+ priv->alarm_time = GW ("alarm-time");
+ priv->alarm_warning = GW ("alarm-warning");
+ priv->alarm_custom = GW ("alarm-custom");
+
priv->categories_btn = GW ("categories-button");
priv->categories = GW ("categories");
@@ -839,12 +1026,12 @@ get_widgets (EventPage *epage)
&& priv->end_timezone
&& priv->all_day_event
&& priv->description
- && priv->classification_public
- && priv->classification_private
- && priv->classification_confidential
- && priv->show_time_frame
- && priv->show_time_as_free
+ && priv->classification
&& priv->show_time_as_busy
+ && priv->alarm
+ && priv->alarm_time
+ && priv->alarm_warning
+ && priv->alarm_custom
&& priv->categories_btn
&& priv->categories);
}
@@ -1306,6 +1493,69 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
}
}
+static void
+alarm_changed_cb (GtkWidget *widget, gpointer data)
+{
+ EventPage *epage;
+ EventPagePrivate *priv;
+
+ epage = EVENT_PAGE (data);
+ priv = epage->priv;
+
+ if (e_dialog_toggle_get (priv->alarm)) {
+ ECalComponentAlarm *ca;
+ ECalComponentAlarmTrigger trigger;
+ int alarm_type;
+
+ ca = e_cal_component_alarm_new ();
+
+ e_cal_component_alarm_set_action (ca, E_CAL_COMPONENT_ALARM_DISPLAY);
+
+ memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
+ trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
+ trigger.u.rel_duration.is_neg = 1;
+
+ alarm_type = e_dialog_option_menu_get (priv->alarm_time, alarm_map);
+ switch (alarm_type) {
+ case ALARM_15_MINUTES:
+ trigger.u.rel_duration.minutes = 15;
+ break;
+
+ case ALARM_1_HOUR:
+ trigger.u.rel_duration.hours = 1;
+ break;
+
+ case ALARM_1_DAY:
+ trigger.u.rel_duration.days = 1;
+ break;
+
+ default:
+ break;
+ }
+ e_cal_component_alarm_set_trigger (ca, trigger);
+
+ e_alarm_list_append (priv->alarm_list_store, NULL, ca);
+ } else {
+ e_alarm_list_clear (priv->alarm_list_store);
+ }
+
+ sensitize_widgets (epage);
+}
+
+static void
+alarm_custom_clicked_cb (GtkWidget *widget, gpointer data)
+{
+ EventPage *epage;
+ EventPagePrivate *priv;
+
+ epage = EVENT_PAGE (data);
+ priv = epage->priv;
+
+ alarm_list_dialog_run (gtk_widget_get_toplevel (priv->main), COMP_EDITOR_PAGE (epage)->client, priv->alarm_list_store);
+
+ sensitize_widgets (epage);
+}
+
/* Hooks the widget signals */
static gboolean
init_widgets (EventPage *epage)
@@ -1354,6 +1604,19 @@ init_widgets (EventPage *epage)
g_signal_connect((priv->categories_btn), "clicked",
G_CALLBACK (categories_clicked_cb), epage);
+ /* Source selector */
+ g_signal_connect((priv->source_selector), "source_selected",
+ G_CALLBACK (source_changed_cb), epage);
+
+ /* Alarms */
+ priv->alarm_list_store = e_alarm_list_new ();
+
+ g_signal_connect((priv->alarm),
+ "toggled", G_CALLBACK (alarm_changed_cb),
+ epage);
+ g_signal_connect(priv->alarm_custom, "clicked",
+ G_CALLBACK (alarm_custom_clicked_cb), epage);
+
/* Connect the default signal handler to use to make sure we notify
* upstream of changes to the widget values.
*/
@@ -1376,25 +1639,20 @@ init_widgets (EventPage *epage)
G_CALLBACK (field_changed_cb), epage);
g_signal_connect((priv->all_day_event), "toggled",
G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->classification_public),
- "toggled", G_CALLBACK (field_changed_cb),
- epage);
- g_signal_connect((priv->classification_private),
- "toggled", G_CALLBACK (field_changed_cb),
+ g_signal_connect((priv->classification),
+ "changed", G_CALLBACK (field_changed_cb),
epage);
- g_signal_connect((priv->classification_confidential),
+ g_signal_connect((priv->show_time_as_busy),
"toggled", G_CALLBACK (field_changed_cb),
epage);
- g_signal_connect((priv->show_time_as_free),
+ g_signal_connect((priv->alarm),
"toggled", G_CALLBACK (field_changed_cb),
epage);
- g_signal_connect((priv->show_time_as_busy),
- "toggled", G_CALLBACK (field_changed_cb),
+ g_signal_connect((priv->alarm_time),
+ "changed", G_CALLBACK (field_changed_cb),
epage);
g_signal_connect((priv->categories), "changed",
G_CALLBACK (field_changed_cb), epage);
- g_signal_connect((priv->source_selector), "source_selected",
- G_CALLBACK (source_changed_cb), epage);
/* Set the default timezone, so the timezone entry may be hidden. */
zone = calendar_config_get_icaltimezone ();
diff --git a/calendar/gui/dialogs/event-page.glade b/calendar/gui/dialogs/event-page.glade
index 46e1cc0bb0..6c46950255 100644
--- a/calendar/gui/dialogs/event-page.glade
+++ b/calendar/gui/dialogs/event-page.glade
@@ -10,6 +10,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="event-page">
@@ -19,144 +24,75 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkTable" id="table11">
+ <widget class="GtkLabel" id="label66">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label56">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Su_mmary:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">general-summary</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <property name="label" translatable="yes">&lt;b&gt;Basics&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkEntry" id="general-summary">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkHBox" id="hbox56">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkLabel" id="label61">
+ <widget class="GtkLabel" id="label67">
<property name="visible">True</property>
- <property name="label" translatable="yes">L_ocation:</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
<property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
+ <property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xpad">0</property>
+ <property name="xpad">12</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">location</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="location">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame31">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<child>
- <widget class="GtkTable" id="table12">
- <property name="border_width">6</property>
+ <widget class="GtkTable" id="table11">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">4</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
- <widget class="GtkLabel" id="label57">
+ <widget class="GtkLabel" id="summary-label">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Start time:</property>
+ <property name="label" translatable="yes">Su_mmary:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0</property>
+ <property name="xalign">7.45058e-09</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">start-time</property>
</widget>
<packing>
<property name="left_attach">0</property>
@@ -169,19 +105,40 @@
</child>
<child>
- <widget class="GtkLabel" id="label58">
+ <widget class="GtkEntry" id="summary">
<property name="visible">True</property>
- <property name="label" translatable="yes">_End time:</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="location-label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Locatio_n:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0</property>
+ <property name="xalign">7.45058e-09</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">end-time</property>
+ <property name="mnemonic_widget">location</property>
</widget>
<packing>
<property name="left_attach">0</property>
@@ -194,127 +151,252 @@
</child>
<child>
- <widget class="Custom" id="start-time">
+ <widget class="GtkEntry" id="location">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="creation_function">make_date_edit</property>
- <property name="string1"></property>
- <property name="string2"></property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 16 May 2000 19:11:05 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="end-time">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">make_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 16 May 2000 19:11:10 GMT</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options"></property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="Custom" id="end-timezone">
+ <widget class="GtkScrolledWindow" id="scrolledwindow12">
<property name="visible">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Mon, 18 Jun 2001 23:51:40 GMT</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="description">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_WORD</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
<child>
- <widget class="Custom" id="start-timezone">
+ <widget class="GtkLabel" id="label69">
<property name="visible">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Mon, 18 Jun 2001 23:51:34 GMT</property>
+ <property name="label" translatable="yes">Classi_fication:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">7.45058e-09</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">location</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">fill</property>
- <property name="y_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment1">
+ <widget class="GtkHBox" id="hbox57">
<property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">7.45058e-09</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkCheckButton" id="all-day-event">
+ <widget class="GtkOptionMenu" id="classification">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">A_ll day event</property>
+ <property name="history">0</property>
+
+ <child>
+ <widget class="GtkMenu" id="menu1">
+
+ <child>
+ <widget class="GtkMenuItem" id="public1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Public</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="private1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Private</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="confidential1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Confidential</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label65">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Cal_endar:</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="Custom" id="source">
+ <property name="visible">True</property>
+ <property name="creation_function">event_page_create_source_option_menu</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Wed, 17 Dec 2003 18:20:26 GMT</property>
</widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">2</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label62">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Date &amp; Time</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <child>
+ <widget class="GtkButton" id="categories-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Ca_tegories...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="categories">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label68">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Description:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">7.45058e-09</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">description</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="type">label_item</property>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
</widget>
@@ -326,308 +408,416 @@
</child>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow12">
+ <widget class="GtkLabel" id="label70">
<property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="description">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
+ <property name="label" translatable="yes">&lt;b&gt;Date and Time&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox54">
+ <widget class="GtkHBox" id="hbox58">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkFrame" id="frame32">
+ <widget class="GtkLabel" id="label71">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">12</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table12">
+ <property name="border_width">6</property>
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">4</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox52">
- <property name="border_width">6</property>
+ <widget class="Custom" id="start-time">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="can_focus">True</property>
+ <property name="creation_function">make_date_edit</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Tue, 16 May 2000 19:11:05 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkRadioButton" id="classification-public">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pu_blic</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <child>
+ <widget class="Custom" id="end-time">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="creation_function">make_date_edit</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Tue, 16 May 2000 19:11:10 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkRadioButton" id="classification-private">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pri_vate</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">classification-public</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <child>
+ <widget class="Custom" id="end-timezone">
+ <property name="visible">True</property>
+ <property name="creation_function">make_timezone_entry</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Mon, 18 Jun 2001 23:51:40 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"></property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkRadioButton" id="classification-confidential">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Co_nfidential</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">classification-public</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label57">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Start time:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">start-time</property>
</widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
</child>
<child>
- <widget class="GtkLabel" id="label63">
+ <widget class="GtkLabel" id="label58">
<property name="visible">True</property>
- <property name="label" translatable="yes">Classification</property>
- <property name="use_underline">False</property>
+ <property name="label" translatable="yes">_End time:</property>
+ <property name="use_underline">True</property>
<property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0.5</property>
+ <property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
+ <property name="mnemonic_widget">end-time</property>
</widget>
<packing>
- <property name="type">label_item</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <widget class="GtkFrame" id="show-time-frame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <child>
+ <widget class="GtkCheckButton" id="all-day-event">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">A_ll day event</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="Custom" id="start-timezone">
+ <property name="visible">True</property>
+ <property name="creation_function">make_timezone_entry</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Mon, 18 Jun 2001 23:51:34 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options"></property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="show-time-as-busy">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Show time as _busy</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
<child>
- <widget class="GtkHBox" id="hbox55">
- <property name="border_width">6</property>
+ <widget class="GtkCheckButton" id="alarm">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Alarm</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox50">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkRadioButton" id="show-time-as-free">
+ <widget class="GtkOptionMenu" id="alarm-time">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">F_ree</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
+ <property name="history">0</property>
+
+ <child>
+ <widget class="GtkMenu" id="menu2">
+
+ <child>
+ <widget class="GtkMenuItem" id="15_minutes_before_appointment1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">15 minutes before appointment</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="1_hour_before_appointment1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">1 hour before appointment</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="1_day_before_appointment1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">1 day before appointment</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="show-time-as-busy">
+ <widget class="GtkButton" id="alarm-custom">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">B_usy</property>
- <property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">show-time-as-free</property>
+ <property name="focus_on_click">True</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox59">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-preferences</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label72">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">C_ustomize...</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
</widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
</child>
<child>
- <widget class="GtkLabel" id="label64">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Show Time As</property>
+ <widget class="GtkLabel" id="alarm-warning">
+ <property name="label" translatable="yes">This appointment has customized alarms</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0.5</property>
+ <property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
- <property name="type">label_item</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox53">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="categories-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Ca_tegories...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="categories">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
-
- <child>
- <widget class="GtkLabel" id="label65">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Calendar:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="source">
- <property name="visible">True</property>
- <property name="creation_function">event_page_create_source_option_menu</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Wed, 17 Dec 2003 18:20:26 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
</packing>
</child>
</widget>
diff --git a/calendar/gui/dialogs/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index ac193a7ce7..617ee91652 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -69,12 +69,14 @@ struct _MeetingPagePrivate {
/* Widgets from the Glade file */
GtkWidget *main;
+ GtkWidget *list_box;
GtkWidget *organizer_table;
GtkWidget *organizer;
GtkWidget *existing_organizer_table;
GtkWidget *existing_organizer;
GtkWidget *existing_organizer_btn;
GtkWidget *add;
+ GtkWidget *remove;
GtkWidget *invite;
/* ListView stuff */
@@ -328,6 +330,7 @@ sensitize_widgets (MeetingPage *mpage)
gtk_widget_set_sensitive (priv->organizer, !read_only);
gtk_widget_set_sensitive (priv->existing_organizer_btn, !read_only);
gtk_widget_set_sensitive (priv->add, !read_only);
+ gtk_widget_set_sensitive (priv->remove, !read_only);
gtk_widget_set_sensitive (priv->invite, !read_only);
gtk_widget_set_sensitive (priv->list_view, !read_only);
}
@@ -369,8 +372,9 @@ meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
gtk_widget_hide (priv->organizer_table);
gtk_widget_show (priv->existing_organizer_table);
if (itip_organizer_is_user (comp, page->client)) {
- gtk_widget_show (priv->invite);
- gtk_widget_show (priv->add);
+ gtk_widget_set_sensitive (priv->invite, TRUE);
+ gtk_widget_set_sensitive (priv->add, TRUE);
+ gtk_widget_set_sensitive (priv->remove, TRUE);
if (e_cal_get_static_capability (
page->client,
CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS))
@@ -380,8 +384,9 @@ meeting_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
page->client,
CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS))
gtk_widget_hide (priv->existing_organizer_btn);
- gtk_widget_hide (priv->invite);
- gtk_widget_hide (priv->add);
+ gtk_widget_set_sensitive (priv->invite, FALSE);
+ gtk_widget_set_sensitive (priv->add, FALSE);
+ gtk_widget_set_sensitive (priv->remove, FALSE);
}
if (organizer.cn != NULL)
@@ -483,6 +488,8 @@ get_widgets (MeetingPage *mpage)
if (!priv->main)
return FALSE;
+ priv->list_box = GW ("list-box");
+
/* Get the GtkAccelGroup from the toplevel window, so we can install
it when the notebook page is mapped. */
toplevel = gtk_widget_get_toplevel (priv->main);
@@ -508,12 +515,15 @@ get_widgets (MeetingPage *mpage)
/* Buttons */
priv->add = GW ("add-attendee");
+ priv->remove = GW ("remove-attendee");
priv->invite = GW ("invite");
#undef GW
- return (priv->invite
+ return (priv->list_box
+ && priv->invite
&& priv->add
+ && priv->remove
&& priv->organizer_table
&& priv->organizer
&& priv->existing_organizer_table
@@ -563,8 +573,9 @@ change_clicked_cb (GtkWidget *widget, gpointer data)
gtk_widget_show (priv->organizer_table);
gtk_widget_hide (priv->existing_organizer_table);
- gtk_widget_show (priv->invite);
- gtk_widget_show (priv->add);
+ gtk_widget_set_sensitive (priv->invite, TRUE);
+ gtk_widget_set_sensitive (priv->add, TRUE);
+ gtk_widget_set_sensitive (priv->remove, TRUE);
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (mpage));
@@ -580,6 +591,11 @@ add_clicked_cb (GtkButton *btn, MeetingPage *mpage)
e_meeting_list_view_edit (mpage->priv->list_view, attendee);
}
+static void
+remove_clicked_cb (GtkButton *btn, MeetingPage *mpage)
+{
+}
+
/* Function called to invite more people */
static void
invite_cb (GtkWidget *widget, gpointer data)
@@ -611,7 +627,10 @@ init_widgets (MeetingPage *mpage)
/* Add attendee button */
g_signal_connect (priv->add, "clicked", G_CALLBACK (add_clicked_cb), mpage);
- /* Invite button */
+ /* Remove attendee button */
+ g_signal_connect (priv->remove, "clicked", G_CALLBACK (remove_clicked_cb), mpage);
+
+ /* Contacts button */
g_signal_connect(priv->invite, "clicked", G_CALLBACK (invite_cb), mpage);
}
@@ -813,10 +832,11 @@ meeting_page_construct (MeetingPage *mpage, EMeetingStore *ems,
gtk_widget_show (GTK_WIDGET (priv->list_view));
sw = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
gtk_widget_show (sw);
gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (priv->list_view));
- gtk_box_pack_start (GTK_BOX (priv->main), sw, TRUE, TRUE, 6);
+ gtk_box_pack_start (GTK_BOX (priv->list_box), sw, TRUE, TRUE, 6);
/* Init the widget signals */
init_widgets (mpage);
diff --git a/calendar/gui/dialogs/meeting-page.glade b/calendar/gui/dialogs/meeting-page.glade
index 5a13ad5c77..a2709cb180 100644
--- a/calendar/gui/dialogs/meeting-page.glade
+++ b/calendar/gui/dialogs/meeting-page.glade
@@ -2,7 +2,6 @@
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
-<requires lib="gnome"/>
<widget class="GtkWindow" id="meeting-toplevel">
<property name="title" translatable="yes">window1</property>
@@ -11,6 +10,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="meeting-page">
@@ -20,236 +24,424 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Organizer&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">12</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
<child>
- <widget class="GtkTable" id="organizer-table">
- <property name="border_width">6</property>
+ <widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkCombo" id="organizer">
+ <widget class="GtkTable" id="organizer-table">
<property name="visible">True</property>
- <property name="value_in_list">True</property>
- <property name="allow_empty">False</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry2">
+ <child>
+ <widget class="GtkLabel" id="organizer-label">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
+ <property name="label" translatable="yes">_Organizer:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">entry2</property>
</widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
</child>
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget1">
+ <child>
+ <widget class="GtkCombo" id="organizer">
<property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+ <property name="value_in_list">True</property>
+ <property name="allow_empty">False</property>
+ <property name="case_sensitive">False</property>
+ <property name="enable_arrow_keys">True</property>
+ <property name="enable_arrows_always">False</property>
- <child>
- <widget class="GtkListItem" id="convertwidget2">
+ <child internal-child="entry">
+ <widget class="GtkEntry" id="entry2">
<property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ </child>
+
+ <child internal-child="list">
+ <widget class="GtkList" id="convertwidget1">
+ <property name="visible">True</property>
+ <property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
- <widget class="GtkLabel" id="convertwidget3">
+ <widget class="GtkListItem" id="convertwidget2">
<property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="convertwidget3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
</child>
</widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
</child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="organizer-label">
+ <widget class="GtkTable" id="existing-organizer-table">
<property name="visible">True</property>
- <property name="label" translatable="yes">Organizer:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">3</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Organizer:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="existing-organizer-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Change Or_ganizer</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options"></property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="existing-organizer">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">None</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Attendees&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="list-box">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">12</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkTable" id="existing-organizer-table">
- <property name="border_width">6</property>
+ <widget class="GtkVButtonBox" id="vbuttonbox1">
<property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkLabel" id="label1">
+ <widget class="GtkButton" id="add-attendee">
<property name="visible">True</property>
- <property name="label" translatable="yes">Organizer:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
</child>
<child>
- <widget class="GtkButton" id="existing-organizer-button">
+ <widget class="GtkButton" id="remove-attendee">
<property name="visible">True</property>
+ <property name="can_default">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Change Organizer</property>
- <property name="use_underline">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
</child>
<child>
- <widget class="GtkLabel" id="existing-organizer">
+ <widget class="GtkButton" id="invite">
<property name="visible">True</property>
- <property name="label" translatable="yes">None</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
+
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-jump-to</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Con_tacts...</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="add-attendee">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Add A_ttendee</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="invite">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Add attendees from addressbook.</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
-
- <child>
- <placeholder/>
- </child>
</widget>
</child>
</widget>
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 50bdb108b9..e58fb28906 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -37,6 +37,8 @@
#include <gtk/gtkspinbutton.h>
#include <gtk/gtktreeview.h>
#include <gtk/gtktreeselection.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkstock.h>
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include <e-util/e-dialog-widgets.h>
@@ -143,13 +145,9 @@ struct _RecurrencePagePrivate {
/* Widgets from the Glade file */
GtkWidget *main;
- GtkWidget *summary;
- GtkWidget *date_time;
-
- GtkWidget *none;
- GtkWidget *simple;
- GtkWidget *custom;
-
+ GtkWidget *recurs;
+ gboolean custom;
+
GtkWidget *params;
GtkWidget *interval_value;
GtkWidget *interval_unit;
@@ -181,7 +179,6 @@ struct _RecurrencePagePrivate {
int ending_count;
/* More widgets from the Glade file */
- GtkWidget *exception_date;
GtkWidget *exception_list; /* This is a GtkTreeView now */
GtkWidget *exception_add;
GtkWidget *exception_modify;
@@ -209,7 +206,6 @@ static GtkWidget *recurrence_page_get_widget (CompEditorPage *page);
static void recurrence_page_focus_main_widget (CompEditorPage *page);
static gboolean recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp);
static gboolean recurrence_page_fill_component (CompEditorPage *page, ECalComponent *comp);
-static void recurrence_page_set_summary (CompEditorPage *page, const char *summary);
static void recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
static void field_changed (RecurrencePage *apage);
@@ -246,7 +242,6 @@ recurrence_page_class_init (RecurrencePageClass *class)
editor_page_class->focus_main_widget = recurrence_page_focus_main_widget;
editor_page_class->fill_widgets = recurrence_page_fill_widgets;
editor_page_class->fill_component = recurrence_page_fill_component;
- editor_page_class->set_summary = recurrence_page_set_summary;
editor_page_class->set_dates = recurrence_page_set_dates;
object_class->finalize = recurrence_page_finalize;
@@ -264,11 +259,8 @@ recurrence_page_init (RecurrencePage *rpage)
priv->xml = NULL;
priv->main = NULL;
- priv->summary = NULL;
- priv->date_time = NULL;
- priv->none = NULL;
- priv->simple = NULL;
- priv->custom = NULL;
+ priv->recurs = NULL;
+ priv->custom = FALSE;
priv->params = NULL;
priv->interval_value = NULL;
priv->interval_unit = NULL;
@@ -281,7 +273,6 @@ recurrence_page_init (RecurrencePage *rpage)
priv->month_num_menu = NULL;
priv->ending_date_edit = NULL;
priv->ending_count_spin = NULL;
- priv->exception_date = NULL;
priv->exception_list = NULL;
priv->exception_add = NULL;
priv->exception_modify = NULL;
@@ -360,14 +351,7 @@ recurrence_page_focus_main_widget (CompEditorPage *page)
rpage = RECURRENCE_PAGE (page);
priv = rpage->priv;
- if (e_dialog_toggle_get (priv->none))
- gtk_widget_grab_focus (priv->none);
- else if (e_dialog_toggle_get (priv->simple))
- gtk_widget_grab_focus (priv->simple);
- else if (e_dialog_toggle_get (priv->custom))
- gtk_widget_grab_focus (priv->custom);
- else
- g_assert_not_reached ();
+ gtk_widget_grab_focus (priv->recurs);
}
/* Fills the widgets with default values */
@@ -380,19 +364,17 @@ clear_widgets (RecurrencePage *rpage)
priv = rpage->priv;
+ priv->custom = FALSE;
+
priv->weekday_day_mask = 0;
priv->month_index = 1;
priv->month_num = MONTH_NUM_DAY;
priv->month_day = MONTH_DAY_NTH;
- g_signal_handlers_block_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_radio_set (priv->none, RECUR_NONE, type_map);
- g_signal_handlers_unblock_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
+ g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
+ e_dialog_toggle_set (priv->recurs, FALSE);
+ g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->interval_value));
g_signal_handlers_block_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
@@ -506,13 +488,13 @@ static void
sensitize_recur_widgets (RecurrencePage *rpage)
{
RecurrencePagePrivate *priv;
- enum recur_type type;
+ gboolean recurs;
GtkWidget *label;
priv = rpage->priv;
- type = e_dialog_radio_get (priv->none, type_map);
-
+ recurs = e_dialog_toggle_get (priv->recurs);
+
/* We can't preview that well for instances right now */
if (e_cal_component_is_instance (priv->comp))
gtk_widget_set_sensitive (priv->preview_calendar, FALSE);
@@ -522,20 +504,7 @@ sensitize_recur_widgets (RecurrencePage *rpage)
if (GTK_BIN (priv->custom_warning_bin)->child)
gtk_widget_destroy (GTK_BIN (priv->custom_warning_bin)->child);
- switch (type) {
- case RECUR_NONE:
- gtk_widget_set_sensitive (priv->params, FALSE);
- gtk_widget_show (priv->params);
- gtk_widget_hide (priv->custom_warning_bin);
- break;
-
- case RECUR_SIMPLE:
- gtk_widget_set_sensitive (priv->params, TRUE);
- gtk_widget_show (priv->params);
- gtk_widget_hide (priv->custom_warning_bin);
- break;
-
- case RECUR_CUSTOM:
+ if (recurs && priv->custom) {
gtk_widget_set_sensitive (priv->params, FALSE);
gtk_widget_hide (priv->params);
@@ -545,10 +514,14 @@ sensitize_recur_widgets (RecurrencePage *rpage)
gtk_container_add (GTK_CONTAINER (priv->custom_warning_bin),
label);
gtk_widget_show_all (priv->custom_warning_bin);
- break;
-
- default:
- g_assert_not_reached ();
+ } else if (recurs) {
+ gtk_widget_set_sensitive (priv->params, TRUE);
+ gtk_widget_show (priv->params);
+ gtk_widget_hide (priv->custom_warning_bin);
+ } else {
+ gtk_widget_set_sensitive (priv->params, FALSE);
+ gtk_widget_show (priv->params);
+ gtk_widget_hide (priv->custom_warning_bin);
}
}
@@ -572,12 +545,10 @@ sensitize_buttons (RecurrencePage *rpage)
else
gtk_widget_set_sensitive (priv->params, FALSE);
- gtk_widget_set_sensitive (priv->none, !read_only);
- gtk_widget_set_sensitive (priv->simple, !read_only);
+ gtk_widget_set_sensitive (priv->recurs, !read_only);
gtk_widget_set_sensitive (priv->exception_add, !read_only && e_cal_component_has_recurrences (priv->comp));
gtk_widget_set_sensitive (priv->exception_modify, !read_only && selected_rows > 0);
gtk_widget_set_sensitive (priv->exception_delete, !read_only && selected_rows > 0);
- gtk_widget_set_sensitive (priv->exception_date, !read_only);
}
#if 0
@@ -792,7 +763,7 @@ static gboolean
fill_component (RecurrencePage *rpage, ECalComponent *comp)
{
RecurrencePagePrivate *priv;
- enum recur_type recur_type;
+ gboolean recurs;
GtkTreeModel *model;
GtkTreeIter iter;
gboolean valid_iter;
@@ -801,27 +772,18 @@ fill_component (RecurrencePage *rpage, ECalComponent *comp)
priv = rpage->priv;
model = GTK_TREE_MODEL (priv->exception_list_store);
- recur_type = e_dialog_radio_get (priv->none, type_map);
-
- switch (recur_type) {
- case RECUR_NONE:
+ recurs = e_dialog_toggle_get (priv->recurs);
+
+ if (recurs && priv->custom) {
+ /* We just keep whatever the component has currently */
+ } else if (recurs) {
e_cal_component_set_rdate_list (comp, NULL);
- e_cal_component_set_rrule_list (comp, NULL);
e_cal_component_set_exrule_list (comp, NULL);
- break;
-
- case RECUR_SIMPLE:
+ simple_recur_to_comp (rpage, comp);
+ } else {
e_cal_component_set_rdate_list (comp, NULL);
+ e_cal_component_set_rrule_list (comp, NULL);
e_cal_component_set_exrule_list (comp, NULL);
- simple_recur_to_comp (rpage, comp);
- break;
-
- case RECUR_CUSTOM:
- /* We just keep whatever the component has currently */
- break;
-
- default:
- g_assert_not_reached ();
}
/* Set exceptions */
@@ -1558,7 +1520,6 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Summary */
e_cal_component_get_summary (comp, &text);
- recurrence_page_set_summary (page, text.value);
/* Dates */
comp_editor_dates (&dates, comp);
@@ -1576,21 +1537,9 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (!e_cal_component_has_rdates (comp)
&& !e_cal_component_has_rrules (comp)
&& !e_cal_component_has_exrules (comp)) {
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->none),
- rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->simple),
- rpage);
- gtk_signal_handler_block_by_data (GTK_OBJECT (priv->custom),
- rpage);
- e_dialog_radio_set (priv->none, RECUR_NONE, type_map);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->none),
- rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->simple),
- rpage);
- gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->custom),
- rpage);
-
- gtk_widget_set_sensitive (priv->custom, FALSE);
+ gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurs), rpage);
+ e_dialog_toggle_set (priv->recurs, FALSE);
+ gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurs), rpage);
sensitize_buttons (rpage);
preview_recur (rpage);
@@ -1850,15 +1799,9 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* If we got here it means it is a simple recurrence */
- g_signal_handlers_block_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_radio_set (priv->simple, RECUR_SIMPLE, type_map);
- g_signal_handlers_unblock_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
-
- gtk_widget_set_sensitive (priv->custom, FALSE);
+ g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
+ e_dialog_toggle_set (priv->recurs, TRUE);
+ g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
sensitize_buttons (rpage);
make_recurrence_special (rpage);
@@ -1874,19 +1817,16 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
custom:
- g_signal_handlers_block_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_block_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_radio_set (priv->custom, RECUR_CUSTOM, type_map);
- g_signal_handlers_unblock_matched (priv->none, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->simple, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- g_signal_handlers_unblock_matched (priv->custom, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
+ g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
+ priv->custom = TRUE;
+ e_dialog_toggle_set (priv->recurs, TRUE);
+ g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
+ /* FIXME Desensitize recurrence page */
- gtk_widget_set_sensitive (priv->custom, TRUE);
sensitize_buttons (rpage);
out:
-
+ priv->custom = FALSE;
e_cal_component_free_recur_list (rrule_list);
preview_recur (rpage);
@@ -1905,19 +1845,6 @@ recurrence_page_fill_component (CompEditorPage *page, ECalComponent *comp)
return fill_component (rpage, comp);
}
-/* set_summary handler for the recurrence page */
-static void
-recurrence_page_set_summary (CompEditorPage *page, const char *summary)
-{
- RecurrencePage *rpage;
- RecurrencePagePrivate *priv;
-
- rpage = RECURRENCE_PAGE (page);
- priv = rpage->priv;
-
- gtk_label_set_text (GTK_LABEL (priv->summary), summary);
-}
-
/* set_dates handler for the recurrence page */
static void
recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
@@ -1931,8 +1858,6 @@ recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
rpage = RECURRENCE_PAGE (page);
priv = rpage->priv;
- comp_editor_date_label (dates, priv->date_time);
-
/* Copy the dates to our component */
if (!priv->comp)
@@ -2000,13 +1925,8 @@ get_widgets (RecurrencePage *rpage)
gtk_widget_ref (priv->main);
gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
-
- priv->summary = GW ("summary");
- priv->date_time = GW ("date-time");
- priv->none = GW ("none");
- priv->simple = GW ("simple");
- priv->custom = GW ("custom");
+ priv->recurs = GW ("recurs");
priv->params = GW ("params");
priv->interval_value = GW ("interval-value");
@@ -2016,8 +1936,6 @@ get_widgets (RecurrencePage *rpage)
priv->ending_special = GW ("ending-special");
priv->custom_warning_bin = GW ("custom-warning-bin");
- priv->exception_date = GW ("exception-date");
- gtk_widget_show (priv->exception_date);
priv->exception_list = GW ("exception-list");
priv->exception_add = GW ("exception-add");
priv->exception_modify = GW ("exception-modify");
@@ -2027,11 +1945,7 @@ get_widgets (RecurrencePage *rpage)
#undef GW
- return (priv->summary
- && priv->date_time
- && priv->none
- && priv->simple
- && priv->custom
+ return (priv->recurs
&& priv->params
&& priv->interval_value
&& priv->interval_unit
@@ -2039,7 +1953,6 @@ get_widgets (RecurrencePage *rpage)
&& priv->ending_menu
&& priv->ending_special
&& priv->custom_warning_bin
- && priv->exception_date
&& priv->exception_list
&& priv->exception_add
&& priv->exception_modify
@@ -2075,19 +1988,16 @@ type_toggled_cb (GtkToggleButton *toggle, gpointer data)
field_changed (rpage);
- if (toggle->active) {
- sensitize_buttons (rpage);
- preview_recur (rpage);
- }
+ sensitize_buttons (rpage);
+ preview_recur (rpage);
/* enable/disable the 'Add' button */
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (rpage)->client, &read_only, NULL))
read_only = TRUE;
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->none)) || read_only)
+ if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->recurs)) || read_only)
gtk_widget_set_sensitive (priv->exception_add, FALSE);
- else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->simple)) ||
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->custom)))
+ else
gtk_widget_set_sensitive (priv->exception_add, TRUE);
}
@@ -2133,35 +2043,65 @@ ending_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
preview_recur (rpage);
}
+static GtkWidget *
+create_exception_dialog (RecurrencePage *rpage, const char *title, GtkWidget **date_edit)
+{
+ RecurrencePagePrivate *priv;
+ GtkWidget *dialog, *toplevel;
+
+ priv = rpage->priv;
+
+ toplevel = gtk_widget_get_toplevel (priv->main);
+ dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (toplevel),
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ *date_edit = comp_editor_new_date_edit (TRUE, FALSE, TRUE);
+ gtk_widget_show (*date_edit);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), *date_edit, FALSE, TRUE, 6);
+
+ return dialog;
+}
+
/* Callback for the "add exception" button */
static void
exception_add_cb (GtkWidget *widget, gpointer data)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
- ECalComponentDateTime dt;
- struct icaltimetype icaltime = icaltime_null_time ();
+ GtkWidget *dialog, *date_edit;
gboolean date_set;
-
+
rpage = RECURRENCE_PAGE (data);
priv = rpage->priv;
- field_changed (rpage);
-
- dt.value = &icaltime;
-
- /* We use DATE values for exceptions, so we don't need a TZID. */
- dt.tzid = NULL;
- icaltime.is_date = 1;
-
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->exception_date),
- &icaltime.year,
- &icaltime.month,
- &icaltime.day);
- g_assert (date_set);
+ dialog = create_exception_dialog (rpage, "Add exception", &date_edit);
+
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
+ ECalComponentDateTime dt;
+ struct icaltimetype icaltime = icaltime_null_time ();
- append_exception (rpage, &dt);
- preview_recur (rpage);
+ field_changed (rpage);
+
+ dt.value = &icaltime;
+
+ /* We use DATE values for exceptions, so we don't need a TZID. */
+ dt.tzid = NULL;
+ icaltime.is_date = 1;
+
+ date_set = e_date_edit_get_date (E_DATE_EDIT (date_edit),
+ &icaltime.year,
+ &icaltime.month,
+ &icaltime.day);
+ g_assert (date_set);
+
+ append_exception (rpage, &dt);
+ preview_recur (rpage);
+ }
+
+ gtk_widget_destroy (dialog);
}
/* Callback for the "modify exception" button */
@@ -2170,10 +2110,9 @@ exception_modify_cb (GtkWidget *widget, gpointer data)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
+ GtkWidget *dialog, *date_edit;
+ const ECalComponentDateTime *current_dt;
GtkTreeSelection *selection;
- ECalComponentDateTime dt;
- struct icaltimetype icaltime = icaltime_null_time ();
- struct icaltimetype *tt;
GtkTreeIter iter;
rpage = RECURRENCE_PAGE (data);
@@ -2184,22 +2123,37 @@ exception_modify_cb (GtkWidget *widget, gpointer data)
g_warning ("Could not get a selection to modify.");
return;
}
- field_changed (rpage);
- dt.value = &icaltime;
- tt = dt.value;
- e_date_edit_get_date (E_DATE_EDIT (priv->exception_date),
- &tt->year, &tt->month, &tt->day);
- tt->hour = 0;
- tt->minute = 0;
- tt->second = 0;
- tt->is_date = 1;
-
- /* No TZID, since we are using a DATE value now. */
- dt.tzid = NULL;
-
- e_date_time_list_set_date_time (priv->exception_list_store, &iter, &dt);
- preview_recur (rpage);
+ current_dt = e_date_time_list_get_date_time (priv->exception_list_store, &iter);
+
+ dialog = create_exception_dialog (rpage, "Modify exception", &date_edit);
+ e_date_edit_set_date (E_DATE_EDIT (date_edit),
+ current_dt->value->year, current_dt->value->month, current_dt->value->day);
+
+ if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
+ ECalComponentDateTime dt;
+ struct icaltimetype icaltime = icaltime_null_time ();
+ struct icaltimetype *tt;
+
+ field_changed (rpage);
+
+ dt.value = &icaltime;
+ tt = dt.value;
+ e_date_edit_get_date (E_DATE_EDIT (date_edit),
+ &tt->year, &tt->month, &tt->day);
+ tt->hour = 0;
+ tt->minute = 0;
+ tt->second = 0;
+ tt->is_date = 1;
+
+ /* No TZID, since we are using a DATE value now. */
+ dt.tzid = NULL;
+
+ e_date_time_list_set_date_time (priv->exception_list_store, &iter, &dt);
+ preview_recur (rpage);
+ }
+
+ gtk_widget_destroy (dialog);
}
/* Callback for the "delete exception" button */
@@ -2250,8 +2204,6 @@ exception_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
- const ECalComponentDateTime *dt;
- struct icaltimetype *t;
GtkTreeIter iter;
rpage = RECURRENCE_PAGE (data);
@@ -2265,16 +2217,6 @@ exception_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
gtk_widget_set_sensitive (priv->exception_modify, TRUE);
gtk_widget_set_sensitive (priv->exception_delete, TRUE);
-
- dt = e_date_time_list_get_date_time (priv->exception_list_store, &iter);
- g_assert (dt != NULL);
-
- t = dt->value;
-
- e_date_edit_set_date (E_DATE_EDIT (priv->exception_date),
- t->year, t->month, t->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->exception_date),
- t->hour, t->minute);
}
/* This is called when any field is changed; it notifies upstream. */
@@ -2315,24 +2257,13 @@ init_widgets (RecurrencePage *rpage)
priv->preview_calendar);
gtk_widget_show (priv->preview_calendar);
- /* Make sure the EDateEdit widgets and ECalendarItem use our timezones
- to get the current time. */
- e_date_edit_set_show_time (E_DATE_EDIT (priv->exception_date), FALSE);
- e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->exception_date),
- (EDateEditGetTimeCallback) comp_editor_get_current_time,
- rpage, NULL);
e_calendar_item_set_get_time_callback (ecal->calitem,
(ECalendarItemGetTimeCallback) comp_editor_get_current_time,
rpage, NULL);
/* Recurrence types */
- g_signal_connect((priv->none), "toggled",
- G_CALLBACK (type_toggled_cb), rpage);
- g_signal_connect((priv->simple), "toggled",
- G_CALLBACK (type_toggled_cb), rpage);
- g_signal_connect((priv->custom), "toggled",
- G_CALLBACK (type_toggled_cb), rpage);
+ g_signal_connect(priv->recurs, "toggled", G_CALLBACK (type_toggled_cb), rpage);
/* Recurrence interval */
diff --git a/calendar/gui/dialogs/recurrence-page.glade b/calendar/gui/dialogs/recurrence-page.glade
index c5c2158979..107771e453 100644
--- a/calendar/gui/dialogs/recurrence-page.glade
+++ b/calendar/gui/dialogs/recurrence-page.glade
@@ -10,6 +10,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="recurrence-page">
@@ -19,122 +24,36 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkFrame" id="frame35">
+ <widget class="GtkLabel" id="label71">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkTable" id="table14">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label66">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Summary:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label67">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Date/Time:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="summary">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <property name="label" translatable="yes">&lt;b&gt;Recurrence&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkLabel" id="date-time">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
+ <child>
+ <widget class="GtkHBox" id="hbox61">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkLabel" id="label1">
+ <widget class="GtkLabel" id="label72">
<property name="visible">True</property>
- <property name="label" translatable="yes">Basics</property>
+ <property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -142,57 +61,66 @@
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xpad">0</property>
+ <property name="xpad">12</property>
<property name="ypad">0</property>
</widget>
<packing>
- <property name="type">label_item</property>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox55">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
<child>
- <widget class="GtkFrame" id="frame36">
+ <widget class="GtkVBox" id="vbox59">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkVBox" id="vbox56">
- <property name="border_width">6</property>
+ <widget class="GtkCheckButton" id="recurs">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">This appointment _recurs</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox57">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox56">
+ <widget class="GtkHBox" id="params">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">2</property>
<child>
- <widget class="GtkRadioButton" id="none">
+ <widget class="GtkLabel" id="label68">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_No recurrence</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
+ <property name="label" translatable="yes">Every</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -202,16 +130,16 @@
</child>
<child>
- <widget class="GtkRadioButton" id="simple">
+ <widget class="GtkSpinButton" id="interval-value">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Simple recurrence</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">none</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">1 1 10000 1 10 10</property>
</widget>
<packing>
<property name="padding">0</property>
@@ -221,16 +149,48 @@
</child>
<child>
- <widget class="GtkRadioButton" id="custom">
+ <widget class="GtkOptionMenu" id="interval-unit">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="label" translatable="yes">_Custom recurrence</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">none</property>
+ <property name="history">0</property>
+
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget1">
+ <property name="visible">True</property>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">day(s)</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">week(s)</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">month(s)</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">year(s)</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -238,196 +198,64 @@
<property name="fill">False</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox57">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="params">
+ <widget class="GtkAlignment" id="special">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
- <widget class="GtkLabel" id="label68">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Every</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
+ <placeholder/>
</child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkSpinButton" id="interval-value">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 1 10000 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkOptionMenu" id="ending-menu">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
- <child>
- <widget class="GtkOptionMenu" id="interval-unit">
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget6">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget7">
<property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">day(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">week(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">month(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">year(s)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
+ <property name="label" translatable="yes">for</property>
+ <property name="use_underline">True</property>
</widget>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="special">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
<child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="ending-menu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget6">
+ <widget class="GtkMenuItem" id="convertwidget8">
<property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">for</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">until</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">forever</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
+ <property name="label" translatable="yes">until</property>
+ <property name="use_underline">True</property>
</widget>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="ending-special">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
<child>
- <placeholder/>
+ <widget class="GtkMenuItem" id="convertwidget9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">forever</property>
+ <property name="use_underline">True</property>
+ </widget>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
</widget>
<packing>
@@ -438,12 +266,16 @@
</child>
<child>
- <widget class="GtkAlignment" id="custom-warning-bin">
+ <widget class="GtkAlignment" id="ending-special">
<property name="visible">True</property>
- <property name="xalign">0</property>
+ <property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
<placeholder/>
@@ -451,8 +283,8 @@
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
</widget>
@@ -462,25 +294,34 @@
<property name="fill">False</property>
</packing>
</child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label68">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Recurrence Rule</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <child>
+ <widget class="GtkAlignment" id="custom-warning-bin">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="type">label_item</property>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
</widget>
@@ -490,217 +331,289 @@
<property name="fill">False</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label73">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Exceptions&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox60">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkHBox" id="hbox59">
+ <widget class="GtkLabel" id="label75">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">12</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox63">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkFrame" id="frame37">
+ <widget class="GtkScrolledWindow" id="scrolledwindow14">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="GtkHBox" id="hbox60">
- <property name="border_width">6</property>
+ <widget class="GtkTreeView" id="exception-list">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox57">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
+ <property name="can_focus">True</property>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">False</property>
+ <property name="reorderable">False</property>
+ <property name="enable_search">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkButton" id="exception-add">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">A_dd</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkVButtonBox" id="vbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_START</property>
+ <property name="spacing">6</property>
- <child>
- <widget class="GtkButton" id="exception-modify">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Modify</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkButton" id="exception-add">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-add</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ </child>
- <child>
- <widget class="GtkButton" id="exception-delete">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Remove</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkButton" id="exception-modify">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
<child>
- <widget class="GtkVBox" id="vbox58">
+ <widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
- <widget class="Custom" id="exception-date">
+ <widget class="GtkHBox" id="hbox64">
<property name="visible">True</property>
- <property name="creation_function">make_exdate_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 16 May 2000 01:42:29 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="homogeneous">False</property>
+ <property name="spacing">2</property>
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow14">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="stock">gtk-preferences</property>
+ <property name="icon_size">4</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
<child>
- <widget class="GtkTreeView" id="exception-list">
+ <widget class="GtkLabel" id="label76">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
+ <property name="label" translatable="yes">_Edit</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
</widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
</child>
<child>
- <widget class="GtkLabel" id="label69">
+ <widget class="GtkButton" id="exception-delete">
<property name="visible">True</property>
- <property name="label" translatable="yes">Exceptions</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-remove</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
</widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label70">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Preview&lt;/b&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox62">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkLabel" id="label74">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">12</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox60">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkVBox" id="vbox59">
+ <widget class="GtkAlignment" id="preview-bin">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label70">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Preview</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">0</property>
+ <property name="right_padding">0</property>
<child>
- <widget class="GtkAlignment" id="preview-bin">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <placeholder/>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
</packing>
</child>
</widget>
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 6c8dcbba32..029ba07929 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -277,6 +277,25 @@ clear_widgets (TaskDetailsPage *tdpage)
e_dialog_editable_set (priv->url, NULL);
}
+static void
+sensitize_widgets (TaskDetailsPage *tdpage)
+{
+ gboolean read_only;
+ TaskDetailsPagePrivate *priv;
+
+ priv = tdpage->priv;
+
+ if (!e_cal_is_read_only (COMP_EDITOR_PAGE (tdpage)->client, &read_only, NULL))
+ read_only = TRUE;
+
+ gtk_widget_set_sensitive (priv->status, !read_only);
+ gtk_widget_set_sensitive (priv->priority, !read_only);
+ gtk_widget_set_sensitive (priv->percent_complete, !read_only);
+ gtk_widget_set_sensitive (priv->completed_date, !read_only);
+ gtk_widget_set_sensitive (priv->url_label, !read_only);
+ gtk_entry_set_editable (GTK_ENTRY (e_url_entry_get_entry (priv->url_entry)), !read_only);
+}
+
/* fill_widgets handler for the task page */
static gboolean
task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
@@ -363,6 +382,8 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
priv->updating = FALSE;
+ sensitize_widgets (tdpage);
+
return TRUE;
}
@@ -729,7 +750,13 @@ init_widgets (TaskDetailsPage *tdpage)
G_CALLBACK (field_changed_cb), tdpage);
}
-
+static void
+client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
+{
+ TaskDetailsPage *tdpage = TASK_DETAILS_PAGE (page);
+
+ sensitize_widgets (tdpage);
+}
/**
* task_details_page_construct:
@@ -763,6 +790,9 @@ task_details_page_construct (TaskDetailsPage *tdpage)
init_widgets (tdpage);
+ g_signal_connect_after (G_OBJECT (tdpage), "client_changed",
+ G_CALLBACK (client_changed_cb), NULL);
+
return tdpage;
}
diff --git a/calendar/gui/dialogs/task-details-page.glade b/calendar/gui/dialogs/task-details-page.glade
index 8cd357c4d3..5396696733 100644
--- a/calendar/gui/dialogs/task-details-page.glade
+++ b/calendar/gui/dialogs/task-details-page.glade
@@ -10,6 +10,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="task-details-page">
@@ -19,297 +24,313 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkFrame" id="frame2">
+ <widget class="GtkLabel" id="label20">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Status&lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">6</property>
+ <widget class="GtkLabel" id="label21">
<property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">12</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">4</property>
+ <widget class="GtkLabel" id="label17">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="label" translatable="yes">_Status:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">status</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Status:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">status</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">P_ercent complete:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">percent-complete</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Priority:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">priority</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkOptionMenu" id="status">
+ <child>
+ <widget class="GtkLabel" id="date_completed_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Date completed:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkOptionMenu" id="priority">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget7">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget8">
<property name="visible">True</property>
+ <property name="label" translatable="yes">High</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Not Started</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">In Progress</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Completed</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Cancelled</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget9">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Normal</property>
+ <property name="use_underline">True</property>
</widget>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Priority:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">priority</property>
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget10">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Low</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Undefined</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
</child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkOptionMenu" id="priority">
+ <child>
+ <widget class="GtkOptionMenu" id="status">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget7">
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget2">
<property name="visible">True</property>
+ <property name="label" translatable="yes">Not Started</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">High</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Normal</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Low</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Undefined</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">In Progress</property>
+ <property name="use_underline">True</property>
</widget>
</child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes">% _Complete</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">percent-complete</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Completed</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
- <child>
- <widget class="GtkSpinButton" id="percent-complete">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 100 1 10 10</property>
+ <child>
+ <widget class="GtkMenuItem" id="convertwidget6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Cancelled</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">4</property>
+ <widget class="GtkSpinButton" id="percent-complete">
<property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="date_completed_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Date completed:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="completed-date">
- <property name="visible">True</property>
- <property name="creation_function">task_details_page_create_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 01 Jun 2001 18:58:51 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Progress</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <child>
+ <widget class="Custom" id="completed-date">
+ <property name="visible">True</property>
+ <property name="creation_function">task_details_page_create_date_edit</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 01 Jun 2001 18:58:51 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="type">label_item</property>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
</widget>
@@ -321,59 +342,114 @@
</child>
<child>
- <widget class="GtkTable" id="table2">
- <property name="border_width">6</property>
+ <widget class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Miscellaneous &lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkLabel" id="url_label">
+ <widget class="GtkLabel" id="label23">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Web Page:</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
<property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0</property>
+ <property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xpad">0</property>
+ <property name="xpad">12</property>
<property name="ypad">0</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="Custom" id="url_entry">
+ <widget class="GtkTable" id="table2">
+ <property name="border_width">6</property>
<property name="visible">True</property>
- <property name="creation_function">e_url_entry_new</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 08 Feb 2002 21:02:37 GMT</property>
+ <property name="n_rows">1</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+
+ <child>
+ <widget class="GtkLabel" id="url_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Web Page:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="Custom" id="url_entry">
+ <property name="visible">True</property>
+ <property name="creation_function">e_url_entry_new</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 08 Feb 2002 21:02:37 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 972651b6c8..2023e1dcd8 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -63,15 +63,6 @@ static void forward_cmd (GtkWidget *widget, gpointer data);
static void model_row_change_insert_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
static void model_row_delete_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data);
-static BonoboUIVerb verbs [] = {
- BONOBO_UI_UNSAFE_VERB ("ActionAssignTask", assign_task_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionRefreshTask", refresh_task_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionCancelTask", cancel_task_cmd),
- BONOBO_UI_UNSAFE_VERB ("ActionForward", forward_cmd),
-
- BONOBO_UI_VERB_END
-};
-
static CompEditorClass *parent_class;
@@ -108,47 +99,6 @@ task_editor_class_init (TaskEditorClass *klass)
}
static void
-set_menu_sens (TaskEditor *te)
-{
- TaskEditorPrivate *priv;
- gboolean sens, existing, user, read_only = TRUE;
-
- priv = te->priv;
-
- existing = comp_editor_get_existing_org (COMP_EDITOR (te));
- user = comp_editor_get_user_org (COMP_EDITOR (te));
-
- e_cal_is_read_only (comp_editor_get_e_cal (COMP_EDITOR (te)), &read_only, NULL);
-
- sens = e_cal_get_static_capability (comp_editor_get_e_cal (COMP_EDITOR (te)),
- CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)
- || priv->assignment_shown || read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionAssignTask",
- "sensitive", sens ? "0" : "1");
-
- sens = priv->assignment_shown && existing && !user && !read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionRefreshTask",
- "sensitive", sens ? "1" : "0");
-
- sens = priv->assignment_shown && existing && user && !read_only;
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/ActionCancelTask",
- "sensitive", sens ? "1" : "0");
-
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/FileSave",
- "sensitive", read_only ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/FileSaveAndClose",
- "sensitive", read_only ? "0" : "1");
- comp_editor_set_ui_prop (COMP_EDITOR (te),
- "/commands/FileDelete",
- "sensitive", read_only ? "0" : "1");
-}
-
-static void
init_widgets (TaskEditor *te)
{
TaskEditorPrivate *priv;
@@ -166,7 +116,7 @@ init_widgets (TaskEditor *te)
static void
client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
{
- set_menu_sens (TASK_EDITOR (user_data));
+// set_menu_sens (TASK_EDITOR (user_data));
}
/* Object initialization function for the task editor */
@@ -196,7 +146,7 @@ task_editor_construct (TaskEditor *te, ECal *client)
gtk_object_sink (GTK_OBJECT (priv->task_page));
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->task_page),
- _("Basic"));
+ _("Basics"));
g_signal_connect (G_OBJECT (priv->task_page), "client_changed",
G_CALLBACK (client_changed_cb), te);
@@ -205,7 +155,7 @@ task_editor_construct (TaskEditor *te, ECal *client)
gtk_object_sink (GTK_OBJECT (priv->task_details_page));
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->task_details_page),
- _("Details"));
+ _("Status"));
priv->meet_page = meeting_page_new (priv->model, client);
g_object_ref (priv->meet_page);
@@ -216,10 +166,7 @@ task_editor_construct (TaskEditor *te, ECal *client)
comp_editor_set_e_cal (COMP_EDITOR (te), client);
- comp_editor_merge_ui (COMP_EDITOR (te), "evolution-task-editor.xml", verbs, NULL);
-
init_widgets (te);
- set_menu_sens (te);
return te;
}
@@ -319,7 +266,6 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
}
e_cal_component_free_attendee_list (attendees);
- set_menu_sens (te);
comp_editor_set_needs_send (COMP_EDITOR (te), priv->assignment_shown && itip_organizer_is_user (comp, client));
priv->updating = FALSE;
@@ -415,7 +361,6 @@ show_assignment (TaskEditor *te)
_("Assignment"));
priv->assignment_shown = TRUE;
- set_menu_sens (te);
comp_editor_set_needs_send (COMP_EDITOR (te), priv->assignment_shown);
comp_editor_set_changed (COMP_EDITOR (te), TRUE);
}
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index de17834994..3199ef7260 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -57,6 +57,7 @@ struct _TaskPagePrivate {
GtkWidget *main;
GtkWidget *summary;
+ GtkWidget *summary_label;
GtkWidget *due_date;
GtkWidget *start_date;
@@ -65,9 +66,7 @@ struct _TaskPagePrivate {
GtkWidget *description;
- GtkWidget *classification_public;
- GtkWidget *classification_private;
- GtkWidget *classification_confidential;
+ GtkWidget *classification;
GtkWidget *categories_btn;
GtkWidget *categories;
@@ -150,14 +149,13 @@ task_page_init (TaskPage *tpage)
priv->main = NULL;
priv->summary = NULL;
+ priv->summary_label = NULL;
priv->due_date = NULL;
priv->start_date = NULL;
priv->due_timezone = NULL;
priv->start_timezone = NULL;
priv->description = NULL;
- priv->classification_public = NULL;
- priv->classification_private = NULL;
- priv->classification_confidential = NULL;
+ priv->classification = NULL;
priv->categories_btn = NULL;
priv->categories = NULL;
@@ -237,8 +235,7 @@ clear_widgets (TaskPage *tpage)
e_date_edit_set_time (E_DATE_EDIT (priv->due_date), 0);
/* Classification */
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
+ e_dialog_option_menu_set (priv->classification, E_CAL_COMPONENT_CLASS_PRIVATE, classification_map);
/* Categories */
e_dialog_editable_set (priv->categories, NULL);
@@ -248,7 +245,30 @@ clear_widgets (TaskPage *tpage)
static ECalComponentClassification
classification_get (GtkWidget *widget)
{
- return e_dialog_radio_get (widget, classification_map);
+ return e_dialog_option_menu_get (widget, classification_map);
+}
+
+static void
+sensitize_widgets (TaskPage *tpage)
+{
+ gboolean read_only;
+ TaskPagePrivate *priv;
+
+ priv = tpage->priv;
+
+ if (!e_cal_is_read_only (COMP_EDITOR_PAGE (tpage)->client, &read_only, NULL))
+ read_only = TRUE;
+
+ gtk_widget_set_sensitive (priv->summary_label, !read_only);
+ gtk_entry_set_editable (GTK_ENTRY (priv->summary), !read_only);
+ gtk_widget_set_sensitive (priv->due_date, !read_only);
+ gtk_widget_set_sensitive (priv->start_date, !read_only);
+ gtk_widget_set_sensitive (priv->due_timezone, !read_only);
+ gtk_widget_set_sensitive (priv->start_timezone, !read_only);
+ gtk_widget_set_sensitive (priv->description, !read_only);
+ gtk_widget_set_sensitive (priv->classification, !read_only);
+ gtk_widget_set_sensitive (priv->categories_btn, !read_only);
+ gtk_entry_set_editable (GTK_ENTRY (priv->categories), !read_only);
}
/* fill_widgets handler for the task page */
@@ -379,30 +399,15 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
switch (cl) {
case E_CAL_COMPONENT_CLASS_PUBLIC:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
- break;
-
case E_CAL_COMPONENT_CLASS_PRIVATE:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PRIVATE,
- classification_map);
- break;
-
case E_CAL_COMPONENT_CLASS_CONFIDENTIAL:
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_CONFIDENTIAL,
- classification_map);
break;
-
default:
/* default to PUBLIC */
- e_dialog_radio_set (priv->classification_public,
- E_CAL_COMPONENT_CLASS_PUBLIC,
- classification_map);
+ cl = E_CAL_COMPONENT_CLASS_PUBLIC;
break;
}
+ e_dialog_option_menu_set (priv->classification, cl, classification_map);
/* Categories */
e_cal_component_get_categories (comp, &categories);
@@ -414,6 +419,8 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
priv->updating = FALSE;
+ sensitize_widgets (tpage);
+
return TRUE;
}
@@ -540,7 +547,7 @@ task_page_fill_component (CompEditorPage *page, ECalComponent *comp)
}
/* Classification. */
- e_cal_component_set_classification (comp, classification_get (priv->classification_public));
+ e_cal_component_set_classification (comp, classification_get (priv->classification));
/* Categories */
cat = e_dialog_editable_get (priv->categories);
@@ -640,6 +647,7 @@ get_widgets (TaskPage *tpage)
gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
priv->summary = GW ("summary");
+ priv->summary_label = GW ("summary-label");
/* Glade's visibility flag doesn't seem to work for custom widgets */
priv->due_date = GW ("due-date");
@@ -652,9 +660,7 @@ get_widgets (TaskPage *tpage)
priv->description = GW ("description");
- priv->classification_public = GW ("classification-public");
- priv->classification_private = GW ("classification-private");
- priv->classification_confidential = GW ("classification-confidential");
+ priv->classification = GW ("classification");
priv->categories_btn = GW ("categories-button");
priv->categories = GW ("categories");
@@ -664,13 +670,12 @@ get_widgets (TaskPage *tpage)
#undef GW
return (priv->summary
+ && priv->summary_label
&& priv->due_date
&& priv->start_date
&& priv->due_timezone
&& priv->start_timezone
- && priv->classification_public
- && priv->classification_private
- && priv->classification_confidential
+ && priv->classification
&& priv->description
&& priv->categories_btn
&& priv->categories);
@@ -802,11 +807,11 @@ field_changed_cb (GtkWidget *widget, gpointer data)
static void
source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
{
- TaskPage *epage;
+ TaskPage *tpage;
TaskPagePrivate *priv;
- epage = TASK_PAGE (data);
- priv = epage->priv;
+ tpage = TASK_PAGE (data);
+ priv = tpage->priv;
if (!priv->updating) {
ECal *client;
@@ -819,7 +824,7 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
g_object_unref (client);
e_source_option_menu_select (E_SOURCE_OPTION_MENU (priv->source_selector),
- e_cal_get_source (COMP_EDITOR_PAGE (epage)->client));
+ e_cal_get_source (COMP_EDITOR_PAGE (tpage)->client));
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
@@ -831,6 +836,7 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data)
comp_editor_notify_client_changed (
COMP_EDITOR (gtk_widget_get_toplevel (priv->main)),
client);
+ sensitize_widgets (tpage);
}
}
}
@@ -871,21 +877,13 @@ init_widgets (TaskPage *tpage)
g_signal_connect((priv->due_date), "changed",
G_CALLBACK (date_changed_cb), tpage);
- g_signal_connect((priv->due_timezone), "changed",
- G_CALLBACK (field_changed_cb), tpage);
- g_signal_connect((priv->start_timezone), "changed",
- G_CALLBACK (field_changed_cb), tpage);
+ /* Categories button */
+ g_signal_connect((priv->categories_btn), "clicked",
+ G_CALLBACK (categories_clicked_cb), tpage);
- /* Classification */
- g_signal_connect((priv->classification_public),
- "toggled",
- G_CALLBACK (field_changed_cb), tpage);
- g_signal_connect((priv->classification_private),
- "toggled",
- G_CALLBACK (field_changed_cb), tpage);
- g_signal_connect((priv->classification_confidential),
- "toggled",
- G_CALLBACK (field_changed_cb), tpage);
+ /* Source selector */
+ g_signal_connect((priv->source_selector), "source_selected",
+ G_CALLBACK (source_changed_cb), tpage);
/* Connect the default signal handler to use to make sure the "changed"
field gets set whenever a field is changed. */
@@ -894,17 +892,17 @@ init_widgets (TaskPage *tpage)
g_signal_connect ((text_buffer), "changed",
G_CALLBACK (field_changed_cb), tpage);
+ g_signal_connect((priv->summary), "changed",
+ G_CALLBACK (field_changed_cb), tpage);
+ g_signal_connect((priv->due_timezone), "changed",
+ G_CALLBACK (field_changed_cb), tpage);
+ g_signal_connect((priv->start_timezone), "changed",
+ G_CALLBACK (field_changed_cb), tpage);
+ g_signal_connect((priv->classification), "changed",
+ G_CALLBACK (field_changed_cb), tpage);
g_signal_connect((priv->categories), "changed",
G_CALLBACK (field_changed_cb), tpage);
- /* Categories button */
- g_signal_connect((priv->categories_btn), "clicked",
- G_CALLBACK (categories_clicked_cb), tpage);
-
- /* Source selector */
- g_signal_connect((priv->source_selector), "source_selected",
- G_CALLBACK (source_changed_cb), tpage);
-
/* Set the default timezone, so the timezone entry may be hidden. */
zone = calendar_config_get_icaltimezone ();
e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->start_timezone), zone);
diff --git a/calendar/gui/dialogs/task-page.glade b/calendar/gui/dialogs/task-page.glade
index 6f70da6b03..b914881118 100644
--- a/calendar/gui/dialogs/task-page.glade
+++ b/calendar/gui/dialogs/task-page.glade
@@ -10,6 +10,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="task-page">
@@ -19,236 +24,335 @@
<property name="spacing">6</property>
<child>
- <widget class="GtkTable" id="table3">
+ <widget class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Basics&lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox7">
<property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkLabel" id="label3">
+ <widget class="GtkLabel" id="label22">
<property name="visible">True</property>
- <property name="label" translatable="yes">Su_mmary:</property>
- <property name="use_underline">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
<property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xpad">0</property>
+ <property name="xpad">12</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">summary</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="summary">
+ <widget class="GtkTable" id="table3">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
- <child>
- <widget class="GtkFrame" id="frame2">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <child>
+ <widget class="GtkEntry" id="summary">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="summary-label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Su_mmary:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">summary</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
<child>
- <widget class="GtkTable" id="table1">
+ <widget class="GtkLabel" id="label100">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Classi_fication:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">classification</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox10">
<property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
<property name="homogeneous">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkLabel" id="label6">
+ <widget class="GtkOptionMenu" id="classification">
<property name="visible">True</property>
- <property name="label" translatable="yes">Sta_rt date:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">start-date</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
+
+ <child>
+ <widget class="GtkMenu" id="menu1">
+
+ <child>
+ <widget class="GtkMenuItem" id="public1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Public</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="private1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Private</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkMenuItem" id="confidential1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Confidential</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label5">
+ <widget class="GtkLabel" id="label23">
<property name="visible">True</property>
- <property name="label" translatable="yes">_Due date:</property>
+ <property name="label" translatable="yes">_Group:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0</property>
+ <property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xpad">0</property>
+ <property name="xpad">12</property>
<property name="ypad">0</property>
- <property name="mnemonic_widget">due-date</property>
+ <property name="mnemonic_widget">source</property>
</widget>
<packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="Custom" id="due-date">
+ <widget class="Custom" id="source">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">task_page_create_date_edit</property>
+ <property name="creation_function">task_page_create_source_option_menu</property>
<property name="int1">0</property>
<property name="int2">0</property>
- <property name="last_modification_time">Fri, 01 Jun 2001 18:59:52 GMT</property>
+ <property name="last_modification_time">Thu, 18 Dec 2003 01:58:48 GMT</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <child>
- <widget class="Custom" id="start-date">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="creation_function">task_page_create_date_edit</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 01 Jun 2001 18:59:57 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkButton" id="categories-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Ca_tegories...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <child>
- <widget class="Custom" id="due-timezone">
- <property name="visible">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 19 Jun 2001 04:43:54 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkEntry" id="categories">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_IN</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
- <widget class="Custom" id="start-timezone">
+ <widget class="GtkTextView" id="description">
<property name="visible">True</property>
- <property name="creation_function">make_timezone_entry</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 19 Jun 2001 04:43:46 GMT</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="overwrite">False</property>
+ <property name="accepts_tab">True</property>
+ <property name="justification">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap_mode">GTK_WRAP_WORD</property>
+ <property name="cursor_visible">True</property>
+ <property name="pixels_above_lines">0</property>
+ <property name="pixels_below_lines">0</property>
+ <property name="pixels_inside_wrap">0</property>
+ <property name="left_margin">0</property>
+ <property name="right_margin">0</property>
+ <property name="indent">0</property>
+ <property name="text" translatable="yes"></property>
</widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
</child>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
</packing>
</child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Date &amp; Time</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Description:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">description</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="type">label_item</property>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
</packing>
</child>
</widget>
@@ -260,23 +364,44 @@
</child>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <widget class="GtkLabel" id="label24">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Date and Time&lt;/span&gt;</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">0</property>
<child>
- <widget class="GtkLabel" id="label18">
+ <widget class="GtkLabel" id="label25">
<property name="visible">True</property>
- <property name="label" translatable="yes">Description:</property>
+ <property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
- <property name="xalign">0</property>
+ <property name="xalign">0.5</property>
<property name="yalign">0.5</property>
- <property name="xpad">0</property>
+ <property name="xpad">12</property>
<property name="ypad">0</property>
</widget>
<packing>
@@ -287,175 +412,155 @@
</child>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="description">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame24">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="border_width">6</property>
+ <widget class="GtkTable" id="table4">
<property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
<property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
- <widget class="GtkRadioButton" id="classification-public">
+ <widget class="GtkLabel" id="label29">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pu_blic</property>
+ <property name="label" translatable="yes">_Due date:</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">due-date</property>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="classification-private">
+ <widget class="GtkLabel" id="label30">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Pri_vate</property>
+ <property name="label" translatable="yes">Sta_rt date:</property>
<property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">classification-public</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">start-date</property>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkRadioButton" id="classification-confidential">
+ <widget class="GtkHBox" id="hbox8">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Con_fidential</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">classification-public</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="Custom" id="due-date">
+ <property name="visible">True</property>
+ <property name="creation_function">task_page_create_date_edit</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Mon, 14 Jun 2004 18:16:07 GMT</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="Custom" id="due-timezone">
+ <property name="visible">True</property>
+ <property name="creation_function">make_timezone_entry</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Tue, 19 Jun 2001 04:43:54 GMT</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
</packing>
</child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Classification</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
+ <child>
+ <widget class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
- <child>
- <widget class="GtkButton" id="categories-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Ca_tegories...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <child>
+ <widget class="Custom" id="start-date">
+ <property name="visible">True</property>
+ <property name="creation_function">task_page_create_date_edit</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Mon, 14 Jun 2004 18:16:13 GMT</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkEntry" id="categories">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
+ <child>
+ <widget class="Custom" id="start-timezone">
+ <property name="visible">True</property>
+ <property name="creation_function">make_timezone_entry</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Tue, 19 Jun 2001 04:43:46 GMT</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
@@ -463,46 +568,10 @@
<property name="fill">True</property>
</packing>
</child>
-
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Folder:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="source">
- <property name="visible">True</property>
- <property name="creation_function">task_page_create_source_option_menu</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 18 Dec 2003 01:58:48 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
</widget>
<packing>
<property name="padding">0</property>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>