aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-01 21:10:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-06-01 22:31:39 +0800
commitc6b96f4e4492552b0a9256140706f7d98bf2bdee (patch)
tree21509c266cc4dfa1d74853ffe0c88ebcf486fa9a /modules
parent2a147de5a11defeec02bd9abad330b453916d378 (diff)
downloadgsoc2013-evolution-c6b96f4e4492552b0a9256140706f7d98bf2bdee.tar
gsoc2013-evolution-c6b96f4e4492552b0a9256140706f7d98bf2bdee.tar.gz
gsoc2013-evolution-c6b96f4e4492552b0a9256140706f7d98bf2bdee.tar.bz2
gsoc2013-evolution-c6b96f4e4492552b0a9256140706f7d98bf2bdee.tar.lz
gsoc2013-evolution-c6b96f4e4492552b0a9256140706f7d98bf2bdee.tar.xz
gsoc2013-evolution-c6b96f4e4492552b0a9256140706f7d98bf2bdee.tar.zst
gsoc2013-evolution-c6b96f4e4492552b0a9256140706f7d98bf2bdee.zip
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(). (cherry picked from commit 6477dd65708b286001b487ca89d4d5066a25bbfd)
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-view-private.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index b0757b0080..37e686e6c9 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -334,9 +334,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