aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/gui/event-editor-dialog.glade186
-rw-r--r--calendar/gui/event-editor.c34
3 files changed, 149 insertions, 84 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index aacefff4df..8f3119f0de 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,18 @@
2000-11-12 Federico Mena Quintero <federico@helixcode.com>
+ * gui/event-editor.c (make_recur_ending_count_special): Misspelled
+ "occurrences".
+ (fill_recurrence_widgets): Sensitize the "Custom recurrence" radio
+ button as appropriate.
+ (sensitize_recur_widgets): Resurrected the recurrence custom
+ warning label.
+ (get_widgets): Load the recurrence custom warning bin.
+
+ * gui/event-editor-dialog.glade: Add an empty alignment for the
+ recurrence custom warning label.
+
+2000-11-12 Federico Mena Quintero <federico@helixcode.com>
+
* gui/event-editor.c (recur_preview_date_range_changed_cb): New
function; re-tag the calendar when its date range changes.
(init_widgets): Connect to "date_range_changed" on the recurrence
diff --git a/calendar/gui/event-editor-dialog.glade b/calendar/gui/event-editor-dialog.glade
index b2e5edc426..e12ff96b31 100644
--- a/calendar/gui/event-editor-dialog.glade
+++ b/calendar/gui/event-editor-dialog.glade
@@ -1061,9 +1061,9 @@ Days
<widget>
<class>GtkHBox</class>
- <name>recurrence-params</name>
+ <name>hbox48</name>
<homogeneous>False</homogeneous>
- <spacing>2</spacing>
+ <spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
@@ -1071,107 +1071,137 @@ Days
</child>
<widget>
- <class>GtkLabel</class>
- <name>label46</name>
- <label>Every</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
+ <class>GtkHBox</class>
+ <name>recurrence-params</name>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
- </widget>
- <widget>
- <class>GtkSpinButton</class>
- <name>recurrence-interval-value</name>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>True</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1</value>
- <lower>1</lower>
- <upper>10000</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label46</name>
+ <label>Every</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
- <widget>
- <class>GtkOptionMenu</class>
- <name>recurrence-interval-unit</name>
- <can_focus>True</can_focus>
- <items>day(s)
+ <widget>
+ <class>GtkSpinButton</class>
+ <name>recurrence-interval-value</name>
+ <can_focus>True</can_focus>
+ <climb_rate>1</climb_rate>
+ <digits>0</digits>
+ <numeric>True</numeric>
+ <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+ <snap>False</snap>
+ <wrap>False</wrap>
+ <value>1</value>
+ <lower>1</lower>
+ <upper>10000</upper>
+ <step>1</step>
+ <page>10</page>
+ <page_size>10</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>recurrence-interval-unit</name>
+ <can_focus>True</can_focus>
+ <items>day(s)
week(s)
month(s)
year(s)
</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkAlignment</class>
- <name>recurrence-special</name>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
+ <initial_choice>0</initial_choice>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
<widget>
- <class>Placeholder</class>
+ <class>GtkAlignment</class>
+ <name>recurrence-special</name>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>0</yscale>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
</widget>
- </widget>
- <widget>
- <class>GtkOptionMenu</class>
- <name>recurrence-ending-menu</name>
- <can_focus>True</can_focus>
- <items>for
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>recurrence-ending-menu</name>
+ <can_focus>True</can_focus>
+ <items>for
until
forever
</items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
+ <initial_choice>0</initial_choice>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>recurrence-ending-special</name>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>0</yscale>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+ </widget>
</widget>
<widget>
<class>GtkAlignment</class>
- <name>recurrence-ending-special</name>
- <xalign>0.5</xalign>
+ <name>recurrence-custom-warning-bin</name>
+ <xalign>0</xalign>
<yalign>0.5</yalign>
- <xscale>0</xscale>
- <yscale>0</yscale>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
<child>
<padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
<widget>
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c
index 531bdc24d8..707614e899 100644
--- a/calendar/gui/event-editor.c
+++ b/calendar/gui/event-editor.c
@@ -116,6 +116,7 @@ struct _EventEditorPrivate {
GtkWidget *recurrence_special;
GtkWidget *recurrence_ending_menu;
GtkWidget *recurrence_ending_special;
+ GtkWidget *recurrence_custom_warning_bin;
/* For weekly recurrences, created by hand */
GtkWidget *recurrence_weekday_picker;
@@ -132,7 +133,7 @@ struct _EventEditorPrivate {
GtkWidget *recurrence_ending_date_edit;
time_t recurrence_ending_date;
- /* For ending count of ocurrences, created by hand */
+ /* For ending count of occurrences, created by hand */
GtkWidget *recurrence_ending_count_spin;
int recurrence_ending_count;
@@ -648,7 +649,7 @@ recur_ending_count_value_changed_cb (GtkAdjustment *adj, gpointer data)
preview_recur (ee);
}
-/* Creates the special contents for the ocurrence count case */
+/* Creates the special contents for the occurrence count case */
static void
make_recur_ending_count_special (EventEditor *ee)
{
@@ -671,7 +672,7 @@ make_recur_ending_count_special (EventEditor *ee)
priv->recurrence_ending_count_spin = gtk_spin_button_new (adj, 1, 0);
gtk_box_pack_start (GTK_BOX (hbox), priv->recurrence_ending_count_spin, FALSE, FALSE, 0);
- label = gtk_label_new (_("ocurrences"));
+ label = gtk_label_new (_("occurrences"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show_all (hbox);
@@ -762,22 +763,36 @@ sensitize_recur_widgets (EventEditor *ee)
{
EventEditorPrivate *priv;
enum recur_type type;
+ GtkWidget *label;
priv = ee->priv;
type = e_dialog_radio_get (priv->recurrence_none, recur_type_map);
+ if (GTK_BIN (priv->recurrence_custom_warning_bin)->child)
+ gtk_widget_destroy (GTK_BIN (priv->recurrence_custom_warning_bin)->child);
+
switch (type) {
case RECUR_NONE:
gtk_widget_set_sensitive (priv->recurrence_params, FALSE);
+ gtk_widget_show (priv->recurrence_params);
+ gtk_widget_hide (priv->recurrence_custom_warning_bin);
break;
case RECUR_SIMPLE:
gtk_widget_set_sensitive (priv->recurrence_params, TRUE);
+ gtk_widget_show (priv->recurrence_params);
+ gtk_widget_hide (priv->recurrence_custom_warning_bin);
break;
case RECUR_CUSTOM:
gtk_widget_set_sensitive (priv->recurrence_params, FALSE);
+ gtk_widget_hide (priv->recurrence_params);
+
+ label = gtk_label_new (_("This appointment contains recurrences that Evolution "
+ "cannot edit."));
+ gtk_container_add (GTK_CONTAINER (priv->recurrence_custom_warning_bin), label);
+ gtk_widget_show_all (priv->recurrence_custom_warning_bin);
break;
default:
@@ -891,6 +906,7 @@ get_widgets (EventEditor *ee)
priv->recurrence_special = GW ("recurrence-special");
priv->recurrence_ending_menu = GW ("recurrence-ending-menu");
priv->recurrence_ending_special = GW ("recurrence-ending-special");
+ priv->recurrence_custom_warning_bin = GW ("recurrence-custom-warning-bin");
priv->recurrence_exception_date = GW ("recurrence-exception-date");
priv->recurrence_exception_list = GW ("recurrence-exception-list");
@@ -934,6 +950,7 @@ get_widgets (EventEditor *ee)
&& priv->recurrence_special
&& priv->recurrence_ending_menu
&& priv->recurrence_ending_special
+ && priv->recurrence_custom_warning_bin
&& priv->recurrence_exception_date
&& priv->recurrence_exception_list
&& priv->recurrence_exception_add
@@ -1266,7 +1283,7 @@ fill_ending_date (EventEditor *ee, struct icalrecurrencetype *r)
ending_types_map);
}
} else {
- /* Count of ocurrences */
+ /* Count of occurrences */
priv->recurrence_ending_count = r->count;
e_dialog_option_menu_set (priv->recurrence_ending_menu,
@@ -1405,7 +1422,9 @@ fill_recurrence_widgets (EventEditor *ee)
gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_none), ee);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
-
+
+ gtk_widget_set_sensitive (priv->recurrence_custom, FALSE);
+
sensitize_recur_widgets (ee);
preview_recur (ee);
return;
@@ -1641,7 +1660,9 @@ fill_recurrence_widgets (EventEditor *ee)
gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_none), ee);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
-
+
+ gtk_widget_set_sensitive (priv->recurrence_custom, FALSE);
+
sensitize_recur_widgets (ee);
make_recurrence_special (ee);
@@ -1664,6 +1685,7 @@ fill_recurrence_widgets (EventEditor *ee)
gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_simple), ee);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurrence_custom), ee);
+ gtk_widget_set_sensitive (priv->recurrence_custom, TRUE);
sensitize_recur_widgets (ee);
out: