aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-calendar-view.c8
-rw-r--r--calendar/gui/e-day-view.c11
-rw-r--r--calendar/gui/e-week-view.c12
3 files changed, 31 insertions, 0 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 02e0d57c84..0f854b619b 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1926,6 +1926,14 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
box = gtk_vbox_new (FALSE, 0);
str = icalcomponent_get_summary (pevent->comp_data->icalcomp);
+
+ if (!(str && *str)) {
+ g_object_unref (newcomp);
+ gtk_widget_destroy (box);
+
+ return FALSE;
+ }
+
tmp = g_strdup_printf ("<b>%s</b>", str);
label = gtk_label_new (NULL);
gtk_label_set_line_wrap ((GtkLabel *)label, TRUE);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 6720b08143..3288559b11 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -6331,6 +6331,17 @@ e_day_view_on_editing_stopped (EDayView *day_view,
out:
+ if (event) {
+ if (event->tooltip) {
+ gtk_widget_destroy (event->tooltip);
+ event->tooltip = NULL;
+ }
+
+ if (event->timeout != -1) {
+ g_source_remove (event->timeout);
+ event->timeout = -1;
+ }
+ }
g_object_unref (comp);
g_free (text);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 305af64cd4..41b1d5fae1 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3540,6 +3540,18 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
out:
+ if (event) {
+ if (event->tooltip) {
+ gtk_widget_destroy (event->tooltip);
+ event->tooltip = NULL;
+ }
+
+ if (event->timeout != -1) {
+ g_source_remove (event->timeout);
+ event->timeout = -1;
+ }
+ }
+
g_free (text);
g_object_unref (comp);