aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-08-29 07:27:51 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-29 07:27:51 +0800
commit48ff93b64492c08d82e8452cb6b0e94b8582eb3e (patch)
treecc040d206fa875968c9753a18d510352295887c7 /calendar/gui
parenta4789a176c9b256e018e31ac363ee9847da55500 (diff)
downloadgsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.tar
gsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.tar.gz
gsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.tar.bz2
gsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.tar.lz
gsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.tar.xz
gsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.tar.zst
gsoc2013-evolution-48ff93b64492c08d82e8452cb6b0e94b8582eb3e.zip
New function. We need this from code that dynamically updates from a
2000-08-28 Federico Mena Quintero <federico@helixcode.com> * cal-client/cal-client.c (cal_client_is_loaded): New function. We need this from code that dynamically updates from a client and could not have connected to the "cal_loaded" signal right after the client was created. * gui/calendar-model.c (load_objects): Do not try to load the objects if the client has not been loaded yet. (cal_loaded_cb): Check the status value. * gui/calendar-model.h (CalendarModel): Declare the private structure here so that gdb will give me love. * pcs/cal-factory.h (CalFactory): Likewise. * pcs/cal.h (Cal): Likewise. * cal-client/cal-listener.h (CalListener): Likewise. * cal-client/cal-client.h (CalClient): Likewise. * pcs/cal-backend.h (CalBackend): This no longer has a private structure, so remove it. * cal-util/Makefile.am (libcal_util_la_SOURCES): Removed the vCalendar and old iCalendar cruft. (libcal_utilinclude_HEADERS): Likewise. Removed the obsolete iCalendar test program. svn path=/trunk/; revision=5091
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-model.c12
-rw-r--r--calendar/gui/calendar-model.h4
2 files changed, 12 insertions, 4 deletions
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
index 135f770863..8a6eae5445 100644
--- a/calendar/gui/calendar-model.c
+++ b/calendar/gui/calendar-model.c
@@ -39,7 +39,7 @@
/* Private part of the ECalendarModel structure */
-typedef struct {
+struct _CalendarModelPrivate {
/* Calendar client we are using */
CalClient *client;
@@ -54,7 +54,7 @@ typedef struct {
/* HACK: so that ETable can do its stupid append_row() thing */
guint appending_row : 1;
-} CalendarModelPrivate;
+};
@@ -1443,7 +1443,10 @@ cal_loaded_cb (CalClient *client,
g_return_if_fail (IS_CALENDAR_MODEL (model));
e_table_model_pre_change (E_TABLE_MODEL (model));
- load_objects (model);
+
+ if (status == CAL_CLIENT_LOAD_SUCCESS)
+ load_objects (model);
+
e_table_model_changed (E_TABLE_MODEL (model));
}
@@ -1620,6 +1623,9 @@ load_objects (CalendarModel *model)
priv = model->priv;
+ if (!cal_client_is_loaded (priv->client))
+ return;
+
uids = cal_client_get_uids (priv->client, priv->type);
for (l = uids; l; l = l->next) {
diff --git a/calendar/gui/calendar-model.h b/calendar/gui/calendar-model.h
index d1481a4ece..aeb50b45e6 100644
--- a/calendar/gui/calendar-model.h
+++ b/calendar/gui/calendar-model.h
@@ -40,11 +40,13 @@ BEGIN_GNOME_DECLS
typedef struct _CalendarModel CalendarModel;
typedef struct _CalendarModelClass CalendarModelClass;
+typedef struct _CalendarModelPrivate CalendarModelPrivate;
+
struct _CalendarModel {
ETableModel model;
/* Private data */
- gpointer priv;
+ CalendarModelPrivate *priv;
};
struct _CalendarModelClass {