aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-11-26 03:49:49 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-11-26 03:49:49 +0800
commitbe8b31db41061d324023bdf0f931e7152eee5b17 (patch)
treeeaabc1b5961b9d15002a8dca48d1bb0978728087 /shell
parente937e8ddfe8c889ebda128b914050e72f9556f42 (diff)
downloadgsoc2013-evolution-be8b31db41061d324023bdf0f931e7152eee5b17.tar
gsoc2013-evolution-be8b31db41061d324023bdf0f931e7152eee5b17.tar.gz
gsoc2013-evolution-be8b31db41061d324023bdf0f931e7152eee5b17.tar.bz2
gsoc2013-evolution-be8b31db41061d324023bdf0f931e7152eee5b17.tar.lz
gsoc2013-evolution-be8b31db41061d324023bdf0f931e7152eee5b17.tar.xz
gsoc2013-evolution-be8b31db41061d324023bdf0f931e7152eee5b17.tar.zst
gsoc2013-evolution-be8b31db41061d324023bdf0f931e7152eee5b17.zip
(e_shell_offline_sync_all_folders):
Filled in, use GConf. (cleanup): Re-enabled again. (sync_folder): Likewise. (progress_dialog_close_callback): Likewise. (progress_dialog_clicked_callback): Likewise. (setup_dialog): Likewise. (setup_progress_listener): Likewise. (impl_SyncFolderProgressListener_reportFailure): Likewise. (impl_SyncFolderProgressListener_reportSuccess): Likewise. (impl_SyncFolderProgressListener_updateProgress): Likewise. (progress_listener_servant_free): Likewise. (progress_listener_servant_new): Likewise. svn path=/trunk/; revision=18914
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog16
-rw-r--r--shell/e-shell-offline-sync.c56
2 files changed, 33 insertions, 39 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index ee6e38cc50..6852ecbd51 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,21 @@
2002-11-25 Ettore Perazzoli <ettore@ximian.com>
+ * e-shell-offline-sync.c (e_shell_offline_sync_all_folders):
+ Filled in, use GConf.
+ (cleanup): Re-enabled again.
+ (sync_folder): Likewise.
+ (progress_dialog_close_callback): Likewise.
+ (progress_dialog_clicked_callback): Likewise.
+ (setup_dialog): Likewise.
+ (setup_progress_listener): Likewise.
+ (impl_SyncFolderProgressListener_reportFailure): Likewise.
+ (impl_SyncFolderProgressListener_reportSuccess): Likewise.
+ (impl_SyncFolderProgressListener_updateProgress): Likewise.
+ (progress_listener_servant_free): Likewise.
+ (progress_listener_servant_new): Likewise.
+
+2002-11-25 Ettore Perazzoli <ettore@ximian.com>
+
* evolution-storage-set-view.c
(impl_StorageSetView__set_checkedFolders): Updated to pass a
GSList to e_storage_set_view_set_checkboxes_list() [instead of a
diff --git a/shell/e-shell-offline-sync.c b/shell/e-shell-offline-sync.c
index 67e33fd99b..dd10c58db2 100644
--- a/shell/e-shell-offline-sync.c
+++ b/shell/e-shell-offline-sync.c
@@ -31,6 +31,8 @@
#include "Evolution.h"
+#include <gconf/gconf-client.h>
+
#include <gal/widgets/e-gui-utils.h>
#include <gtk/gtklabel.h>
@@ -84,7 +86,6 @@ struct _SyncData {
/* The progress listener interface. */
-#if 0 /* FIXME */
static PortableServer_ServantBase__epv SyncFolderProgressListener_base_epv;
static POA_GNOME_Evolution_SyncFolderProgressListener__epv SyncFolderProgressListener_epv;
static POA_GNOME_Evolution_SyncFolderProgressListener__vepv SyncFolderProgressListener_vepv;
@@ -207,12 +208,10 @@ setup_progress_listener (SyncData *sync_data)
return TRUE;
}
-#endif
/* Setting up the progress dialog. */
-#if 0
static int
progress_dialog_close_callback (GnomeDialog *dialog,
void *data)
@@ -256,10 +255,8 @@ setup_dialog (SyncData *sync_data)
gtk_widget_show_all (sync_data->dialog);
}
-#endif
-#if 0
/* Sync the folder at the specified @folder_path. */
static void
sync_folder (SyncData *sync_data,
@@ -366,9 +363,7 @@ sync_folder (SyncData *sync_data,
CORBA_free (corba_folder);
CORBA_exception_free (&ev);
}
-#endif
-#if 0
/* Free up the data needed for syncing. */
static void
cleanup (SyncData *sync_data)
@@ -390,41 +385,22 @@ cleanup (SyncData *sync_data)
CORBA_exception_free (&ev);
}
-#endif
void
e_shell_offline_sync_all_folders (EShell *shell,
GtkWindow *parent_window)
{
-#if 0 /* FIXME */
- Bonobo_ConfigDatabase config_db;
- CORBA_sequence_CORBA_string *folder_path_sequence;
- CORBA_any *any;
- CORBA_Environment ev;
+ GConfClient *gconf_client;
SyncData *sync_data;
+ GSList *path_list;
+ GSList *p;
int i;
- config_db = e_shell_get_config_db (shell);
-
- CORBA_exception_init (&ev);
-
- /* Get the paths for the folders to sync up. */
-
- any = Bonobo_ConfigDatabase_getValue (config_db, "/OfflineFolders/paths", "", &ev);
- if (BONOBO_EX (&ev)) {
- g_warning ("Cannot get /OfflineFolders/paths from ConfigDatabase -- %s", BONOBO_EX_ID (&ev));
- CORBA_exception_free (&ev);
- return;
- }
- if (! CORBA_TypeCode_equal (any->_type, TC_CORBA_sequence_CORBA_string, &ev) || BONOBO_EX (&ev)) {
- g_warning ("/OfflineFolders/Paths in ConfigDatabase is not the expected type");
- CORBA_free (any);
- CORBA_exception_free (&ev);
- return;
- }
+ gconf_client = gconf_client_get_default ();
- folder_path_sequence = (CORBA_sequence_CORBA_string *) any->_value;
+ path_list = gconf_client_get_list (gconf_client, "/apps/evolution/shell/offline/folder_paths",
+ GCONF_VALUE_STRING, NULL);
sync_data = g_new0 (SyncData, 1);
sync_data->shell = shell;
@@ -436,10 +412,12 @@ e_shell_offline_sync_all_folders (EShell *shell,
setup_dialog (sync_data);
- for (i = 0; i < folder_path_sequence->_length; i ++) {
- sync_folder (sync_data,
- folder_path_sequence->_buffer[i],
- i + 1, folder_path_sequence->_length);
+ for (p = path_list, i = 1; p != NULL; p = p->next, i ++) {
+ const char *path;
+
+ path = (const char *) p->data;
+
+ sync_folder (sync_data, path, i, g_slist_length (path_list));
/* If the operation has been cancelled, stop syncing and
return. */
@@ -449,10 +427,10 @@ e_shell_offline_sync_all_folders (EShell *shell,
break;
}
}
+
done:
cleanup (sync_data);
- CORBA_free (folder_path_sequence);
- CORBA_exception_free (&ev);
-#endif
+ g_slist_foreach (path_list, (GFunc) g_free, NULL);
+ g_slist_free (path_list);
}