From 5eb2d61037720ee2c39fab697f28d02339498c47 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 4 May 2001 17:59:35 +0000 Subject: Use type instead of portNumber. * e-shell-offline-handler.c (update_dialog_clist_hash_foreach, (duplicate_connection_list): Use type instead of portNumber. (e_shell_offline_handler_put_components_offline): Fix the logic of when to show the connection dialog here. (Show it when there *are* connections, not when there aren't.) * Evolution-Offline.idl: Have a "string type" instead of "short portNumber" in Connection. svn path=/trunk/; revision=9676 --- shell/ChangeLog | 11 +++++++++++ shell/Evolution-Offline.idl | 2 +- shell/e-shell-offline-handler.c | 8 ++++---- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 1dccfe0b5e..b210b83efc 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,14 @@ +2001-05-04 Dan Winship + + * e-shell-offline-handler.c (update_dialog_clist_hash_foreach, + (duplicate_connection_list): Use type instead of portNumber. + (e_shell_offline_handler_put_components_offline): Fix the logic of + when to show the connection dialog here. (Show it when there *are* + connections, not when there aren't.) + + * Evolution-Offline.idl: Have a "string type" instead of "short + portNumber" in Connection. + 2001-05-04 Ettore Perazzoli * e-shell-offline-handler.c diff --git a/shell/Evolution-Offline.idl b/shell/Evolution-Offline.idl index 54bee91023..6c86de4289 100644 --- a/shell/Evolution-Offline.idl +++ b/shell/Evolution-Offline.idl @@ -15,7 +15,7 @@ module Evolution { struct Connection { string hostName; - short portNumber; + string type; }; typedef sequence ConnectionList; diff --git a/shell/e-shell-offline-handler.c b/shell/e-shell-offline-handler.c index 929880e0e2..17fd6a6285 100644 --- a/shell/e-shell-offline-handler.c +++ b/shell/e-shell-offline-handler.c @@ -152,8 +152,8 @@ duplicate_connection_list (const GNOME_Evolution_ConnectionList *source) copy->_buffer = CORBA_sequence_GNOME_Evolution_Connection_allocbuf (copy->_maximum); for (i = 0; i < source->_length; i++) { - copy->_buffer[i].hostName = CORBA_string_dup (source->_buffer[i].hostName); - copy->_buffer[i].portNumber = source->_buffer[i].portNumber; + copy->_buffer[i].hostName = CORBA_string_dup (source->_buffer[i].hostName); + copy->_buffer[i].type = CORBA_string_dup (source->_buffer[i].type); } return copy; @@ -508,7 +508,7 @@ update_dialog_clist_hash_foreach (void *key, char *columns[3]; columns[0] = p->hostName; - columns[1] = g_strdup_printf ("%d", p->portNumber); + columns[1] = p->type; columns[2] = NULL; gtk_clist_prepend (GTK_CLIST (clist), columns); @@ -801,7 +801,7 @@ e_shell_offline_handler_put_components_offline (EShellOfflineHandler *offline_ha return; } - if (priv->num_total_connections == 0 && priv->parent_shell_view != NULL) + if (priv->num_total_connections > 0 && priv->parent_shell_view != NULL) pop_up_confirmation_dialog (offline_handler); else finalize_offline (offline_handler); -- cgit v1.2.3