aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/corba-cal.c
diff options
context:
space:
mode:
authorEskil Heyn Olsen <eskil@src.gnome.org>1999-12-07 11:43:51 +0800
committerEskil Heyn Olsen <eskil@src.gnome.org>1999-12-07 11:43:51 +0800
commitb279ef22cc6ca184d08fc6a46a49756778bebbf6 (patch)
treec3e1821b98946023364b7092f359846582af53ec /calendar/corba-cal.c
parentd9c655cd489e0c2989669005b5fa5415c92f8097 (diff)
downloadgsoc2013-evolution-b279ef22cc6ca184d08fc6a46a49756778bebbf6.tar
gsoc2013-evolution-b279ef22cc6ca184d08fc6a46a49756778bebbf6.tar.gz
gsoc2013-evolution-b279ef22cc6ca184d08fc6a46a49756778bebbf6.tar.bz2
gsoc2013-evolution-b279ef22cc6ca184d08fc6a46a49756778bebbf6.tar.lz
gsoc2013-evolution-b279ef22cc6ca184d08fc6a46a49756778bebbf6.tar.xz
gsoc2013-evolution-b279ef22cc6ca184d08fc6a46a49756778bebbf6.tar.zst
gsoc2013-evolution-b279ef22cc6ca184d08fc6a46a49756778bebbf6.zip
Check if local store is empty. If, force slow sync.
* calendar-conduit.c (pre_sync): Check if local store is empty. If, force slow sync. * GnomeCal.idl (GNOME): Added get_number_of_objects. * corba-cal.c (cal_repo_get_number_of_objects): implemented the get_number_of_objects. * calendar-conduit-control-applet.c (setStateCfg): Fixed bug that caused the capplet to always set the sync action to Disable upon start. svn path=/trunk/; revision=1475
Diffstat (limited to 'calendar/corba-cal.c')
-rw-r--r--calendar/corba-cal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/calendar/corba-cal.c b/calendar/corba-cal.c
index ddeb5ccb45..472d83008e 100644
--- a/calendar/corba-cal.c
+++ b/calendar/corba-cal.c
@@ -210,6 +210,14 @@ cal_repo_get_objects (PortableServer_Servant servant,
return res;
}
+static CORBA_long
+cal_repo_get_number_of_objects (PortableServer_Servant servant,
+ CORBA_Environment *ev)
+{
+ GnomeCalendar *gcal = gnomecal_from_servant (servant);
+ return g_list_length(gcal->cal->events);
+}
+
static GNOME_Calendar_Repository_String_Sequence*
cal_repo_get_object_id_list(PortableServer_Servant servant,
CORBA_Environment *ev)
@@ -281,6 +289,7 @@ init_calendar_repo_class (void)
calendar_repository_epv.delete_object = cal_repo_delete_object;
calendar_repository_epv.update_object = cal_repo_update_object;
calendar_repository_epv.get_objects = cal_repo_get_objects;
+ calendar_repository_epv.get_number_of_objects = cal_repo_get_number_of_objects;
calendar_repository_epv.get_updated_objects = cal_repo_get_updated_objects;
calendar_repository_epv.update_pilot_id = cal_repo_update_pilot_id;
calendar_repository_epv.get_object_id_list = cal_repo_get_object_id_list;