summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lord <chris@openedhand.com>2006-12-19 20:15:28 +0000
committerChris Lord <chris@openedhand.com>2006-12-19 20:15:28 +0000
commit908883b42d48e18b2c3bb0fec1a472e89d4876a7 (patch)
treedaea54f8d7ade29775cc52424d703968f72b9340
parent317cadedf5d48093de54b1a6dfc0631eee68867a (diff)
downloadsync-908883b42d48e18b2c3bb0fec1a472e89d4876a7.tar.gz
sync-908883b42d48e18b2c3bb0fec1a472e89d4876a7.tar.bz2
sync-908883b42d48e18b2c3bb0fec1a472e89d4876a7.zip
Fix SyncCollection conflict signal (hopefully), reinstate evolution2
syncing (still probably mostly broken, but works with google calendar)
-rw-r--r--sync/ChangeLog9
-rw-r--r--sync/src/sync_collection.c2
-rw-r--r--sync/src/sync_main.c22
-rw-r--r--sync/src/sync_main.h2
4 files changed, 17 insertions, 18 deletions
diff --git a/sync/ChangeLog b/sync/ChangeLog
index 19d8838..9038bb1 100644
--- a/sync/ChangeLog
+++ b/sync/ChangeLog
@@ -1,3 +1,12 @@
+2006-12-19 Chris Lord <chris@openedhand.com>
+
+ * src/sync_collection.c: (sync_collection_class_init):
+ Fix conflict signal (I think?)
+
+ * src/sync_main.c: (sync_item_activated_cb), (main):
+ * src/sync_main.h:
+ Reinstate evo syncing (everything now syncs to evo except SyncML)
+
2006-12-19 Chris Lord,,, <chris@openedhand.com>
* src/sync_gcal_item.[ch], src/Makefile.am:
diff --git a/sync/src/sync_collection.c b/sync/src/sync_collection.c
index 913d580..27a1e15 100644
--- a/sync/src/sync_collection.c
+++ b/sync/src/sync_collection.c
@@ -79,7 +79,7 @@ sync_collection_class_init (SyncCollectionClass *klass)
G_STRUCT_OFFSET (SyncCollectionClass, conflict),
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
- G_TYPE_NONE, 0, G_TYPE_OBJECT);
+ G_TYPE_NONE, 1, G_TYPE_OBJECT);
signals[FINISHED] =
g_signal_new ("finished",
G_OBJECT_CLASS_TYPE (object_class),
diff --git a/sync/src/sync_main.c b/sync/src/sync_main.c
index 3e21d69..e60d2c1 100644
--- a/sync/src/sync_main.c
+++ b/sync/src/sync_main.c
@@ -198,7 +198,7 @@ sync_item_activated_cb (GtkIconView *iconview, GtkTreePath *arg1,
/* Events SyncML item */
item = sync_syncml_item_new ("Server",
- "http://localhost:8080",
+ "http://localhost:14369",
EVENTS, "", "", "cal");
group = sync_group_new_with_items (
item2, item);
@@ -235,20 +235,14 @@ sync_item_activated_cb (GtkIconView *iconview, GtkTreePath *arg1,
g_object_unref (item);
break;
case TYPE_GCAL:
- path = g_strdup_printf (TEMP_PATH,
- g_getenv ("HOME"));
- item = sync_file_item_new ("Test", path);
- g_free (path);
-
item2 = sync_gcal_item_new ("GCal",
- "user", "password");
+ "username", "password");
group = sync_group_new_with_items (
- item2, item);
+ item2, data->local_item);
sync_collection_add_group (data->collection,
group);
g_object_unref (group);
- g_object_unref (item);
g_object_unref (item2);
break;
default:
@@ -391,12 +385,12 @@ main (int argc, char **argv)
gint width = 0, height = 0;
SyncData data;
SyncItem *server_item;
- gchar *testpath;
gtk_init (&argc, &argv);
glade_init ();
/* g_thread_init (NULL);
gdk_threads_init ();*/
+
/* FIXME: Must be called due to buggy OpenSync */
gconf_client_get_default ();
@@ -432,17 +426,15 @@ main (int argc, char **argv)
/* Create local sync-item and sync collection */
data.collection = sync_collection_new ();
/* Test with a local file store, evo2 plug-in is broken? */
-/* data.local_item = sync_evo2_item_new ("Local", NULL, NULL, NULL);*/
- testpath = g_strdup_printf (TEMP_PATH2, g_getenv ("HOME"));
- data.local_item = sync_file_item_new ("Test2", testpath);
- g_free (testpath);
+ data.local_item = sync_evo2_item_new ("Local", NULL, NULL, NULL);
/* Create and start server */
server_item = sync_syncml_server_item_new ("Server", "", "",
- 8080, "card", "cal", "note");
+ 14369, "card", "cal", "note");
data.server_group = sync_group_new_with_items (
server_item, data.local_item);
g_object_unref (server_item);
+ /* Connect up server sync signals (these don't seem to work?) */
/* TODO: Conflicts? */
g_signal_connect (G_OBJECT (data.server_group), "started",
G_CALLBACK (sync_server_started_cb), &data);
diff --git a/sync/src/sync_main.h b/sync/src/sync_main.h
index 4d3adac..4d5aaef 100644
--- a/sync/src/sync_main.h
+++ b/sync/src/sync_main.h
@@ -12,8 +12,6 @@
#define XML_FILE PKGDATADIR G_DIR_SEPARATOR_S "sync.glade"
#define TEMP_PATH "%s" G_DIR_SEPARATOR_S ".gnome2" G_DIR_SEPARATOR_S \
"sync" G_DIR_SEPARATOR_S "backup"
-#define TEMP_PATH2 "%s" G_DIR_SEPARATOR_S ".gnome2" G_DIR_SEPARATOR_S \
- "sync" G_DIR_SEPARATOR_S "backup2"
#define ANIM_FREQ 100
#define SWITCH_FREQ 10