From 6477dd65708b286001b487ca89d4d5066a25bbfd Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 1 Jun 2013 09:10:16 -0400 Subject: Add a boolean return to e_cal_model_add_client(). The function now returns TRUE if the ECalClient was actually added to the model, or FALSE if the model already had the ECalClient. Use this to avoid an unnecessary gnome_calendar_update_query() call in cal_shell_view_selector_client_added_cb(). --- modules/calendar/e-cal-shell-view-private.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/calendar/e-cal-shell-view-private.c') diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index a03da0463f..94176c31f3 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -335,9 +335,8 @@ cal_shell_view_selector_client_added_cb (ECalShellView *cal_shell_view, calendar = e_cal_shell_content_get_calendar (cal_shell_content); model = gnome_calendar_get_model (calendar); - e_cal_model_add_client (model, client); - - gnome_calendar_update_query (calendar); + if (e_cal_model_add_client (model, client)) + gnome_calendar_update_query (calendar); } static void -- cgit v1.2.3