aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-04-08 03:30:55 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-04-08 03:30:55 +0800
commitc57a7ccfef4a1c9501499378d91e4efbe3d0b606 (patch)
tree2567d177b89b4244dfc25f7110e5281668264ad4 /calendar
parente21dfa011d14bcc964034c646e28f2674183341e (diff)
downloadgsoc2013-evolution-c57a7ccfef4a1c9501499378d91e4efbe3d0b606.tar
gsoc2013-evolution-c57a7ccfef4a1c9501499378d91e4efbe3d0b606.tar.gz
gsoc2013-evolution-c57a7ccfef4a1c9501499378d91e4efbe3d0b606.tar.bz2
gsoc2013-evolution-c57a7ccfef4a1c9501499378d91e4efbe3d0b606.tar.lz
gsoc2013-evolution-c57a7ccfef4a1c9501499378d91e4efbe3d0b606.tar.xz
gsoc2013-evolution-c57a7ccfef4a1c9501499378d91e4efbe3d0b606.tar.zst
gsoc2013-evolution-c57a7ccfef4a1c9501499378d91e4efbe3d0b606.zip
just add the client, we have protection against re-adding it any how
2004-04-07 JP Rosevear <jpr@ximian.com> * gui/e-cal-model.c (e_cal_model_set_default_client): just add the client, we have protection against re-adding it any how (cal_opened_cb): stop listening to the open signal svn path=/trunk/; revision=25359
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/e-cal-model.c24
2 files changed, 17 insertions, 16 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 3e06773bca..467656630a 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,11 @@
2004-04-07 JP Rosevear <jpr@ximian.com>
+ * gui/e-cal-model.c (e_cal_model_set_default_client): just add the
+ client, we have protection against re-adding it any how
+ (cal_opened_cb): stop listening to the open signal
+
+2004-04-07 JP Rosevear <jpr@ximian.com>
+
* gui/gnome-cal.c (gnome_calendar_dayjump): remove extra set view
params
(gnome_calendar_set_view): simplify, just set the current view id
@@ -20,7 +26,8 @@
* gui/e-day-view.c (time_range_changed_cb): only set the selection
if we can't preserve an existing selection
- * gui/control-factory.c (set_prop):
+ * gui/control-factory.c (set_prop): allow list view, remove
+ default view usage
* gui/calendar-config.h: remove protos
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index da375d00e9..c96d3a31f5 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1075,20 +1075,11 @@ e_cal_model_set_default_client (ECalModel *model, ECal *client)
priv = model->priv;
- /* See if we already know about the client */
- for (l = priv->clients; l != NULL; l = l->next) {
- ECalModelClient *client_data = l->data;
-
- if (client == client_data->client)
- found = TRUE;
- }
+ /* Make sure its in the model */
+ e_cal_model_add_client (model, client);
- /* If its not found, add it */
- if (!found)
- e_cal_model_add_client (model, client);
-
- /* Store the default client */
- priv->default_client = client;
+ /* Store the default client */
+ priv->default_client = e_cal_model_get_client_for_uri (model, e_cal_get_uri (client));
}
/**
@@ -1312,7 +1303,7 @@ update_e_cal_view_for_client (ECalModel *model, ECalModelClient *client_data)
/* Skip if this client has not finished loading yet */
if (e_cal_get_load_state (client_data->client) != E_CAL_LOAD_LOADED)
return;
-
+
/* free the previous query, if any */
if (client_data->query) {
g_signal_handlers_disconnect_matched (client_data->query, G_SIGNAL_MATCH_DATA,
@@ -1354,13 +1345,16 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data)
{
ECalModel *model = (ECalModel *) user_data;
ECalModelClient *client_data;
-
+
if (status != E_CALENDAR_STATUS_OK) {
e_cal_model_remove_client (model, client);
return;
}
+ /* Stop listening for this calendar to be opened */
+ g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, cal_opened_cb, model);
+
client_data = find_client_data (model, client);
g_assert (client_data);