From 1cddfbd5e59cc1de55072c79bf44447620f1ebc0 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Tue, 15 Apr 2003 22:26:11 +0000 Subject: If we already have an evolution_dir, free the old one before setting it 2003-04-15 Hans Petter Jansson * gui/calendar-component.c (owner_set_cb): If we already have an evolution_dir, free the old one before setting it anew. * gui/e-day-view-time-item.c (e_day_view_time_item_draw): Unref the metrics. * gui/e-day-view.c (e_day_view_style_set): Unref the metrics. (e_day_view_recalc_cell_sizes): We don't need font metrics here. (e_day_view_reshape_long_event): Ditto. * gui/e-meeting-model.c (init): Don't dup the string passed to e_table_without_hide(). * gui/e-meeting-time-sel.c (e_meeting_time_selector_style_set): Unref the metrics. (e_meeting_time_selector_recalc_date_form): Doesn't need metrics. * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day): Unref the metrics. * gui/e-week-view.c (e_week_view_style_set): Unref metrics. (e_week_view_recalc_cell_sizes): Ditto. (e_week_view_reshape_event_span): Move Pango stuff to where it can't be leaked due to an early return. Unref metrics. * gui/weekday-picker.c (weekday_picker_style_set): Unref metrics. * gui/dialogs/meeting-page.c (meeting_page_finalize): Free default address. svn path=/trunk/; revision=20857 --- calendar/gui/calendar-component.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'calendar/gui/calendar-component.c') diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 7380b7a91e..0d1e06236e 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -60,7 +60,7 @@ #define CREATE_MEETING_ID "meeting" #define CREATE_TASK_ID "task" -char *evolution_dir; +char *evolution_dir = NULL; EvolutionShellClient *global_shell_client = NULL; extern ECompEditorRegistry *comp_editor_registry; @@ -506,6 +506,8 @@ owner_set_cb (EvolutionShellComponent *shell_component, const char *evolution_homedir, gpointer user_data) { + if (evolution_dir) + g_free (evolution_dir); evolution_dir = g_strdup (evolution_homedir); global_shell_client = shell_client; } -- cgit v1.2.3