From 05020b82c39a859834995723d5726e026b82de75 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 5 Feb 2003 18:12:34 +0000 Subject: array of localized month day names ("1st" - "31st") * cal-util/cal-recur.c (cal_recur_nth): array of localized month day names ("1st" - "31st") * gui/dialogs/recurrence-page.c (make_recur_month_num_submenu, make_recur_month_num_menu, month_num_menu_selection_done_cb): Use the new cal_recur_nth[] array. The way this was done before didn't localize properly. * gui/alarm-notify/notify-main.c (main): s/glade_gnome_init/glade_init/ From evolution-1-2-branch: * gui/e-itip-control.c (write_recurrence_piece): Describe recurrences, if we can. #30993 (set_date_label): If the meeting has recurrences, call write_recurrence_piece after writing the start and end dates. (write_label_piece): Wrap the timezone in to de-emphasize it a bit and try to keep the timestamp on a single line even with big Outlook timezone names. Add an option to show just the date, for describing the end of recurrences (since the time in the UNTIL is the *beginning* of the last instance, which would confuse people). (update_item): Set the VCALENDAR's METHOD. (ok_clicked_cb): Use update_item, not remove_item, to process a cancelation. Part of #33875. * pcs/cal-backend-file.c (cal_backend_file_cancel_object): New, handle an ICAL_METHOD_CANCEL update. (cal_backend_file_update_objects): Call cal_backend_file_update_object or cal_backend_file_cancel_object as appropriate. svn path=/trunk/; revision=19763 --- calendar/gui/dialogs/recurrence-page.c | 51 +++------------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 162f7a9737..5902e959e7 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include "../calendar-config.h" #include "../tag-calendar.h" @@ -128,40 +129,6 @@ static const int ending_types_map[] = { -1 }; -static const char *date_suffix[] = { - N_("st"), - N_("nd"), - N_("rd"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("st"), - N_("nd"), - N_("rd"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("th"), - N_("st") -}; - /* Private part of the RecurrencePage structure */ struct _RecurrencePagePrivate { /* Component we use to expand the recurrence rules for the preview */ @@ -1004,11 +971,7 @@ make_recur_month_num_submenu (const char *title, int start, int end) submenu = gtk_menu_new (); for (i = start; i < end; i++) { - char *date; - - date = g_strdup_printf ("%d%s", i + 1, _(date_suffix[i])); - item = gtk_menu_item_new_with_label (date); - g_free (date); + item = gtk_menu_item_new_with_label (_(cal_recur_nth[i])); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item); gtk_object_set_user_data (GTK_OBJECT (item), GINT_TO_POINTER (i + 1)); gtk_widget_show (item); @@ -1034,7 +997,6 @@ make_recur_month_num_menu (int month_index) GtkWidget *menu, *submenu, *item, *submenu_item; GtkWidget *omenu; - char *date; int i; menu = gtk_menu_new (); @@ -1047,9 +1009,7 @@ make_recur_month_num_menu (int month_index) } /* Current date */ - date = g_strdup_printf ("%d%s", month_index, _(date_suffix[month_index - 1])); - item = gtk_menu_item_new_with_label (date); - g_free (date); + item = gtk_menu_item_new_with_label (_(cal_recur_nth[month_index - 1])); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show (item); @@ -1131,7 +1091,6 @@ month_num_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) if (month_num == MONTH_NUM_OTHER) { GtkWidget *label, *item; - char *date; item = gtk_menu_get_active (GTK_MENU (menu_shell)); priv->month_index = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (item))); @@ -1140,9 +1099,7 @@ month_num_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map); label = GTK_BIN (priv->month_num_menu)->child; - date = g_strdup_printf ("%d%s", priv->month_index, _(date_suffix[priv->month_index - 1])); - gtk_label_set_text (GTK_LABEL (label), date); - g_free (date); + gtk_label_set_text (GTK_LABEL (label), _(cal_recur_nth[priv->month_index - 1])); e_dialog_option_menu_set (priv->month_num_menu, 0, month_num_options_map); e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map); -- cgit v1.2.3