[evolution] Include timezone information in a tooltip when differs from user's



commit 8b65b542f977e04fb938998309d707c7561d027b
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 24 17:59:34 2009 +0200

    Include timezone information in a tooltip when differs from user's
    
    	** Fix for bug #205804
---
 calendar/ChangeLog             |    7 +++++++
 calendar/gui/e-calendar-view.c |   18 +++++++++++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 1d13cca..39de5bd 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,12 @@
 2009-04-24  Milan Crha  <mcrha redhat com>
 
+	** Fix for bug #205804
+
+	* gui/e-calendar-view.c: (e_calendar_view_get_tooltips):
+	Include timezone information in a tooltip when differs from user's.
+
+2009-04-24  Milan Crha  <mcrha redhat com>
+
 	** Fix for bug #577615
 
 	* gui/dialogs/cal-prefs-dialog.h: (struct _CalendarPrefsDialog):
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index a6376a7..6c8e1f8 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -2484,13 +2484,25 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
 	tmp1 = get_label(dtstart.value, zone, default_zone);
 	tmp = calculate_time (t_start, t_end);
 
+	/* To Translators: It will display "Time: ActualStartDateAndTime (DurationOfTheMeeting)"*/
+	tmp2 = g_strdup_printf(_("Time: %s %s"), tmp1, tmp);
+	if (zone && !cal_comp_util_compare_event_timezones (newcomp, client, default_zone)) {
+		g_free (tmp);
+		g_free (tmp1);
+
+		tmp1 = get_label (dtstart.value, zone, zone);
+		tmp = g_strconcat (tmp2, "\n\t[ ", tmp1, " ", icaltimezone_get_display_name (zone), " ]", NULL);
+	} else {
+		g_free (tmp);
+		tmp = tmp2;
+		tmp2 = NULL;
+	}
+
 	e_cal_component_free_datetime (&dtstart);
 	e_cal_component_free_datetime (&dtend);
 
-	/* To Translators: It will display "Time: ActualStartDateAndTime (DurationOfTheMeeting)"*/
-	tmp2 = g_strdup_printf(_("Time: %s %s"), tmp1, tmp);
 	hbox = gtk_hbox_new (FALSE, 0);
-	gtk_box_pack_start ((GtkBox *)hbox, gtk_label_new_with_mnemonic (tmp2), FALSE, FALSE, 0);
+	gtk_box_pack_start ((GtkBox *)hbox, gtk_label_new_with_mnemonic (tmp), FALSE, FALSE, 0);
 	ebox = gtk_event_box_new ();
 	gtk_container_add ((GtkContainer *)ebox, hbox);
 	gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]