From f072a1f2fc8d4bedfd9fa5c26b54483a40a374ba Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Fri, 4 May 2007 04:28:14 +0000 Subject: Downstream fixes from OpenSUSE svn path=/trunk/; revision=33481 --- calendar/gui/dialogs/event-editor.c | 2 +- calendar/gui/dialogs/event-page.c | 18 +++++++++++------- calendar/gui/e-cal-component-preview.c | 5 +++-- 3 files changed, 15 insertions(+), 10 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c index 3274dc0f37..5569ab4027 100644 --- a/calendar/gui/dialogs/event-editor.c +++ b/calendar/gui/dialogs/event-editor.c @@ -622,7 +622,7 @@ event_editor_construct (EventEditor *ee, ECal *client) event_page_show_options (priv->event_page); comp_editor_set_group_item (COMP_EDITOR (ee), TRUE); - if (!((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)|| (flags & COMP_EDITOR_NEW_ITEM))) + if (!((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)|| (flags & COMP_EDITOR_NEW_ITEM))) bonobo_ui_component_set_prop (editor->uic, "/commands/ActionFreeBusy", "hidden", "1", NULL); event_page_set_meeting (priv->event_page, TRUE); diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index efb3c95b24..127c741210 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -439,8 +439,8 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD { EventPagePrivate *priv; struct icaltimetype *start_tt, *end_tt, implied_tt; - icaltimezone *start_zone = NULL; - gboolean all_day_event; + icaltimezone *start_zone = NULL, *def_zone = NULL; + gboolean all_day_event, homezone=TRUE; priv = epage->priv; @@ -509,16 +509,20 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD epage); g_signal_handlers_block_matched (priv->end_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); - e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->start_timezone), - start_zone); - event_page_set_show_timezone (epage, calendar_config_get_show_timezone() & !all_day_event); - + if (start_zone) + e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->start_timezone), + start_zone); + def_zone = calendar_config_get_icaltimezone (); + if (!def_zone || !start_zone || strcmp (icaltimezone_get_tzid(def_zone), icaltimezone_get_tzid (start_zone))) + homezone = FALSE; + + event_page_set_show_timezone (epage, (calendar_config_get_show_timezone()|| !homezone) & !all_day_event); + /*unblock the endtimezone widget*/ g_signal_handlers_unblock_matched (priv->end_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_timezone), epage); - priv->sync_timezones = TRUE; } diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c index 3a8e9c7bee..b833ef06ad 100644 --- a/calendar/gui/e-cal-component-preview.c +++ b/calendar/gui/e-cal-component-preview.c @@ -273,11 +273,12 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone gtk_html_stream_printf (stream, ""); for (node = l; node != NULL; node = node->next) { - gint i; + gint i, len; GString *string = g_string_new (NULL);; text = * (ECalComponentText *) node->data; - for (i = 0; i < strlen (text.value ? text.value : 0); i++) { + len = text.value ? strlen (text.value) : 0; + for (i = 0; i ", 4); else if (text.value[i] == '<') -- cgit v1.2.3