aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-offline-handler.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-05-15 05:34:59 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-05-15 05:34:59 +0800
commit4c65eab5b1429f35b7dcd17c417cc4206989786a (patch)
tree9d53477a3faa4a16e52cb7f0ccf80c7e9bc596ca /shell/e-shell-offline-handler.c
parentf8cc61843c45d07d11872e767c1cee0f16d48409 (diff)
downloadgsoc2013-evolution-4c65eab5b1429f35b7dcd17c417cc4206989786a.tar
gsoc2013-evolution-4c65eab5b1429f35b7dcd17c417cc4206989786a.tar.gz
gsoc2013-evolution-4c65eab5b1429f35b7dcd17c417cc4206989786a.tar.bz2
gsoc2013-evolution-4c65eab5b1429f35b7dcd17c417cc4206989786a.tar.lz
gsoc2013-evolution-4c65eab5b1429f35b7dcd17c417cc4206989786a.tar.xz
gsoc2013-evolution-4c65eab5b1429f35b7dcd17c417cc4206989786a.tar.zst
gsoc2013-evolution-4c65eab5b1429f35b7dcd17c417cc4206989786a.zip
Call e_shell_offline_sync_all_folders() if no connection is reported here.
* e-shell-offline-handler.c (e_shell_offline_handler_put_components_offline): Call e_shell_offline_sync_all_folders() if no connection is reported here. (dialog_handle_ok): Sync all the folders here through e_shell_offline_sync_all_folders(). * e-shell-offline-sync.c: New. * e-shell-offline-sync.h: New. * Evolution-Offline.idl (syncFolder): Make oneway. (cancelSyncFolder): Likewise. (SyncFolderProgressListener::reportSuccess): New method. svn path=/trunk/; revision=16792
Diffstat (limited to 'shell/e-shell-offline-handler.c')
-rw-r--r--shell/e-shell-offline-handler.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/shell/e-shell-offline-handler.c b/shell/e-shell-offline-handler.c
index 4e77bd1eb9..fc26e71a38 100644
--- a/shell/e-shell-offline-handler.c
+++ b/shell/e-shell-offline-handler.c
@@ -24,6 +24,10 @@
#include <config.h>
#endif
+#include "e-shell-offline-handler.h"
+
+#include "e-shell-offline-sync.h"
+
#include <gtk/gtktypeutils.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkwidget.h>
@@ -38,8 +42,6 @@
#include <bonobo/bonobo-main.h>
-#include "e-shell-offline-handler.h"
-
#define GLADE_DIALOG_FILE_NAME EVOLUTION_GLADEDIR "/e-active-connection-dialog.glade"
@@ -573,6 +575,8 @@ dialog_handle_ok (GnomeDialog *dialog,
g_assert (instruction_label != NULL);
g_assert (GTK_IS_LABEL (instruction_label));
+ e_shell_offline_sync_all_folders (priv->shell, GTK_WINDOW (dialog));
+
gtk_label_set_text (GTK_LABEL (instruction_label), _("Closing connections..."));
finalize_offline (offline_handler);
@@ -826,10 +830,13 @@ 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
+ } else {
+ e_shell_offline_sync_all_folders (priv->shell,
+ parent_shell_view ? GTK_WINDOW (parent_shell_view) : NULL);
finalize_offline (offline_handler);
+ }
gtk_object_unref (GTK_OBJECT (offline_handler));
}