[evolution-patches] patch for #59386 calendar
- From: chenthill <pchenthill novell com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] patch for #59386 calendar
- Date: Wed, 04 Aug 2004 14:23:17 +0000
hi,
Have attached the patch which will suppress the authentication from
the checklist in the calendar view.
thanks, chenthill.
? :w
? patch
? patch_auth_evo.diff
? patch_calendar_sel.diff
? patch_calendar_selection.diff
? gui/.temp_gw.swp
? gui/check_patch
? gui/groupwise_calendar:
? gui/patch_pass.diff
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2471
diff -u -r1.2471 ChangeLog
--- ChangeLog 2 Aug 2004 18:33:39 -0000 1.2471
+++ ChangeLog 4 Aug 2004 11:51:11 -0000
@@ -1,3 +1,15 @@
+2004-08-04 pchenthill <pchenthill novell com>
+
+ * gui/gnome-cal.c
+ (e_cal_open_async): send TRUE to denote it is from gnome-calendar view
+ for the third argutment.
+ * gui/e-tasks.c
+ (e_cal_open_async): send FALSE for the third argument.
+ * gui/alarm-notify.c
+ (e_cal_open_async): send FALSE for the third argument.
+ * gui/e-cal-model.c
+ (e_cal_open_async): send FALSE for the third argument.
+
2004-08-01 JP Rosevear <jpr novell com>
* conduits/todo/todo-conduit.c (todoconduit_load_configuration):
Index: gui/e-cal-model.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model.c,v
retrieving revision 1.42
diff -u -r1.42 e-cal-model.c
--- gui/e-cal-model.c 2 Aug 2004 07:33:38 -0000 1.42
+++ gui/e-cal-model.c 4 Aug 2004 11:51:12 -0000
@@ -1591,7 +1591,7 @@
update_e_cal_view_for_client (model, client_data);
} else {
g_signal_connect (client, "cal_opened", G_CALLBACK (cal_opened_cb), model);
- e_cal_open_async (client, TRUE);
+ e_cal_open_async (client, TRUE, FALSE);
}
return client_data;
Index: gui/e-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-tasks.c,v
retrieving revision 1.101
diff -u -r1.101 e-tasks.c
--- gui/e-tasks.c 30 Jul 2004 12:43:21 -0000 1.101
+++ gui/e-tasks.c 4 Aug 2004 11:51:12 -0000
@@ -873,7 +873,7 @@
set_status_message (tasks, _("Opening tasks at %s"), e_cal_get_uri (cal));
g_signal_connect (G_OBJECT (cal), "cal_opened", G_CALLBACK (of), tasks);
- e_cal_open_async (cal, only_if_exists);
+ e_cal_open_async (cal, only_if_exists, FALSE);
return TRUE;
}
Index: gui/gnome-cal.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.c,v
retrieving revision 1.348
diff -u -r1.348 gnome-cal.c
--- gui/gnome-cal.c 30 Jul 2004 12:43:21 -0000 1.348
+++ gui/gnome-cal.c 4 Aug 2004 11:51:13 -0000
@@ -2157,7 +2157,7 @@
g_free (msg);
g_signal_connect (G_OBJECT (cal), "cal_opened", G_CALLBACK (of), gcal);
- e_cal_open_async (cal, only_if_exists);
+ e_cal_open_async (cal, only_if_exists, TRUE);
return TRUE;
}
Index: gui/alarm-notify/alarm-notify.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/alarm-notify/alarm-notify.c,v
retrieving revision 1.41
diff -u -r1.41 alarm-notify.c
--- gui/alarm-notify/alarm-notify.c 3 Jun 2004 18:02:37 -0000 1.41
+++ gui/alarm-notify/alarm-notify.c 4 Aug 2004 11:51:13 -0000
@@ -316,7 +316,7 @@
if (client) {
g_hash_table_insert (priv->uri_client_hash, g_strdup (str_uri), client);
g_signal_connect (G_OBJECT (client), "cal_opened", G_CALLBACK (cal_opened_cb), an);
- e_cal_open_async (client, FALSE);
+ e_cal_open_async (client, FALSE, FALSE);
}
}
? patch
? patch_category.diff
? patch_category_recent.diff
? patch_new
? patch_new.diff
? patch_new_auth.diff
? patch_wrong_pass.diff
? ~?
? calendar/patch_60265.diff
? calendar/backends/groupwise/.e-cal-backend-groupwise-utils.c.swp
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.306
diff -u -r1.306 ChangeLog
--- calendar/ChangeLog 4 Aug 2004 05:38:29 -0000 1.306
+++ calendar/ChangeLog 4 Aug 2004 13:44:34 -0000
@@ -1,4 +1,18 @@
2004-08-04 Chenthill Palanisamy <pchenthill novell com>
+
+ Fixes #59386
+ * libecal/e-cal.c
+ (gnome_async_auth_idle_cb): Added to handle the authentication
+ from gnome-calendar view.
+ (AuthStatus): Defined a new structure to store the status, cancelled
+ for various accounts.
+ (ECalAsyncData): added an boolean argument to identify whether the call is
+ from gnome-calendar view.
+ * libecal/e-cal.h
+ (e_cal_open_async): added an boolean argument to identify whether the call is
+ from gnome-calendar view.
+
+2004-08-04 Chenthill Palanisamy <pchenthill novell com>
Fixes #60265
* backends/groupwise/e-cal-backend-groupwise.c
Index: calendar/libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.69
diff -u -r1.69 e-cal.c
--- calendar/libecal/e-cal.c 30 Jul 2004 12:30:43 -0000 1.69
+++ calendar/libecal/e-cal.c 4 Aug 2004 13:44:37 -0000
@@ -1585,6 +1585,7 @@
ECalendarStatus status;
ECalAuthFunc real_auth_func;
gpointer real_auth_user_data;
+ gboolean is_gnome_cal_view;
const char *auth_prompt;
const char *auth_key;
char *password;
@@ -1592,6 +1593,11 @@
GCond *cond;
} ECalAsyncData;
+typedef struct {
+ char *key;
+ gboolean cancelled;
+} AuthStatus;
+
static gboolean
async_auth_idle_cb (gpointer data)
{
@@ -1624,6 +1630,63 @@
return FALSE;
}
+static gboolean
+gnome_async_auth_idle_cb (gpointer data)
+{
+ ECalAsyncData *ccad = data;
+ AuthStatus *auth_info, *temp;
+ ECalPrivate *priv;
+ GList *l;
+ gboolean found = FALSE;
+ char *password;
+ static gboolean authenticating;
+ static GList *list_keys = NULL;
+
+ priv = ccad->ecal->priv;
+
+ if (list_keys) {
+ for(l = list_keys; l ; l = g_list_next (l)) {
+ temp = (AuthStatus *) l->data;
+ if (!strcmp (temp->key,ccad->auth_key)) {
+ auth_info = temp;
+ found = TRUE;
+ break;
+ }
+ found = FALSE;
+ }
+ }
+
+ if (!list_keys || !found) {
+ auth_info = g_new0 (AuthStatus, 1);
+ auth_info->key = ccad->auth_key;
+ auth_info->cancelled = FALSE;
+ list_keys = g_list_append (list_keys, auth_info);
+ }
+
+ if (found) {
+ if (!strcmp("Calendar", e_source_peek_name (priv->source)))
+ auth_info->cancelled = FALSE;
+ }
+
+ if (!authenticating) {
+ g_mutex_lock (ccad->mutex);
+ if (auth_info->cancelled) {
+ password = NULL;
+ } else {
+ authenticating = TRUE;
+ password = ccad->real_auth_func (ccad->ecal, ccad->auth_prompt, ccad->auth_key, ccad->real_auth_user_data);
+ if (!password)
+ auth_info->cancelled = TRUE;
+ authenticating = FALSE;
+ }
+ ccad->password = password;
+ g_mutex_unlock (ccad->mutex);
+ g_cond_signal (ccad->cond);
+ return FALSE;
+ } else
+ return TRUE;
+}
+
static char *
async_auth_func_cb (ECal *ecal, const char *prompt, const char *key, gpointer user_data)
{
@@ -1633,7 +1696,10 @@
ccad->auth_prompt = prompt;
ccad->auth_key = key;
- g_idle_add ((GSourceFunc) async_auth_idle_cb, ccad);
+ if (ccad->is_gnome_cal_view)
+ g_idle_add ((GSourceFunc) gnome_async_auth_idle_cb, ccad);
+ else
+ g_idle_add ((GSourceFunc) async_auth_idle_cb, ccad);
g_mutex_lock (ccad->mutex);
g_cond_wait (ccad->cond, ccad->mutex);
@@ -1665,7 +1731,7 @@
}
void
-e_cal_open_async (ECal *ecal, gboolean only_if_exists)
+e_cal_open_async (ECal *ecal, gboolean only_if_exists, gboolean is_gnome_cal_view)
{
ECalAsyncData *ccad;
GThread *thread;
@@ -1676,6 +1742,7 @@
ccad = g_new0 (ECalAsyncData, 1);
ccad->ecal = g_object_ref (ecal);
ccad->exists = only_if_exists;
+ ccad->is_gnome_cal_view = is_gnome_cal_view;
/* spawn a new thread for opening the calendar */
thread = g_thread_create ((GThreadFunc) open_async, ccad, FALSE, &error);
Index: calendar/libecal/e-cal.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.h,v
retrieving revision 1.19
diff -u -r1.19 e-cal.h
--- calendar/libecal/e-cal.h 2 Jun 2004 16:15:00 -0000 1.19
+++ calendar/libecal/e-cal.h 4 Aug 2004 13:44:37 -0000
@@ -110,7 +110,7 @@
void e_cal_set_auth_func (ECal *ecal, ECalAuthFunc func, gpointer data);
gboolean e_cal_open (ECal *ecal, gboolean only_if_exists, GError **error);
-void e_cal_open_async (ECal *ecal, gboolean only_if_exists);
+void e_cal_open_async (ECal *ecal, gboolean only_if_exists, gboolean is_gnome_cal_view);
gboolean e_cal_remove (ECal *ecal, GError **error);
GList *e_cal_uri_list (ECal *ecal, CalMode mode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]