From b3eff205ee1b5608108ca5e8345c08a440a2428e Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 13 Nov 2000 00:51:42 +0000 Subject: Misspelled "occurrences". (fill_recurrence_widgets): Sensitize the "Custom 2000-11-12 Federico Mena Quintero * 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. svn path=/trunk/; revision=6556 --- calendar/ChangeLog | 13 +++ calendar/gui/event-editor-dialog.glade | 186 +++++++++++++++++++-------------- calendar/gui/event-editor.c | 34 ++++-- 3 files changed, 149 insertions(+), 84 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index aacefff4df..8f3119f0de 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,16 @@ +2000-11-12 Federico Mena Quintero + + * 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 * gui/event-editor.c (recur_preview_date_range_changed_cb): New 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 GtkHBox - recurrence-params + hbox48 False - 2 + 0 0 False @@ -1071,107 +1071,137 @@ Days - GtkLabel - label46 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 + GtkHBox + recurrence-params + False + 2 0 False False - - - GtkSpinButton - recurrence-interval-value - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 1 - 1 - 10000 - 1 - 10 - 10 - - 0 - False - False - - + + GtkLabel + label46 + + GTK_JUSTIFY_CENTER + False + 0 + 0.5 + 0 + 0 + + 0 + False + False + + - - GtkOptionMenu - recurrence-interval-unit - True - day(s) + + GtkSpinButton + recurrence-interval-value + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 1 + 1 + 10000 + 1 + 10 + 10 + + 0 + False + False + + + + + GtkOptionMenu + recurrence-interval-unit + True + day(s) week(s) month(s) year(s) - 0 - - 0 - False - False - - - - - GtkAlignment - recurrence-special - 0.5 - 0.5 - 0 - 0 - - 0 - False - False - + 0 + + 0 + False + False + + - Placeholder + GtkAlignment + recurrence-special + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + Placeholder + - - - GtkOptionMenu - recurrence-ending-menu - True - for + + GtkOptionMenu + recurrence-ending-menu + True + for until forever - 0 - - 0 - False - False - + 0 + + 0 + False + False + + + + + GtkAlignment + recurrence-ending-special + 0.5 + 0.5 + 0 + 0 + + 0 + False + False + + + + Placeholder + + GtkAlignment - recurrence-ending-special - 0.5 + recurrence-custom-warning-bin + 0 0.5 - 0 - 0 + 1 + 1 0 - False - False + True + True 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: -- cgit v1.2.3