[evolution-patches] patches for displaying warning for older server version
- From: "Jain Vivek" <jvivek novell com>
- To: <evolution-patches lists ximian com>
- Subject: [evolution-patches] patches for displaying warning for older server version
- Date: Mon, 31 Jan 2005 00:37:25 -0700
hi,
I am sending the following patches to display a warning message to the
user (whenever he logs in) in case the server build he is using is old,
due to which some of the features might not appear/work.
The patches correspond to
patch 1. e-d-s/servers/groupwise/e-gw-connection.[ch] adding a function
to return whether server version is returned by the server (it returns
only in the case of new build)
patch 2 e-d-s/camel : adding an exception type
e-d-s/camel/providers/groupwise/camel-groupwise-store.c :
setting the exception by after checking the version
patch 3 e-d-s/addressbook/libebook : defining new callstatus
e-d-s/addressbook/backends/groupwise/e-book-backend-groupwise.c
returning different call status after checking the server version
patch 4 e-d-s/calendar/libecal : defining new callstatus
e-d-s/calendar/backends/groupwise/e-cal-backend-groupwise.c
: returning different call status after checking the server version
patch 5 evolution/mail defining new warning message, checking the
exception and displaying the warning , clearing the exception
patch 6. evolution/addressbook defining new warning message, checking
the callstatus and displaying the warning
patch 7 evolution/calendar defining new warning message, checking the
callstatus and displaying the warning
Thanks,
Vivek
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/ChangeLog,v
retrieving revision 1.105
diff -r1.105 ChangeLog
0a1,6
> 2005-01-31 Vivek Jain <jvivek novell com>
> * e-gw-connection.[ch] : added a function
> (e_gw_connection_get_version)
> * e-gw-connection.c : added version in _EGwConnectionPrivate
> (e_gw_connection_new): parse response to get server version
>
Index: e-gw-connection.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.h,v
retrieving revision 1.51
diff -r1.51 e-gw-connection.h
92a93
> const char *e_gw_connection_get_version (EGwConnection *cnc);
Index: e-gw-connection.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.c,v
retrieving revision 1.100
diff -r1.100 e-gw-connection.c
49a50
> char *version;
280a282,286
> if (priv->version) {
> g_free (priv->version);
> priv->version = NULL;
> }
>
482a489,496
> param = soup_soap_response_get_first_parameter_by_name (response, "gwVersion");
> if (param) {
> const char *param_value;
> param_value = soup_soap_parameter_get_string_value (param);
> cnc->priv->version = g_strdup (param_value);
> } else
> cnc->priv->version = NULL;
>
1284a1299,1306
> }
>
> const char *
> e_gw_connection_get_version (EGwConnection *cnc)
> {
> g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), NULL);
>
> return (const char *) cnc->priv->version;
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2414
diff -r1.2414 ChangeLog
0a1,7
> 2005-01-31 Vivek Jain <jvivek novell com>
> * camel-exception-list.def : added an exception
> CAMEL_EXCEPTION_SERVICE_VERSION_INVALID
> * /providers/groupwise/camel-groupwise-store.c
> (groupwise_get_folder_info) : set an exception after checking whether
> groupwise server returns the version
>
Index: camel-exception-list.def
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-exception-list.def,v
retrieving revision 1.15
diff -r1.15 camel-exception-list.def
37c37,38
< CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED
---
> CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED,
> CAMEL_EXCEPTION_SERVICE_VERSION_INVALID
Index: providers/groupwise/camel-groupwise-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store.c,v
retrieving revision 1.18
diff -r1.18 camel-groupwise-store.c
754a755,759
>
> camel_exception_clear (ex);
> if (!e_gw_connection_get_version (priv->cnc))
> camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_VERSION_INVALID, _("Some features may not work properly"));
>
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.237
diff -r1.237 ChangeLog
0a1,15
> 2005-01-28 Vivek Jain <jvivek novell com>
>
> * backends/groupwise/e-book-backend-groupwise.c
> e_book_backend_groupwise_authenticate_user: (included one
> condition to check for the server version)
> * idl/Evolution-DataServer-Addressbook.idl
> included InvalidServerVersion in enum callstatus
> * libebook/e-book-tpes.h added enum in callstatus
> * libebook/e-book-listner.c
> (e_book_listner_conver_status): added conversion of InvalidServerVersion
> * libedata-book/e-book-backend.c
> (e_book_backend_open)
> (e_book_backend_load_store) : added InvalidServerVersion as a
> response to be accepted as success
>
Index: idl/Evolution-DataServer-Addressbook.idl
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/idl/Evolution-DataServer-Addressbook.idl,v
retrieving revision 1.6
diff -r1.6 Evolution-DataServer-Addressbook.idl
59c59,60
< OtherError
---
> OtherError,
> InvalidServerVersion
Index: libebook/e-book-types.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book-types.h,v
retrieving revision 1.5
diff -r1.5 e-book-types.h
45c45,47
< E_BOOK_ERROR_OTHER_ERROR
---
> E_BOOK_ERROR_OTHER_ERROR,
> E_BOOK_ERROR_INVALID_SERVER_VERSION
>
Index: libebook/e-book-listener.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book-listener.c,v
retrieving revision 1.13
diff -r1.13 e-book-listener.c
60a61,63
> case GNOME_Evolution_Addressbook_InvalidServerVersion:
> return E_BOOK_ERROR_INVALID_SERVER_VERSION;
>
Index: backends/groupwise/e-book-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/backends/groupwise/e-book-backend-groupwise.c,v
retrieving revision 1.44
diff -r1.44 e-book-backend-groupwise.c
2280a2281,2283
> if (!e_gw_connection_get_version(priv->cnc)) {
> e_data_book_respond_authenticate_user (book, opid, GNOME_Evolution_Addressbook_InvalidServerVersion);
> }
2284c2287
<
---
>
2293a2297,2300
> }
> if ( !e_gw_connection_get_version(priv->cnc)) {
> e_data_book_respond_authenticate_user (book, opid, GNOME_Evolution_Addressbook_InvalidServerVersion);
> return;
Index: libedata-book/e-book-backend.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libedata-book/e-book-backend.c,v
retrieving revision 1.9
diff -r1.9 e-book-backend.c
59c59
< if (status == GNOME_Evolution_Addressbook_Success) {
---
> if (status == GNOME_Evolution_Addressbook_Success || status == GNOME_Evolution_Addressbook_InvalidServerVersion) {
105c105
< if (status == GNOME_Evolution_Addressbook_Success)
---
> if (status == GNOME_Evolution_Addressbook_Success || status == GNOME_Evolution_Addressbook_InvalidServerVersion)
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.398
diff -r1.398 ChangeLog
0a1,11
> 2005-01-31 Vivek Jain <jvivek novell com>
> * idl/Evolution-DataServer-Calendar.idl
> added InvalidServerVersion in the callstatus
> * libecal/e-cal-types.h (added INVALID_SEVER_VERSION)
> * libedata-cal/e-cal-backend.c (convert_status) added
> INVALID_SERVER_VERSION
> * backends/groupwise/e-cal-backend-groupwise.c
> (connect_to_server) return the different callstatus if server doesn't return the
> version
>
>
Index: idl/Evolution-DataServer-Calendar.idl
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/idl/Evolution-DataServer-Calendar.idl,v
retrieving revision 1.8
diff -r1.8 Evolution-DataServer-Calendar.idl
134c134,135
< OtherError
---
> OtherError,
> InvalidServerVersion
Index: libecal/e-cal-types.h
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal-types.h,v
retrieving revision 1.7
diff -r1.7 e-cal-types.h
67c67,69
< E_CALENDAR_STATUS_OTHER_ERROR
---
> E_CALENDAR_STATUS_OTHER_ERROR,
> E_CALENDAR_STATUS_INVALID_SERVER_VERSION
>
Index: backends/groupwise/e-cal-backend-groupwise.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise.c,v
retrieving revision 1.118
diff -r1.118 e-cal-backend-groupwise.c
570a571
>
572a574,576
>
> if (!e_gw_connection_get_version (priv->cnc))
> return GNOME_Evolution_Calendar_InvalidServerVersion;
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3554
diff -r1.3554 ChangeLog
0a1,8
> 2005-01-19 vivek Jain <jvivek novell com>
> * mail/mail-ops.c : (get_folderinfo_got) check for the invalid server
> exception and popup warning message
> * mail/em-folder-tree.c (emft_get_folder_info__get): clear if the
> invalid versoin exception is set
> * mail-erros.xml: included a invalid-server warning
> message
>
Index: mail-errors.xml
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-errors.xml,v
retrieving revision 1.10
diff -r1.10 mail-errors.xml
342a343,349
> <error id="server-version" type="warning">
> <title>Server Version</title>
> <primary>Your server needs to be updated</primary>
> <secondary> Some features may not appear properly with the current version of server</secondary>
> </error>
>
>
Index: mail-ops.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-ops.c,v
retrieving revision 1.443
diff -r1.443 mail-ops.c
40d39
<
1034c1033
< static void
---
> static void
1038c1037
<
---
>
1040,1045c1039,1050
< char *url;
<
< url = camel_service_get_url (CAMEL_SERVICE (m->store));
< w(g_warning ("Error getting folder info from store at %s: %s",
< url, camel_exception_get_description (&mm->ex)));
< g_free (url);
---
> if (camel_exception_get_id (&mm->ex) == CAMEL_EXCEPTION_SERVICE_VERSION_INVALID) {
> e_error_run (NULL, "mail:server-version", NULL);
> camel_exception_clear (&mm->ex);
>
> } else {
> char *url;
>
> url = camel_service_get_url (CAMEL_SERVICE (m->store));
> w(g_warning ("Error getting folder info from store at %s: %s",
> url, camel_exception_get_description (&mm->ex)));
> g_free (url);
> }
1047c1052
<
---
>
Index: em-folder-tree.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-tree.c,v
retrieving revision 1.142
diff -r1.142 em-folder-tree.c
1748a1749,1753
> if (camel_exception_is_set(&mm->ex))
> if (camel_exception_get_id (&mm->ex) == CAMEL_EXCEPTION_SERVICE_VERSION_INVALID) {
> camel_exception_clear (&mm->ex);
> }
>
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1904
diff -u -p -r1.1904 ChangeLog
--- ChangeLog 25 Jan 2005 00:28:13 -0000 1.1904
+++ ChangeLog 31 Jan 2005 06:36:37 -0000
@@ -1,3 +1,9 @@
+2005-01-31 Vivek Jain <jvivek novell com>
+ * gui/component/addressbook.c (load_source_auth_cb)
+ display a warning dialog if the server version is not proper
+ * addressbook-errors.xml added warning message for invalid server version
+
+
2005-01-25 Rodrigo Moya <rodrigo novell com>
* gui/contact-editor/e-contact-editor.c (categories_clicked): use the
Index: addressbook-errors.xml
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/addressbook-errors.xml,v
retrieving revision 1.5
diff -u -p -r1.5 addressbook-errors.xml
--- addressbook-errors.xml 9 Nov 2004 00:40:46 -0000 1.5
+++ addressbook-errors.xml 31 Jan 2005 06:36:37 -0000
@@ -90,4 +90,12 @@
<button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
<button stock="gtk-ok" label="_Add" response="GTK_RESPONSE_YES"/>
</error>
+
+ <error id="server-version" type="warning">
+ <title>Server Version</title>
+ <primary>Your server needs to be updated</primary>
+ <secondary> Some features may not appear properly with the current version of server</secondary>
+ </error>
+
+
</error-list>
Index: gui/component/addressbook.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook.c,v
retrieving revision 1.246
diff -u -p -r1.246 addressbook.c
--- gui/component/addressbook.c 28 Jan 2005 09:15:49 -0000 1.246
+++ gui/component/addressbook.c 31 Jan 2005 06:36:38 -0000
@@ -102,8 +102,15 @@ load_source_auth_cb (EBook *book, EBookS
free_load_source_data (data);
return;
}
- }
- else {
+ } else if (status == E_BOOK_ERROR_INVALID_SERVER_VERSION) {
+ e_error_run (NULL, "addressbook:server-version", NULL);
+
+ if (data->cb)
+ data->cb (book, E_BOOK_ERROR_OK, data->closure);
+ free_load_source_data (data);
+ status = E_BOOK_ERROR_OK;
+ return;
+ } else {
gchar *uri = e_source_get_uri (data->source);
gchar *stripped_uri = remove_parameters_from_uri (uri);
const gchar *auth_domain = e_source_get_property (data->source, "auth-domain");
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2634
diff -r1.2634 ChangeLog
0a1,7
> 2005-01-31 Vivek Jain <jvivek novell com>
> * calendar-errors.xml : added a warning message for invalid server
> version
> * gui/gnome-cal.c (default_client_cal_opened_cb)
> (client_cal_opened_cb): added a case to check the
> call status and display warning
>
Index: calendar-errors.xml
===================================================================
RCS file: /cvs/gnome/evolution/calendar/calendar-errors.xml,v
retrieving revision 1.5
diff -r1.5 calendar-errors.xml
193a194,200
> <error id="server-version" type="warning">
> <title>Server Version</title>
> <primary>Your server needs to be updated</primary>
> <secondary> Some features may not appear properly with the current version of server</secondary>
> </error>
>
>
Index: gui/gnome-cal.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.c,v
retrieving revision 1.359
diff -r1.359 gnome-cal.c
2185a2186,2192
>
> if (status == E_CALENDAR_STATUS_INVALID_SERVER_VERSION) {
> e_error_run (NULL, "calendar:server-version", NULL);
> status = E_CALENDAR_STATUS_OK;
> }
>
>
2265a2273,2277
> if (status == E_CALENDAR_STATUS_INVALID_SERVER_VERSION) {
> e_error_run (NULL, "calendar:server-version", NULL);
> status = E_CALENDAR_STATUS_OK;
>
> }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]