aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorJP Rosevear <jpr@src.gnome.org>2003-03-05 03:52:37 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-03-05 03:52:37 +0800
commit6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62 (patch)
treebba07b5f28966c10a90de8f550af895014b0b9bb /calendar/gui/dialogs
parentcd4477930e72b1be069d5c97b90d96e989645bfc (diff)
downloadgsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.gz
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.tar.zst
gsoc2013-evolution-6b4c3984d52cfbf88ae84ee0102f4aa0c17a2a62.zip
If only the pipe wouldn't break.
svn path=/trunk/; revision=20143
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/Makefile.am2
-rw-r--r--calendar/gui/dialogs/alarm-options.c194
-rw-r--r--calendar/gui/dialogs/alarm-options.glade982
-rw-r--r--calendar/gui/dialogs/alarm-options.h2
-rw-r--r--calendar/gui/dialogs/alarm-page.c242
-rw-r--r--calendar/gui/dialogs/alarm-page.glade936
-rw-r--r--calendar/gui/dialogs/cancel-comp.c5
-rw-r--r--calendar/gui/dialogs/cancel-comp.h3
-rw-r--r--calendar/gui/dialogs/comp-editor.c49
-rw-r--r--calendar/gui/dialogs/event-editor.c40
-rw-r--r--calendar/gui/dialogs/event-page.c14
-rw-r--r--calendar/gui/dialogs/event-page.glade1253
-rw-r--r--calendar/gui/dialogs/meeting-page.c15
-rw-r--r--calendar/gui/dialogs/meeting-page.h1
-rw-r--r--calendar/gui/dialogs/recurrence-page.c68
-rw-r--r--calendar/gui/dialogs/send-comp.c5
-rw-r--r--calendar/gui/dialogs/send-comp.h3
-rw-r--r--calendar/gui/dialogs/task-details-page.c8
-rw-r--r--calendar/gui/dialogs/task-details-page.glade677
-rw-r--r--calendar/gui/dialogs/task-editor.c66
20 files changed, 2464 insertions, 2101 deletions
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index dc44ea7be6..53ea88a9dc 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -62,6 +62,8 @@ libcal_dialogs_la_SOURCES = \
meeting-page.h \
recurrence-page.c \
recurrence-page.h \
+ recur-comp.c \
+ recur-comp.h \
save-comp.c \
save-comp.h \
schedule-page.c \
diff --git a/calendar/gui/dialogs/alarm-options.c b/calendar/gui/dialogs/alarm-options.c
index 937d54eaca..50b5ebcfeb 100644
--- a/calendar/gui/dialogs/alarm-options.c
+++ b/calendar/gui/dialogs/alarm-options.c
@@ -29,7 +29,13 @@
#include <gtk/gtkcheckbutton.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkwindow.h>
+#include <gtk/gtkhbox.h>
+#include <bonobo/bonobo-control.h>
+#include <bonobo/bonobo-exception.h>
+#include <bonobo/bonobo-widget.h>
#include <glade/glade.h>
+#include <ebook/e-destination.h>
+#include "Evolution-Addressbook-SelectNames.h"
#include "e-util/e-dialog-widgets.h"
#include "alarm-options.h"
@@ -50,6 +56,7 @@ typedef struct {
GtkWidget *button_cancel;
/* Alarm repeat widgets */
+ gboolean repeat;
GtkWidget *repeat_toggle;
GtkWidget *repeat_group;
GtkWidget *repeat_quantity;
@@ -64,8 +71,14 @@ typedef struct {
GtkWidget *aalarm_group;
GtkWidget *aalarm_attach;
- /* FIXME: Mail alarm widgets */
+ /* Mail alarm widgets */
+ const char *email;
GtkWidget *malarm_group;
+ GtkWidget *malarm_address_group;
+ GtkWidget *malarm_addresses;
+ GtkWidget *malarm_addressbook;
+ GtkWidget *malarm_description;
+ GNOME_Evolution_Addressbook_SelectNames corba_select_names;
/* Procedure alarm widgets */
GtkWidget *palarm_group;
@@ -73,6 +86,9 @@ typedef struct {
GtkWidget *palarm_args;
} Dialog;
+#define SELECT_NAMES_OAFID "OAFIID:GNOME_Evolution_Addressbook_SelectNames"
+static const char *section_name = "Send To";
+
/* Gets the widgets from the XML file and returns if they are all available. */
@@ -99,7 +115,10 @@ get_widgets (Dialog *dialog)
dialog->aalarm_attach = GW ("aalarm-attach");
dialog->malarm_group = GW ("malarm-group");
-
+ dialog->malarm_address_group = GW ("malarm-address-group");
+ dialog->malarm_addressbook = GW ("malarm-addressbook");
+ dialog->malarm_description = GW ("malarm-description");
+
dialog->palarm_group = GW ("palarm-group");
dialog->palarm_program = GW ("palarm-program");
dialog->palarm_args = GW ("palarm-args");
@@ -117,11 +136,63 @@ get_widgets (Dialog *dialog)
&& dialog->aalarm_group
&& dialog->aalarm_attach
&& dialog->malarm_group
+ && dialog->malarm_address_group
+ && dialog->malarm_addressbook
+ && dialog->malarm_description
&& dialog->palarm_group
&& dialog->palarm_program
&& dialog->palarm_args);
}
+static void
+addressbook_clicked_cb (GtkWidget *widget, gpointer data)
+{
+ Dialog *dialog = data;
+ CORBA_Environment ev;
+
+ CORBA_exception_init (&ev);
+
+ GNOME_Evolution_Addressbook_SelectNames_activateDialog (dialog->corba_select_names,
+ section_name, &ev);
+
+ CORBA_exception_free (&ev);
+}
+
+static gboolean
+setup_select_names (Dialog *dialog)
+{
+ Bonobo_Control corba_control;
+ CORBA_Environment ev;
+
+ CORBA_exception_init (&ev);
+
+ dialog->corba_select_names = bonobo_activation_activate_from_id (SELECT_NAMES_OAFID, 0, NULL, &ev);
+ if (BONOBO_EX (&ev))
+ return FALSE;
+
+ GNOME_Evolution_Addressbook_SelectNames_addSection (dialog->corba_select_names,
+ section_name, section_name, &ev);
+ if (BONOBO_EX (&ev))
+ return FALSE;
+
+ corba_control = GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (dialog->corba_select_names,
+ section_name, &ev);
+
+ if (BONOBO_EX (&ev))
+ return FALSE;
+
+ CORBA_exception_free (&ev);
+
+ dialog->malarm_addresses = bonobo_widget_new_control_from_objref (corba_control, CORBA_OBJECT_NIL);
+ gtk_widget_show (dialog->malarm_addresses);
+ gtk_box_pack_end_defaults (GTK_BOX (dialog->malarm_address_group), dialog->malarm_addresses);
+
+ gtk_signal_connect (GTK_OBJECT (dialog->malarm_addressbook), "clicked",
+ GTK_SIGNAL_FUNC (addressbook_clicked_cb), dialog);
+
+ return TRUE;
+}
+
/* Closes the dialog by terminating its main loop */
static void
close_dialog (Dialog *dialog, gboolean canceled)
@@ -243,7 +314,50 @@ alarm_to_dalarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
static void
alarm_to_malarm_widgets (Dialog *dialog, CalComponentAlarm *alarm)
{
- /* FIXME: nothing for now; we don't support mail alarms */
+ CalComponentText description;
+ GSList *attendee_list, *l;
+ EDestination **destv;
+ int len, i;
+
+ /* Recipients */
+ cal_component_alarm_get_attendee_list (alarm, &attendee_list);
+ len = g_slist_length (attendee_list);
+
+ if (len <= 0) {
+ destv = g_new0 (EDestination *, 2);
+ destv[0] = e_destination_new ();
+ e_destination_set_email (destv[0], dialog->email);
+ destv[1] = NULL;
+ len = 1;
+ } else {
+ destv = g_new0 (EDestination *, len + 1);
+ for (l = attendee_list, i = 0; l != NULL; l = l->next, i++) {
+ CalComponentAttendee *a = l->data;
+ EDestination *dest;
+
+ dest = e_destination_new ();
+ if (a->cn != NULL && *a->cn)
+ e_destination_set_name (dest, a->cn);
+ if (a->value != NULL && *a->value)
+ e_destination_set_email (dest, a->value);
+
+ destv[i] = dest;
+ }
+ destv[i] = NULL;
+ }
+
+ bonobo_widget_set_property (BONOBO_WIDGET (dialog->malarm_addresses),
+ "destinations", e_destination_exportv (destv), NULL);
+
+ for (i = 0; i < len; i++)
+ gtk_object_unref (GTK_OBJECT (destv[i]));
+ g_free (destv);
+
+ cal_component_free_attendee_list (attendee_list);
+
+ /* Description */
+ cal_component_alarm_get_description (alarm, &description);
+ e_dialog_editable_set (dialog->malarm_description, description.value);
}
/* Fills the procedure alarm widgets with the values from the alarm component */
@@ -319,7 +433,8 @@ alarm_to_repeat_widgets (Dialog *dialog, CalComponentAlarm *alarm)
/* Sensitivity */
- if (repeat.repetitions == 0) {
+ if (dialog->repeat || repeat.repetitions == 0) {
+ gtk_widget_set_sensitive (dialog->repeat_toggle, dialog->repeat);
gtk_widget_set_sensitive (dialog->repeat_group, FALSE);
e_dialog_toggle_set (dialog->repeat_toggle, FALSE);
return;
@@ -373,7 +488,7 @@ alarm_to_dialog (Dialog *dialog, CalComponentAlarm *alarm)
break;
case CAL_ALARM_EMAIL:
- gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Mail Alarm Options"));
+ gtk_window_set_title (GTK_WINDOW (dialog->toplevel), _("Email Alarm Options"));
gtk_widget_hide (dialog->aalarm_group);
gtk_widget_hide (dialog->dalarm_group);
gtk_widget_show (dialog->malarm_group);
@@ -491,7 +606,61 @@ dalarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
static void
malarm_widgets_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
{
- /* FIXME: nothing for now; we don't support mail alarms */
+ char *str;
+ CalComponentText description;
+ GSList *attendee_list = NULL;
+ EDestination **destv;
+ icalcomponent *icalcomp;
+ icalproperty *icalprop;
+ int i;
+
+ /* Attendees */
+ bonobo_widget_get_property (BONOBO_WIDGET (dialog->malarm_addresses), "destinations",
+ &str, NULL);
+ destv = e_destination_importv (str);
+ g_free (str);
+
+ for (i = 0; destv[i] != NULL; i++) {
+ EDestination *dest;
+ CalComponentAttendee *a;
+
+ dest = destv[i];
+
+ a = g_new0 (CalComponentAttendee, 1);
+ a->value = e_destination_get_email (dest);
+ a->cn = e_destination_get_name (dest);
+
+ attendee_list = g_slist_append (attendee_list, a);
+ }
+
+ cal_component_alarm_set_attendee_list (alarm, attendee_list);
+
+ cal_component_free_attendee_list (attendee_list);
+ e_destination_freev (destv);
+
+ /* Description */
+ str = e_dialog_editable_get (dialog->malarm_description);
+ description.value = str;
+ description.altrep = NULL;
+
+ cal_component_alarm_set_description (alarm, &description);
+ g_free (str);
+
+ /* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
+ * we don't re-set the alarm's description */
+ icalcomp = cal_component_alarm_get_icalcomponent (alarm);
+ icalprop = icalcomponent_get_first_property(icalcomp, ICAL_X_PROPERTY);
+ while (icalprop) {
+ const char *x_name;
+
+ x_name = icalproperty_get_x_name (icalprop);
+ if (!strcmp (x_name, "X-EVOLUTION-NEEDS-DESCRIPTION")) {
+ icalcomponent_remove_property (icalcomp, icalprop);
+ break;
+ }
+
+ icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
+ }
}
/* Fills the procedure alarm data with the values from the widgets */
@@ -586,12 +755,14 @@ dialog_to_alarm (Dialog *dialog, CalComponentAlarm *alarm)
* Return value: TRUE if the dialog could be created, FALSE otherwise.
**/
gboolean
-alarm_options_dialog_run (CalComponentAlarm *alarm)
+alarm_options_dialog_run (CalComponentAlarm *alarm, const char *email, gboolean repeat)
{
Dialog dialog;
g_return_val_if_fail (alarm != NULL, FALSE);
+ dialog.repeat = repeat;
+ 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!");
@@ -599,10 +770,15 @@ alarm_options_dialog_run (CalComponentAlarm *alarm)
}
if (!get_widgets (&dialog)) {
- g_object_unref((dialog.xml));
+ g_object_unref(dialog.xml);
return FALSE;
}
+ if (!setup_select_names (&dialog)) {
+ g_object_unref (dialog.xml);
+ return FALSE;
+ }
+
init_widgets (&dialog);
alarm_to_dialog (&dialog, alarm);
@@ -614,7 +790,7 @@ alarm_options_dialog_run (CalComponentAlarm *alarm)
dialog_to_alarm (&dialog, alarm);
gtk_widget_destroy (dialog.toplevel);
- g_object_unref((dialog.xml));
+ g_object_unref(dialog.xml);
return TRUE;
}
diff --git a/calendar/gui/dialogs/alarm-options.glade b/calendar/gui/dialogs/alarm-options.glade
index 9c08926392..83f0af1f80 100644
--- a/calendar/gui/dialogs/alarm-options.glade
+++ b/calendar/gui/dialogs/alarm-options.glade
@@ -1,434 +1,556 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
- <requires lib="gnome" />
-
- <widget class="GtkWindow" id="alarm-options-toplevel">
- <property name="title" translatable="yes"></property>
- <property name="type">GTK_WINDOW_DIALOG</property>
- <property name="modal">yes</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">yes</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="label" translatable="yes">Alarm Repeat</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkCheckButton" id="repeat-toggle">
- <property name="can_focus">yes</property>
- <property name="has_focus">yes</property>
- <property name="label" translatable="yes">Repeat the alarm</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="repeat-group">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkSpinButton" id="repeat-quantity">
- <property name="can_focus">yes</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">no</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="wrap">no</property>
- <property name="snap_to_ticks">no</property>
- <property name="visible">yes</property>
- <property name="adjustment">1 1 999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="label" translatable="yes">extra times every</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="repeat-value">
- <property name="can_focus">yes</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">no</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="wrap">no</property>
- <property name="snap_to_ticks">no</property>
- <property name="visible">yes</property>
- <property name="adjustment">1 0 999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="repeat-unit">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="label" translatable="yes">minutes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="label" translatable="yes">hours</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="label" translatable="yes">days</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="dalarm-group">
- <property name="visible">no</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="label" translatable="yes">Message to Display</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <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="visible">yes</property>
-
- <child>
- <widget class="GtkTextView" id="dalarm-description">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget5">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget6">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="aalarm-group">
- <property name="visible">no</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="label" translatable="yes">Play sound:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="file-entry1">
- <property name="modal">no</property>
- <property name="directory_entry">no</property>
- <property name="visible">yes</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="aalarm-attach">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="malarm-group">
- <property name="visible">no</property>
- <property name="label" translatable="yes">Evolution does not yet support email notification for reminders. You will not be able to edit the options for this reminder.</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">yes</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">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="palarm-group">
- <property name="visible">no</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="label" translatable="yes">Run program:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="palarm-program">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="label" translatable="yes">With these arguments:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="palarm-args">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">30</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button-ok">
- <property name="can_default">yes</property>
- <property name="has_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-cancel">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="alarm-options-toplevel">
+ <property name="title" translatable="yes"></property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">True</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="border_width">4</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <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="hbox1">
+ <property name="border_width">4</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="repeat-toggle">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="has_focus">True</property>
+ <property name="label" translatable="yes">Repeat the alarm</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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="repeat-group">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkSpinButton" id="repeat-quantity">
+ <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">False</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 999 1 10 10</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="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">extra times 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.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="GtkSpinButton" id="repeat-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">False</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">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkOptionMenu" id="repeat-unit">
+ <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">minutes</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">hours</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">days</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">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Alarm Repeat</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">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="dalarm-group">
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Message to Display</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>
+
+ <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="dalarm-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="GtkHBox" id="aalarm-group">
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Play sound:</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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GnomeFileEntry" id="file-entry1">
+ <property name="visible">True</property>
+ <property name="max_saved">10</property>
+ <property name="directory_entry">False</property>
+ <property name="modal">False</property>
+
+ <child internal-child="entry">
+ <widget class="GtkEntry" id="aalarm-attach">
+ <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>
+ </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="GtkVBox" id="malarm-group">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkHBox" id="malarm-address-group">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkButton" id="malarm-addressbook">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Send To:</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>
+ <placeholder/>
+ </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="label7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Message to Send</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>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+ <child>
+ <widget class="GtkTextView" id="malarm-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">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="palarm-group">
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Run program:</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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="palarm-program">
+ <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="label6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">With these arguments:</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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkEntry" id="palarm-args">
+ <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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <property name="spacing">30</property>
+
+ <child>
+ <widget class="GtkButton" id="button-ok">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="has_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>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkButton" id="button-cancel">
+ <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>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
diff --git a/calendar/gui/dialogs/alarm-options.h b/calendar/gui/dialogs/alarm-options.h
index 388b737541..1b4abb56d9 100644
--- a/calendar/gui/dialogs/alarm-options.h
+++ b/calendar/gui/dialogs/alarm-options.h
@@ -23,6 +23,6 @@
#include <cal-util/cal-component.h>
-gboolean alarm_options_dialog_run (CalComponentAlarm *alarm);
+gboolean alarm_options_dialog_run (CalComponentAlarm *alarm, const char *email, gboolean repeat);
#endif
diff --git a/calendar/gui/dialogs/alarm-page.c b/calendar/gui/dialogs/alarm-page.c
index 7c861c6add..b28e0dd0b3 100644
--- a/calendar/gui/dialogs/alarm-page.c
+++ b/calendar/gui/dialogs/alarm-page.c
@@ -33,6 +33,7 @@
#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 <gal/widgets/e-unicode.h>
@@ -99,9 +100,17 @@ static const int action_map[] = {
CAL_ALARM_DISPLAY,
CAL_ALARM_AUDIO,
CAL_ALARM_PROCEDURE,
+ CAL_ALARM_EMAIL,
-1
};
+static const char *action_map_cap[] = {
+ "no-display-alarms",
+ "no-audio-alarms",
+ "no-procedure-alarms",
+ "no-email-alarms"
+};
+
static const int value_map[] = {
MINUTES,
HOURS,
@@ -299,171 +308,20 @@ clear_widgets (AlarmPage *apage)
e_alarm_list_clear (priv->list_store);
}
-/* Builds a string for the duration of the alarm. If the duration is zero, returns NULL. */
-static char *
-get_alarm_duration_string (struct icaldurationtype *duration)
-{
- GString *string = g_string_new (NULL);
- char *ret;
- gboolean have_something;
-
- have_something = FALSE;
-
- if (duration->days > 1) {
- g_string_sprintf (string, _("%d days"), duration->days);
- have_something = TRUE;
- } else if (duration->days == 1) {
- g_string_append (string, _("1 day"));
- have_something = TRUE;
- }
-
- if (duration->weeks > 1) {
- g_string_sprintf (string, _("%d weeks"), duration->weeks);
- have_something = TRUE;
- } else if (duration->weeks == 1) {
- g_string_append (string, _("1 week"));
- have_something = TRUE;
- }
-
- if (duration->hours > 1) {
- g_string_sprintf (string, _("%d hours"), duration->hours);
- have_something = TRUE;
- } else if (duration->hours == 1) {
- g_string_append (string, _("1 hour"));
- have_something = TRUE;
- }
-
- if (duration->minutes > 1) {
- g_string_sprintf (string, _("%d minutes"), duration->minutes);
- have_something = TRUE;
- } else if (duration->minutes == 1) {
- g_string_append (string, _("1 minute"));
- have_something = TRUE;
- }
-
- if (duration->seconds > 1) {
- g_string_sprintf (string, _("%d seconds"), duration->seconds);
- have_something = TRUE;
- } else if (duration->seconds == 1) {
- g_string_append (string, _("1 second"));
- have_something = TRUE;
- }
-
- if (have_something) {
- ret = string->str;
- g_string_free (string, FALSE);
- return ret;
- } else {
- g_string_free (string, TRUE);
- return NULL;
- }
-}
-
-static char *
-get_alarm_string (CalComponentAlarm *alarm)
+static void
+sensitize_buttons (AlarmPage *apage)
{
- CalAlarmAction action;
- CalAlarmTrigger trigger;
- char string[256];
- char *base, *str = NULL, *dur;
-
- string [0] = '\0';
-
- cal_component_alarm_get_action (alarm, &action);
- cal_component_alarm_get_trigger (alarm, &trigger);
-
- switch (action) {
- case CAL_ALARM_AUDIO:
- base = _("Play a sound");
- break;
-
- case CAL_ALARM_DISPLAY:
- base = _("Display a message");
- break;
-
- case CAL_ALARM_EMAIL:
- base = _("Send an email");
- break;
-
- case CAL_ALARM_PROCEDURE:
- base = _("Run a program");
- break;
-
- case CAL_ALARM_NONE:
- case CAL_ALARM_UNKNOWN:
- default:
- base = _("Unknown action to be performed");
- break;
- }
-
- /* FIXME: This does not look like it will localize correctly. */
-
- switch (trigger.type) {
- case CAL_ALARM_TRIGGER_RELATIVE_START:
- dur = get_alarm_duration_string (&trigger.u.rel_duration);
-
- if (dur) {
- if (trigger.u.rel_duration.is_neg)
- str = g_strdup_printf (_("%s %s before the start of the appointment"),
- base, dur);
- else
- str = g_strdup_printf (_("%s %s after the start of the appointment"),
- base, dur);
-
- g_free (dur);
- } else
- str = g_strdup_printf (_("%s at the start of the appointment"), base);
-
- break;
-
- case CAL_ALARM_TRIGGER_RELATIVE_END:
- dur = get_alarm_duration_string (&trigger.u.rel_duration);
-
- if (dur) {
- if (trigger.u.rel_duration.is_neg)
- str = g_strdup_printf (_("%s %s before the end of the appointment"),
- base, dur);
- else
- str = g_strdup_printf (_("%s %s after the end of the appointment"),
- base, dur);
-
- g_free (dur);
- } else
- str = g_strdup_printf (_("%s at the end of the appointment"), base);
-
- break;
-
- case CAL_ALARM_TRIGGER_ABSOLUTE: {
- struct icaltimetype itt;
- icaltimezone *utc_zone, *current_zone;
- char *location;
- struct tm tm;
- char buf[256];
-
- /* Absolute triggers come in UTC, so convert them to the local timezone */
-
- itt = trigger.u.abs_time;
-
- utc_zone = icaltimezone_get_utc_timezone ();
- location = calendar_config_get_timezone ();
- current_zone = icaltimezone_get_builtin_timezone (location);
-
- tm = icaltimetype_to_tm_with_zone (&itt, utc_zone, current_zone);
-
- e_time_format_date_and_time (&tm, calendar_config_get_24_hour_format (),
- FALSE, FALSE, buf, sizeof (buf));
-
- str = g_strdup_printf (_("%s at %s"), base, buf);
-
- break; }
-
- case CAL_ALARM_TRIGGER_NONE:
- default:
- str = g_strdup_printf (_("%s for an unknown trigger type"), base);
- break;
- }
+ AlarmPagePrivate *priv;
+ CalClient *client;
+ GtkCList *clist;
+
+ priv = apage->priv;
+
+ client = COMP_EDITOR_PAGE (apage)->client;
+ clist = GTK_CLIST (priv->list);
- return str;
+ gtk_widget_set_sensitive (priv->add, cal_client_get_one_alarm_only (client) && clist->rows > 0 ? FALSE : TRUE);
+ gtk_widget_set_sensitive (priv->delete, clist->rows > 0 ? TRUE : FALSE);
}
/* Appends an alarm to the list */
@@ -479,7 +337,8 @@ append_reminder (AlarmPage *apage, CalComponentAlarm *alarm)
e_alarm_list_append (priv->list_store, &iter, alarm);
gtk_tree_selection_select_iter (gtk_tree_view_get_selection (view), &iter);
- gtk_widget_set_sensitive (priv->delete, TRUE);
+
+ sensitize_buttons (apage);
}
/* fill_widgets handler for the alarm page */
@@ -488,10 +347,12 @@ alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
{
AlarmPage *apage;
AlarmPagePrivate *priv;
+ GtkWidget *menu;
CalComponentText text;
GList *alarms, *l;
CompEditorPageDates dates;
-
+ int i;
+
apage = ALARM_PAGE (page);
priv = apage->priv;
@@ -533,6 +394,16 @@ alarm_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
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 (cal_client_get_static_capability (page->client, action_map_cap[i]))
+ gtk_widget_set_sensitive (l->data, FALSE);
+ else
+ gtk_widget_set_sensitive (l->data, TRUE);
+ }
+
+
priv->updating = FALSE;
}
@@ -718,7 +589,8 @@ add_clicked_cb (GtkButton *button, gpointer data)
AlarmPagePrivate *priv;
CalComponentAlarm *alarm;
CalAlarmTrigger trigger;
-
+ CalAlarmAction action;
+
apage = ALARM_PAGE (data);
priv = apage->priv;
@@ -752,7 +624,24 @@ add_clicked_cb (GtkButton *button, gpointer data)
}
cal_component_alarm_set_trigger (alarm, trigger);
- cal_component_alarm_set_action (alarm, e_dialog_option_menu_get (priv->action, action_map));
+ action = e_dialog_option_menu_get (priv->action, action_map);
+ cal_component_alarm_set_action (alarm, action);
+ if (action == CAL_ALARM_EMAIL && !cal_component_alarm_has_attendees (alarm)) {
+ const char *email;
+
+ email = cal_client_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client);
+ if (email != NULL) {
+ CalComponentAttendee *a;
+ GSList attendee_list;
+
+ a = g_new0 (CalComponentAttendee, 1);
+ a->value = email;
+ attendee_list.data = a;
+ attendee_list.next = NULL;
+ cal_component_alarm_set_attendee_list (alarm, &attendee_list);
+ g_free (a);
+ }
+ }
append_reminder (apage, alarm);
}
@@ -787,12 +676,10 @@ delete_clicked_cb (GtkButton *button, gpointer data)
valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->list_store), &iter, path);
}
- if (valid_iter) {
+ if (valid_iter)
gtk_tree_selection_select_iter (selection, &iter);
- gtk_widget_set_sensitive (priv->delete, TRUE);
- }
- else
- gtk_widget_set_sensitive (priv->delete, FALSE);
+
+ sensitize_buttons (apage);
gtk_tree_path_free (path);
}
@@ -803,14 +690,18 @@ button_options_clicked_cb (GtkWidget *widget, gpointer data)
{
AlarmPage *apage;
AlarmPagePrivate *priv;
-
+ gboolean repeat;
+ const char *email;
+
apage = ALARM_PAGE (data);
priv = apage->priv;
cal_component_alarm_set_action (priv->alarm,
e_dialog_option_menu_get (priv->action, action_map));
- if (!alarm_options_dialog_run (priv->alarm))
+ repeat = !cal_client_get_static_capability (COMP_EDITOR_PAGE (apage)->client, "no-alarm-repeat");
+ email = cal_client_get_alarm_email_address (COMP_EDITOR_PAGE (apage)->client);
+ if (!alarm_options_dialog_run (priv->alarm, email, repeat))
g_message ("button_options_clicked_cb(): Could not create the alarm options dialog");
}
@@ -830,8 +721,6 @@ init_widgets (AlarmPage *apage)
g_signal_connect ((priv->delete), "clicked",
G_CALLBACK (delete_clicked_cb), apage);
- gtk_widget_set_sensitive (priv->delete, FALSE);
-
/* Connect the default signal handler to use to make sure we notify
* upstream of changes to the widget values.
*/
@@ -859,6 +748,7 @@ init_widgets (AlarmPage *apage)
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);
+ sensitize_buttons (apage);
#if 0
/* If we want the alarm setup widgets to reflect the currently selected alarm, we
* need to do something like this */
diff --git a/calendar/gui/dialogs/alarm-page.glade b/calendar/gui/dialogs/alarm-page.glade
index 7de2ffe39e..cb4509abe2 100644
--- a/calendar/gui/dialogs/alarm-page.glade
+++ b/calendar/gui/dialogs/alarm-page.glade
@@ -1,454 +1,490 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
- <widget class="GtkWindow" id="alarm-toplevel">
- <property name="visible">no</property>
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">no</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">yes</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child>
- <widget class="GtkVBox" id="alarm-page">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame33">
- <property name="label" translatable="yes">Basics</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table13">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">2</property>
- <property name="n-rows">2</property>
- <property name="n-columns">2</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label62">
- <property name="label" translatable="yes">Summary:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label63">
- <property name="label" translatable="yes">Date/Time:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="summary">
- <property name="label" translatable="yes"></property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- <property name="width-request">10</property>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="date-time">
- <property name="label" translatable="yes"></property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">no</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- <property name="width-request">10</property>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame34">
- <property name="label" translatable="yes">Reminders</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox53">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox54">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkOptionMenu" id="action">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="label" translatable="yes">Display a message</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="label" translatable="yes">Play a sound</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="label" translatable="yes">Run a program</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="interval-value">
- <property name="can_focus">yes</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">yes</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="wrap">no</property>
- <property name="snap_to_ticks">no</property>
- <property name="visible">yes</property>
- <property name="adjustment">1 0 999 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="value-units">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget5">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget6">
- <property name="label" translatable="yes">minute(s)</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget7">
- <property name="label" translatable="yes">hour(s)</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="label" translatable="yes">day(s)</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="relative">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget9">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget10">
- <property name="label" translatable="yes">before</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget11">
- <property name="label" translatable="yes">after</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="time">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget12">
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget13">
- <property name="label" translatable="yes">start of appointment</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget14">
- <property name="label" translatable="yes">end of appointment</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-options">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Options...</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox55">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow13">
- <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="visible">yes</property>
-
- <child>
- <widget class="GtkTreeView" id="list">
- <property name="can_focus">yes</property>
- <property name="headers-visible">no</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label64">
- <property name="child_name">CList:title</property>
- <property name="label" translatable="yes">label55</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget15">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget16">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox2">
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">10</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="add">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Add</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="delete">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Delete</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
+
+<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">4</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</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">4</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">2</property>
+ <property name="column_spacing">2</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">4</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox54">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</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">Display a message</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">0</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">10</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="label" translatable="yes">_Add</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ </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" translatable="yes">_Delete</property>
+ <property name="use_underline">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/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index a0e84b4421..442426fa5d 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -41,12 +41,15 @@
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-cancel_component_dialog (CalComponent *comp, gboolean deleting)
+cancel_component_dialog (CalClient *client, CalComponent *comp, gboolean deleting)
{
GtkWidget *dialog;
CalComponentVType vtype;
char *str;
+ if (deleting && cal_client_get_save_schedules (client))
+ return TRUE;
+
vtype = cal_component_get_vtype (comp);
switch (vtype) {
diff --git a/calendar/gui/dialogs/cancel-comp.h b/calendar/gui/dialogs/cancel-comp.h
index b05d6a5cab..9c31a49fd8 100644
--- a/calendar/gui/dialogs/cancel-comp.h
+++ b/calendar/gui/dialogs/cancel-comp.h
@@ -22,8 +22,9 @@
#define CANCEL_COMP_H
#include <glib.h>
+#include <cal-client/cal-client.h>
#include <cal-util/cal-component.h>
-gboolean cancel_component_dialog (CalComponent *comp, gboolean deleting);
+gboolean cancel_component_dialog (CalClient *client, CalComponent *comp, gboolean deleting);
#endif
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 7d619380b7..af97707f9e 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -47,6 +47,7 @@
#include "send-comp.h"
#include "changed-comp.h"
#include "cancel-comp.h"
+#include "recur-comp.h"
#include "comp-editor.h"
@@ -73,6 +74,8 @@ struct _CompEditorPrivate {
gboolean changed;
gboolean needs_send;
+ CalObjModType mod;
+
gboolean existing_org;
gboolean user_org;
@@ -227,6 +230,7 @@ comp_editor_init (CompEditor *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;
@@ -302,7 +306,7 @@ save_comp (CompEditor *editor)
}
/* If we are not the organizer, we don't update the sequence number */
- if (!cal_component_has_organizer (clone) || itip_organizer_is_user (clone))
+ if (!cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client))
cal_component_commit_sequence (clone);
else
cal_component_abort_sequence (clone);
@@ -312,7 +316,10 @@ save_comp (CompEditor *editor)
priv->updating = TRUE;
- result = cal_client_update_object (priv->client, priv->comp);
+ if (cal_component_is_instance (priv->comp))
+ result = cal_client_update_object_with_mod (priv->client, priv->comp, priv->mod);
+ else
+ result = cal_client_update_object (priv->client, priv->comp);
if (result != CAL_CLIENT_RESULT_SUCCESS) {
GtkWidget *dlg;
char *msg;
@@ -359,8 +366,8 @@ save_comp_with_send (CompEditor *editor)
if (!save_comp (editor))
return FALSE;
- if (send && send_component_dialog (priv->comp, !priv->existing_org)) {
- if (itip_organizer_is_user (priv->comp))
+ if (send && send_component_dialog (priv->client, priv->comp, !priv->existing_org)) {
+ if (itip_organizer_is_user (priv->comp, priv->client))
return comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REQUEST);
else
return comp_editor_send_comp (editor, CAL_COMPONENT_METHOD_REPLY);
@@ -396,6 +403,10 @@ prompt_to_save_changes (CompEditor *editor, gboolean send)
switch (save_component_dialog (GTK_WINDOW (editor))) {
case 0: /* Save */
+ if (cal_component_is_instance (priv->comp))
+ if (!recur_component_dialog (priv->comp, &priv->mod, GTK_WINDOW (editor)))
+ return FALSE;
+
if (send && save_comp_with_send (editor))
return TRUE;
else if (!send && save_comp (editor))
@@ -919,9 +930,9 @@ real_edit_comp (CompEditor *editor, CalComponent *comp)
if (comp)
priv->comp = cal_component_clone (comp);
-
+
priv->existing_org = cal_component_has_organizer (comp);
- priv->user_org = itip_organizer_is_user (comp);
+ priv->user_org = itip_organizer_is_user (comp, priv->client);
priv->warned = FALSE;
set_title_from_comp (editor);
@@ -1173,9 +1184,16 @@ static void
save_cmd (GtkWidget *widget, gpointer data)
{
CompEditor *editor = COMP_EDITOR (data);
+ CompEditorPrivate *priv;
+
+ priv = editor->priv;
commit_all_fields (editor);
+ if (cal_component_is_instance (priv->comp))
+ if (!recur_component_dialog (priv->comp, &priv->mod, GTK_WINDOW (editor)))
+ return;
+
save_comp_with_send (editor);
}
@@ -1183,9 +1201,16 @@ static void
save_close_cmd (GtkWidget *widget, gpointer data)
{
CompEditor *editor = COMP_EDITOR (data);
-
+ CompEditorPrivate *priv;
+
+ priv = editor->priv;
+
commit_all_fields (editor);
+ if (cal_component_is_instance (priv->comp))
+ if (!recur_component_dialog (priv->comp, &priv->mod, GTK_WINDOW (editor)))
+ return;
+
if (save_comp_with_send (editor))
close_dialog (editor);
}
@@ -1236,8 +1261,8 @@ delete_cmd (GtkWidget *widget, gpointer data)
vtype = 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)
- && cancel_component_dialog (priv->comp, TRUE))
+ if (itip_organizer_is_user (priv->comp, priv->client)
+ && cancel_component_dialog (priv->client, priv->comp, TRUE))
itip_send_comp (CAL_COMPONENT_METHOD_CANCEL, priv->comp, priv->client, NULL);
delete_comp (editor);
@@ -1304,7 +1329,7 @@ page_changed_cb (GtkObject *obj, gpointer data)
if (!priv->warned && priv->existing_org && !priv->user_org) {
e_notice (NULL, GTK_MESSAGE_INFO,
- _("Changes made to this item may be discarded if an update arrives via email"));
+ _("Changes made to this item may be discarded if an update arrives"));
priv->warned = TRUE;
}
@@ -1328,7 +1353,7 @@ page_summary_changed_cb (GtkObject *obj, const char *summary, gpointer data)
if (!priv->warned && priv->existing_org && !priv->user_org) {
e_notice (NULL, GTK_MESSAGE_INFO,
- _("Changes made to this item may be discarded if an update arrives via email"));
+ _("Changes made to this item may be discarded if an update arrives"));
priv->warned = TRUE;
}
}
@@ -1352,7 +1377,7 @@ page_dates_changed_cb (GtkObject *obj,
if (!priv->warned && priv->existing_org && !priv->user_org) {
e_notice (NULL, GTK_MESSAGE_INFO,
- _("Changes made to this item may be discarded if an update arrives via email"));
+ _("Changes made to this item may be discarded if an update arrives"));
priv->warned = TRUE;
}
}
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index cc89bd9683..4253ba8889 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -46,7 +46,7 @@ struct _EventEditorPrivate {
SchedulePage *sched_page;
EMeetingModel *model;
-
+
gboolean meeting_shown;
gboolean updating;
};
@@ -257,6 +257,7 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
EventEditor *ee;
EventEditorPrivate *priv;
CalComponentOrganizer organizer;
+ CalClient *client;
GSList *attendees = NULL;
ee = EVENT_EDITOR (editor);
@@ -267,12 +268,13 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
if (parent_class->edit_comp)
parent_class->edit_comp (editor, comp);
+ client = comp_editor_get_cal_client (COMP_EDITOR (editor));
+
/* Get meeting related stuff */
cal_component_get_organizer (comp, &organizer);
cal_component_get_attendee_list (comp, &attendees);
/* Clear things up */
- e_meeting_model_restricted_clear (priv->model);
e_meeting_model_remove_all_attendees (priv->model);
/* Set up the attendees */
@@ -282,6 +284,7 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
priv->meeting_shown = FALSE;
} else {
GSList *l;
+ int row;
if (!priv->meeting_shown) {
comp_editor_append_page (COMP_EDITOR (ee),
@@ -297,39 +300,44 @@ event_editor_edit_comp (CompEditor *editor, CalComponent *comp)
EMeetingAttendee *ia;
ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca));
+ if (!comp_editor_get_user_org (editor))
+ e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
e_meeting_model_add_attendee (priv->model, ia);
-
- g_object_unref((ia));
+
+ g_object_unref(ia);
}
- if (organizer.value != NULL) {
+ /* If we aren't the organizer we can still change our own status */
+ if (!comp_editor_get_user_org (editor)) {
EAccountList *accounts;
EAccount *account;
EIterator *it;
- const char *strip;
- int row;
-
- strip = itip_strip_mailto (organizer.value);
accounts = itip_addresses_get ();
for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) {
+ EMeetingAttendee *ia;
+
account = (EAccount*)e_iterator_get(it);
- if (e_meeting_model_find_attendee (priv->model, account->id->address, &row))
- e_meeting_model_restricted_add (priv->model, row);
+ ia = e_meeting_model_find_attendee (priv->model, account->id->address, &row);
+ if (ia != NULL)
+ e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
}
g_object_unref(it);
+ } else if (cal_client_get_organizer_must_attend (client)) {
+ EMeetingAttendee *ia;
+
+ ia = e_meeting_model_find_attendee (priv->model, organizer.value, &row);
+ if (ia != NULL)
+ e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
}
- if (comp_editor_get_user_org (editor))
- e_meeting_model_restricted_clear (priv->model);
-
priv->meeting_shown = TRUE;
}
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));
+ comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown && itip_organizer_is_user (comp, client));
priv->updating = FALSE;
}
@@ -469,7 +477,7 @@ cancel_meeting_cmd (GtkWidget *widget, gpointer data)
CalComponent *comp;
comp = comp_editor_get_current_comp (COMP_EDITOR (ee));
- if (cancel_component_dialog (comp, FALSE)) {
+ if (cancel_component_dialog (comp_editor_get_cal_client (COMP_EDITOR (ee)), comp, FALSE)) {
comp_editor_send_comp (COMP_EDITOR (ee), CAL_COMPONENT_METHOD_CANCEL);
comp_editor_delete_comp (COMP_EDITOR (ee));
}
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index e9bc511ece..a7e1655c5a 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -67,7 +67,8 @@ struct _EventPagePrivate {
GtkWidget *classification_public;
GtkWidget *classification_private;
GtkWidget *classification_confidential;
-
+
+ GtkWidget *show_time_frame;
GtkWidget *show_time_as_free;
GtkWidget *show_time_as_busy;
@@ -164,6 +165,7 @@ event_page_init (EventPage *epage)
priv->classification_public = NULL;
priv->classification_private = NULL;
priv->classification_confidential = NULL;
+ priv->show_time_frame = NULL;
priv->show_time_as_free = NULL;
priv->show_time_as_busy = NULL;
priv->contacts_btn = NULL;
@@ -454,7 +456,7 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
const char *location;
const char *categories;
GSList *l;
-
+
g_return_if_fail (page->client != NULL);
epage = EVENT_PAGE (page);
@@ -539,8 +541,10 @@ event_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
transparency_map);
break;
}
-
-
+ if (cal_client_get_static_capability (page->client, "no-transparency"))
+ gtk_widget_hide (priv->show_time_frame);
+ else
+ gtk_widget_show (priv->show_time_frame);
/* Categories */
cal_component_get_categories (comp, &categories);
@@ -791,6 +795,7 @@ get_widgets (EventPage *epage)
priv->classification_private = GW ("classification-private");
priv->classification_confidential = GW ("classification-confidential");
+ 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");
@@ -813,6 +818,7 @@ get_widgets (EventPage *epage)
&& priv->classification_public
&& priv->classification_private
&& priv->classification_confidential
+ && priv->show_time_frame
&& priv->show_time_as_free
&& priv->show_time_as_busy
&& priv->contacts_btn
diff --git a/calendar/gui/dialogs/event-page.glade b/calendar/gui/dialogs/event-page.glade
index 590d744f4a..6693c8af65 100644
--- a/calendar/gui/dialogs/event-page.glade
+++ b/calendar/gui/dialogs/event-page.glade
@@ -1,599 +1,662 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
- <widget class="GtkWindow" id="event-toplevel">
- <property name="visible">no</property>
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">no</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">yes</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child>
- <widget class="GtkVBox" id="event-page">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">6</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table11">
- <property name="homogeneous">no</property>
- <property name="row_spacing">4</property>
- <property name="column_spacing">4</property>
- <property name="n-rows">2</property>
- <property name="n-columns">2</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label56">
- <property name="label" translatable="yes">Su_mmary:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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>
- <property name="visible">yes</property>
- <property name="use_underline">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="general-summary">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label61">
- <property name="label" translatable="yes">L_ocation:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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>
- <property name="visible">yes</property>
- <property name="use_underline">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="location">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame31">
- <property name="label" translatable="yes">Date &amp; Time</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTable" id="table12">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">4</property>
- <property name="column_spacing">4</property>
- <property name="n-rows">2</property>
- <property name="n-columns">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label57">
- <property name="label" translatable="yes">_Start time:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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>
- <property name="visible">yes</property>
- <property name="use_underline">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label58">
- <property name="label" translatable="yes">_End time:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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>
- <property name="visible">yes</property>
- <property name="use_underline">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="start-time">
- <property name="can_focus">yes</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>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options"></property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="end-time">
- <property name="can_focus">yes</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="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options"></property>
- <property name="y_options">expand|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="end-timezone">
- <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="visible">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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options"></property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="Custom" id="start-timezone">
- <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="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="xalign">1</property>
- <property name="yalign">7.45058e-09</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkCheckButton" id="all-day-event">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">A_ll day event</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </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="x_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow12">
- <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="visible">yes</property>
-
- <child>
- <widget class="GtkTextView" id="description">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget1">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget2">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox54">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkFrame" id="frame32">
- <property name="label" translatable="yes">Classification</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox52">
- <property name="border_width">2</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="classification-public">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Pu_blic</property>
- <property name="active">yes</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="classification-private">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Pri_vate</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- <property name="group">classification-public</property>
- <property name="use_underline">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="classification-confidential">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Con_fidential</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- <property name="group">classification-public</property>
- <property name="use_underline">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame33">
- <property name="label" translatable="yes">Show Time As</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox55">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkRadioButton" id="show-time-as-free">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">F_ree</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="show-time-as-busy">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">B_usy</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- <property name="group">show-time-as-free</property>
- <property name="use_underline">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox53">
- <property name="homogeneous">no</property>
- <property name="spacing">2</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="contacts-button">
- <property name="can_focus">yes</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label59">
- <property name="label" translatable="yes">_Contacts...</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEventBox" id="contacts-box">
- <property name="visible">yes</property>
-
- <child>
- <placeholder />
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="categories-button">
- <property name="can_focus">yes</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label60">
- <property name="label" translatable="yes">Ca_tegories...</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="categories">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
+
+<widget class="GtkWindow" id="event-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="event-page">
+ <property name="border_width">4</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkTable" id="table11">
+ <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">4</property>
+ <property name="column_spacing">4</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>
+
+ <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="GtkLabel" id="label61">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">L_ocation:</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">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>
+ </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">4</property>
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">4</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">4</property>
+ <property name="column_spacing">4</property>
+
+ <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="label58">
+ <property name="visible">True</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_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">end-time</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="Custom" id="start-time">
+ <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>
+ </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="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="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">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <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>
+
+ <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="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ </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="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>
+ </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">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow12">
+ <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>
+
+ <child>
+ <widget class="GtkHBox" id="hbox54">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkFrame" id="frame32">
+ <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="hbox52">
+ <property name="border_width">2</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <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="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="GtkRadioButton" id="classification-confidential">
+ <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>
+ </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="label63">
+ <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="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="GtkHBox" id="hbox55">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
+
+ <child>
+ <widget class="GtkRadioButton" id="show-time-as-free">
+ <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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkRadioButton" id="show-time-as-busy">
+ <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>
+ </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">Show Time As</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>
+ </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">2</property>
+
+ <child>
+ <widget class="GtkButton" id="contacts-button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Contacts...</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+
+ <child>
+ <widget class="GtkLabel" id="label59">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Contacts...</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">4</property>
+ <property name="ypad">0</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="GtkEventBox" id="contacts-box">
+ <property name="visible">True</property>
+
+ <child>
+ <placeholder/>
+ </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="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>
+
+ <child>
+ <widget class="GtkLabel" id="label60">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Ca_tegories...</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">4</property>
+ <property name="ypad">0</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="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>
+ </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/meeting-page.c b/calendar/gui/dialogs/meeting-page.c
index 7203792224..1e5abe9a10 100644
--- a/calendar/gui/dialogs/meeting-page.c
+++ b/calendar/gui/dialogs/meeting-page.c
@@ -333,8 +333,10 @@ meeting_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
gtk_widget_hide (priv->organizer_table);
gtk_widget_show (priv->existing_organizer_table);
- if (itip_organizer_is_user (comp)) {
+ if (itip_organizer_is_user (comp, page->client)) {
gtk_widget_show (priv->invite);
+ if (cal_client_get_static_capability (page->client, "organizer-not-email-address"))
+ gtk_widget_hide (priv->existing_organizer_btn);
e_meeting_model_etable_click_to_add (priv->model, TRUE);
} else {
gtk_widget_hide (priv->invite);
@@ -661,20 +663,25 @@ right_click_cb (ETable *etable, gint row, gint col, GdkEvent *event, gpointer da
MeetingPage *mpage = MEETING_PAGE (data);
MeetingPagePrivate *priv;
GtkMenu *menu;
- int enable_mask = 0, hide_mask = 0, view_row;
+ EMeetingAttendee *ia;
+ int disable_mask = 0, hide_mask = 0, view_row;
priv = mpage->priv;
view_row = e_table_model_to_view_row (etable, row);
priv->row = e_meeting_model_etable_view_to_model_row (etable, priv->model, view_row);
-
+
+ ia = e_meeting_model_find_attendee_at_row (priv->model, priv->row);
+ if (e_meeting_attendee_get_edit_level (ia) != E_MEETING_ATTENDEE_EDIT_FULL)
+ disable_mask = CAN_DELETE;
+
/* FIXME: if you enable Delegate, then change index to '1'.
* (This has now been enabled). */
/* context_menu[1].pixmap_widget = gnome_stock_new_with_icon (GNOME_STOCK_MENU_TRASH); */
context_menu[1].pixmap_widget =
gtk_image_new_from_stock (GTK_STOCK_DELETE, GTK_ICON_SIZE_MENU);
- menu = e_popup_menu_create (context_menu, enable_mask, hide_mask, data);
+ menu = e_popup_menu_create (context_menu, disable_mask, hide_mask, data);
e_auto_kill_popup_menu_on_selection_done (menu);
gtk_menu_popup (menu, NULL, NULL, NULL, NULL,
diff --git a/calendar/gui/dialogs/meeting-page.h b/calendar/gui/dialogs/meeting-page.h
index 80abae58da..2a209b586b 100644
--- a/calendar/gui/dialogs/meeting-page.h
+++ b/calendar/gui/dialogs/meeting-page.h
@@ -25,6 +25,7 @@
#define MEETING_PAGE_H
#include "../e-meeting-model.h"
+#include "../itip-utils.h"
#include "comp-editor-page.h"
G_BEGIN_DECLS
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 6370326af9..1a7c5533fd 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -410,30 +410,6 @@ clear_widgets (RecurrencePage *rpage)
e_date_time_list_clear (priv->exception_list_store);
}
-/* Builds a static string out of an exception date */
-static char *
-get_exception_string (CalComponentDateTime *dt)
-{
- static char buf[256];
- struct tm tmp_tm;
-
- tmp_tm.tm_year = dt->value->year - 1900;
- tmp_tm.tm_mon = dt->value->month - 1;
- tmp_tm.tm_mday = dt->value->day;
- tmp_tm.tm_hour = dt->value->hour;
- tmp_tm.tm_min = dt->value->minute;
- tmp_tm.tm_sec = dt->value->second;
- tmp_tm.tm_isdst = -1;
-
- tmp_tm.tm_wday = time_day_of_week (dt->value->day,
- dt->value->month - 1,
- dt->value->year);
-
- e_time_format_date_and_time (&tmp_tm, calendar_config_get_24_hour_format(), FALSE, FALSE, buf, sizeof (buf));
-
- return buf;
-}
-
/* Appends an exception date to the list */
static void
append_exception (RecurrencePage *rpage, CalComponentDateTime *datetime)
@@ -527,6 +503,12 @@ sensitize_recur_widgets (RecurrencePage *rpage)
type = e_dialog_radio_get (priv->none, type_map);
+ /* We can't preview that well for instances right now */
+ if (cal_component_is_instance (priv->comp))
+ gtk_widget_set_sensitive (priv->preview_calendar, FALSE);
+ else
+ gtk_widget_set_sensitive (priv->preview_calendar, TRUE);
+
if (GTK_BIN (priv->custom_warning_bin)->child)
gtk_widget_destroy (GTK_BIN (priv->custom_warning_bin)->child);
@@ -821,7 +803,7 @@ fill_component (RecurrencePage *rpage, CalComponent *comp)
if (!icaltime_is_valid_time (*dt->value)) {
comp_editor_page_display_validation_error (COMP_EDITOR_PAGE (rpage),
- _("Recurrent date is wrong"),
+ _("Recurrence date is invalid"),
priv->exception_list);
return FALSE;
}
@@ -848,13 +830,14 @@ preview_recur (RecurrencePage *rpage)
CalComponent *comp;
CalComponentDateTime cdt;
GSList *l;
-
+ icaltimezone *zone = NULL;
+
priv = rpage->priv;
/* If our component has not been set yet through ::fill_widgets(), we
* cannot preview the recurrence.
*/
- if (!priv->comp)
+ if (!priv->comp || cal_component_is_instance (priv->comp))
return;
/* Create a scratch component with the start/end and
@@ -865,6 +848,10 @@ preview_recur (RecurrencePage *rpage)
cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
cal_component_get_dtstart (priv->comp, &cdt);
+ if (cdt.tzid != NULL) {
+ if (cal_client_get_timezone (COMP_EDITOR_PAGE (rpage)->client, cdt.tzid, &zone) != CAL_CLIENT_GET_SUCCESS)
+ zone = icaltimezone_get_builtin_timezone_from_tzid (cdt.tzid);
+ }
cal_component_set_dtstart (comp, &cdt);
cal_component_free_datetime (&cdt);
@@ -891,8 +878,8 @@ preview_recur (RecurrencePage *rpage)
fill_component (rpage, comp);
tag_calendar_by_comp (E_CALENDAR (priv->preview_calendar), comp,
- COMP_EDITOR_PAGE (rpage)->client, TRUE, FALSE);
- g_object_unref((comp));
+ COMP_EDITOR_PAGE (rpage)->client, zone, TRUE, FALSE);
+ g_object_unref(comp);
}
/* Callback used when the recurrence weekday picker changes */
@@ -1924,19 +1911,18 @@ recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
/* Update the weekday picker if necessary */
mask = get_start_weekday_mask (priv->comp);
- if (mask == priv->weekday_blocked_day_mask)
- return;
-
- priv->weekday_day_mask = priv->weekday_day_mask | mask;
- priv->weekday_blocked_day_mask = mask;
-
- if (priv->weekday_picker != NULL) {
- weekday_picker_set_days (WEEKDAY_PICKER (priv->weekday_picker),
- priv->weekday_day_mask);
- weekday_picker_set_blocked_days (WEEKDAY_PICKER (priv->weekday_picker),
- priv->weekday_blocked_day_mask);
+ if (mask != priv->weekday_blocked_day_mask) {
+ priv->weekday_day_mask = priv->weekday_day_mask | mask;
+ priv->weekday_blocked_day_mask = mask;
+
+ if (priv->weekday_picker != NULL) {
+ weekday_picker_set_days (WEEKDAY_PICKER (priv->weekday_picker),
+ priv->weekday_day_mask);
+ weekday_picker_set_blocked_days (WEEKDAY_PICKER (priv->weekday_picker),
+ priv->weekday_blocked_day_mask);
+ }
}
-
+
/* Make sure the preview gets updated. */
preview_recur (rpage);
}
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index 01aeef99fd..65fc6bab96 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -41,12 +41,15 @@
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-send_component_dialog (CalComponent *comp, gboolean new)
+send_component_dialog (CalClient *client, CalComponent *comp, gboolean new)
{
GtkWidget *dialog;
CalComponentVType vtype;
char *str;
+ if (cal_client_get_save_schedules (client))
+ return FALSE;
+
vtype = cal_component_get_vtype (comp);
switch (vtype) {
diff --git a/calendar/gui/dialogs/send-comp.h b/calendar/gui/dialogs/send-comp.h
index 9a77d8bd4e..d7e990e5b1 100644
--- a/calendar/gui/dialogs/send-comp.h
+++ b/calendar/gui/dialogs/send-comp.h
@@ -22,8 +22,9 @@
#define SEND_COMP_H
#include <glib.h>
+#include <cal-client/cal-client.h>
#include <cal-util/cal-component.h>
-gboolean send_component_dialog (CalComponent *comp, gboolean new);
+gboolean send_component_dialog (CalClient *client, CalComponent *comp, gboolean new);
#endif
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 9dfea0dd05..629443dba2 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -64,7 +64,6 @@ struct _TaskDetailsPagePrivate {
static const int status_map[] = {
ICAL_STATUS_NONE,
ICAL_STATUS_INPROCESS,
- ICAL_STATUS_NEEDSACTION,
ICAL_STATUS_COMPLETED,
ICAL_STATUS_CANCELLED,
-1
@@ -301,7 +300,7 @@ task_details_page_fill_widgets (CompEditorPage *page, CalComponent *comp)
/* Status. */
cal_component_get_status (comp, &status);
- if (status == ICAL_STATUS_NONE) {
+ if (status == ICAL_STATUS_NONE || status == ICAL_STATUS_NEEDSACTION) {
/* Try to use the percent value. */
if (percent) {
if (*percent == 100)
@@ -541,7 +540,7 @@ date_changed_cb (EDateEdit *dedit, gpointer data)
completed_tt = icaltime_null_time ();
if (status == ICAL_STATUS_COMPLETED) {
e_dialog_option_menu_set (priv->status,
- ICAL_STATUS_NEEDSACTION,
+ ICAL_STATUS_NONE,
status_map);
e_dialog_spin_set (priv->percent_complete, 0);
}
@@ -580,9 +579,6 @@ status_changed (GtkMenu *menu, TaskDetailsPage *tdpage)
e_dialog_spin_set (priv->percent_complete, 0);
e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
complete_date_changed (tdpage, 0, FALSE);
- } else if (status == ICAL_STATUS_NEEDSACTION) {
- e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
- complete_date_changed (tdpage, 0, FALSE);
} else if (status == ICAL_STATUS_INPROCESS) {
e_dialog_spin_set (priv->percent_complete, 50);
e_date_edit_set_time (E_DATE_EDIT (priv->completed_date), ctime);
diff --git a/calendar/gui/dialogs/task-details-page.glade b/calendar/gui/dialogs/task-details-page.glade
index 78352a8449..fba510499d 100644
--- a/calendar/gui/dialogs/task-details-page.glade
+++ b/calendar/gui/dialogs/task-details-page.glade
@@ -1,357 +1,382 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" >
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
- <widget class="GtkWindow" id="task-details-toplevel">
- <property name="visible">no</property>
- <property name="title" translatable="yes">window1</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">no</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">yes</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
- <child>
- <widget class="GtkVBox" id="task-details-page">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
+<widget class="GtkWindow" id="task-details-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="GtkFrame" id="frame2">
- <property name="label" translatable="yes">Progress</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
+ <child>
+ <widget class="GtkVBox" id="task-details-page">
+ <property name="border_width">4</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="homogeneous">no</property>
- <property name="spacing">0</property>
- <property name="visible">yes</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="GtkHBox" id="hbox1">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
- <child>
- <widget class="GtkLabel" id="label17">
- <property name="label" translatable="yes">_Status:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="border_width">4</property>
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">4</property>
- <child>
- <widget class="GtkOptionMenu" id="status">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
+ <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 internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">yes</property>
+ <child>
+ <widget class="GtkOptionMenu" id="status">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">0</property>
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="label" translatable="yes">Not Started</property>
- <property name="visible">yes</property>
- </widget>
- </child>
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget1">
+ <property name="visible">True</property>
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="label" translatable="yes">In Progress</property>
- <property name="visible">yes</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="convertwidget4">
- <property name="label" translatable="yes">Needs Action</property>
- <property name="visible">yes</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="label" translatable="yes">Completed</property>
- <property name="visible">yes</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="label" translatable="yes">Cancelled</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </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>
+ </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="label" translatable="yes">_Priority:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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>
- <property name="visible">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkOptionMenu" id="priority">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
+ <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">yes</property>
+ <child internal-child="menu">
+ <widget class="GtkMenu" id="convertwidget7">
+ <property name="visible">True</property>
- <child>
- <widget class="GtkMenuItem" id="convertwidget8">
- <property name="label" translatable="yes">High</property>
- <property name="visible">yes</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="label" translatable="yes">Normal</property>
- <property name="visible">yes</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="label" translatable="yes">Low</property>
- <property name="visible">yes</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="label" translatable="yes">Undefined</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </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>
+ </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="label" translatable="yes">% Complete</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</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">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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkSpinButton" id="percent-complete">
- <property name="can_focus">yes</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">no</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="wrap">no</property>
- <property name="snap_to_ticks">no</property>
- <property name="visible">yes</property>
- <property name="adjustment">1 0 100 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </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">False</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>
+ </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="GtkTable" id="table1">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
- <property name="n-rows">1</property>
- <property name="n-columns">2</property>
- <property name="visible">yes</property>
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="border_width">4</property>
+ <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="label12">
- <property name="label" translatable="yes">Date Completed:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Date Completed:</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="Custom" id="completed-date">
- <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>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</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">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</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>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
- <child>
- <widget class="GtkTable" id="table2">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">4</property>
- <property name="n-rows">1</property>
- <property name="n-columns">2</property>
- <property name="visible">yes</property>
+ <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>
+ </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">False</property>
+ </packing>
+ </child>
- <child>
- <widget class="GtkLabel" id="label14">
- <property name="label" translatable="yes">URL:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <child>
+ <widget class="GtkTable" id="table2">
+ <property name="border_width">4</property>
+ <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="label14">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">URL:</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="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="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
- <child>
- <widget class="Custom" id="url_entry">
- <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="visible">yes</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_padding">0</property>
- <property name="y_padding">0</property>
- <property name="x_options">expand|fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
</glade-interface>
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 5b76c68c75..0b2aee9827 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -117,7 +117,8 @@ set_menu_sens (TaskEditor *te)
user = comp_editor_get_user_org (COMP_EDITOR (te));
read_only = cal_client_is_read_only (comp_editor_get_cal_client (COMP_EDITOR (te)));
- sens = priv->assignment_shown || read_only;
+ sens = cal_client_get_static_capability (comp_editor_get_cal_client (COMP_EDITOR (te)), "no-task-assignment")
+ || priv->assignment_shown || read_only;
comp_editor_set_ui_prop (COMP_EDITOR (te),
"/commands/ActionAssignTask",
"sensitive", sens ? "0" : "1");
@@ -217,6 +218,7 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
TaskEditor *te;
TaskEditorPrivate *priv;
CalComponentOrganizer organizer;
+ CalClient *client;
GSList *attendees = NULL;
te = TASK_EDITOR (editor);
@@ -227,12 +229,13 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
if (parent_class->edit_comp)
parent_class->edit_comp (editor, comp);
+ client = comp_editor_get_cal_client (COMP_EDITOR (editor));
+
/* Get meeting related stuff */
cal_component_get_organizer (comp, &organizer);
cal_component_get_attendee_list (comp, &attendees);
-
+
/* Clear things up */
- e_meeting_model_restricted_clear (priv->model);
e_meeting_model_remove_all_attendees (priv->model);
if (attendees == NULL) {
@@ -240,7 +243,8 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
priv->assignment_shown = FALSE;
} else {
GSList *l;
-
+ int row;
+
if (!priv->assignment_shown)
comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->meet_page),
@@ -248,39 +252,47 @@ task_editor_edit_comp (CompEditor *editor, CalComponent *comp)
for (l = attendees; l != NULL; l = l->next) {
CalComponentAttendee *ca = l->data;
- EMeetingAttendee *ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca));
-
- e_meeting_model_add_attendee (priv->model, ia);
- g_object_unref((ia));
+ EMeetingAttendee *ia;
+
+ ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_cal_component_attendee (ca));
+ if (!comp_editor_get_user_org (editor))
+ e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ e_meeting_model_add_attendee (priv->model, ia);
+
+ g_object_unref(ia);
}
- if (organizer.value != NULL) {
- const char *strip;
- int row;
+ /* If we aren't the organizer we can still change our own status */
+ if (!comp_editor_get_user_org (editor)) {
+ EAccountList *accounts;
+ EAccount *account;
EIterator *it;
-
- strip = itip_strip_mailto (organizer.value);
-
- for (it = e_list_get_iterator((EList *)itip_addresses_get ());
- e_iterator_is_valid(it);
- e_iterator_next(it)) {
- EAccount *a = (EAccount *)e_iterator_get(it);
-
- if (e_meeting_model_find_attendee (priv->model, a->id->address, &row))
- e_meeting_model_restricted_add (priv->model, row);
- }
+
+ accounts = itip_addresses_get ();
+ for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) {
+ EMeetingAttendee *ia;
+
+ account = (EAccount*)e_iterator_get(it);
+
+ ia = e_meeting_model_find_attendee (priv->model, account->id->address, &row);
+ if (ia != NULL)
+ e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
+ }
g_object_unref(it);
- }
+ } else if (cal_client_get_organizer_must_attend (client)) {
+ EMeetingAttendee *ia;
- if (comp_editor_get_user_org (editor))
- e_meeting_model_restricted_clear (priv->model);
+ ia = e_meeting_model_find_attendee (priv->model, organizer.value, &row);
+ if (ia != NULL)
+ e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ }
priv->assignment_shown = TRUE;
}
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));
+ comp_editor_set_needs_send (COMP_EDITOR (te), priv->assignment_shown && itip_organizer_is_user (comp, client));
priv->updating = FALSE;
}
@@ -414,7 +426,7 @@ cancel_task_cmd (GtkWidget *widget, gpointer data)
CalComponent *comp;
comp = comp_editor_get_current_comp (COMP_EDITOR (te));
- if (cancel_component_dialog (comp, FALSE)) {
+ if (cancel_component_dialog (comp_editor_get_cal_client (COMP_EDITOR (te)), comp, FALSE)) {
comp_editor_send_comp (COMP_EDITOR (te), CAL_COMPONENT_METHOD_CANCEL);
comp_editor_delete_comp (COMP_EDITOR (te));
}