Commit 33389777 authored by Matthew Barnes's avatar Matthew Barnes

Remove gnome-pilot integration.

It just doesn't belong in Evolution anymore.  We don't support syncing
with more modern devices -- see Conduits or SyncEvolution for that -- so
it does not make sense for older model Palm Pilot PDAs to be the lone
exception.

I have repackaged the Evolution-Data-Server conduit modules to be
provided by gnome-pilot itself in bug #619315.  This should provide
eqivalent Palm Pilot syncing functionality; it's just being moved to
gnome-pilot.

This completely severs our dependency on deprecated GNOME 2.x libraries
which were still being dragged in by way of gnome-pilot dependencies.
It was also interfereing with our bundling of libgnomecanvas.
parent 3acb2148
......@@ -42,9 +42,6 @@ Mailer
Notes
Anders Carlsson <andersca@gnu.org>
Pilot
JP Rosevear <jpr@ximian.com>
Shell
Miguel de Icaza <miguel@ximian.com>
Jason Leach <jleach@ximian.com>
......
......@@ -72,14 +72,6 @@ dependencies should be compiled in the order they are listed here):
Many distributions ship these as Mozilla development
packages.
* [Optional] gnome-pilot 2.0 or later
This is only necessary if you want to be able to synchronize
your Palm device with Evolution.
ftp://ftp.gnome.org/pub/gnome/sources/gnome-pilot
ftp://ftp.gnome.org/pub/gnome/sources/gnome-pilot-conduits
* [Optional] gnome-spell 1.0.1 or later
This is only necessary if you want to have the spell
......@@ -147,16 +139,6 @@ OPTIONAL FEATURES
Some optional features can be enabled at compilation time by passing
appropriate flags to the configure script:
* GNOME Pilot support.
Assuming you have installed gnome-pilot, add the following
options:
--with-pisock=<prefix> --enable-pilot-conduits=yes
Where <prefix> is the location where pilot-link (a package
that gnome-pilot depends on) was installed.
* SSL support.
Make sure you have Mozilla's NSS nad NSPR libraries
......
if ENABLE_PILOT_CONDUITS
CONDUIT_SUBDIR = conduit
endif
SUBDIRS = util printing importers gui tools $(CONDUIT_SUBDIR)
SUBDIRS = util printing importers gui tools
error_DATA = addressbook.error
errordir = $(privdatadir)/errors
......
# Address Conduit
privconduit_LTLIBRARIES = libeaddress_conduit.la
libeaddress_conduit_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir)/e-util \
-I$(top_builddir)/e-util \
-I$(top_srcdir)/widgets/misc \
-I$(top_builddir)/widgets/misc \
$(EVOLUTION_ADDRESSBOOK_CONDUIT_CFLAGS)
libeaddress_conduit_la_SOURCES = address-conduit.c
libeaddress_conduit_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
libeaddress_conduit_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/e-util/libeconduit.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
$(EVOLUTION_ADDRESSBOOK_CONDUIT_LIBS)
e-address.conduit: e-address.conduit.in
sed -e 's^\@privconduitdir\@^$(privconduitdir)^g' \
-e 's^\@datadir\@^$(datadir)^g' \
-e 's^\@BASE_VERSION\@^$(BASE_VERSION)^g' \
$< > $@
conduitdir = $(datadir)/gnome-pilot/conduits/
conduit_DATA = e-address.conduit
BUILT_SOURCES = $(conduit_DATA)
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
e-address.conduit.in
dist-hook:
cd $(distdir); rm -f $(BUILT_SOURCES)
-include $(top_srcdir)/git.mk
This diff is collapsed.
<gnome-pilot-conduit version="1.0">
<conduit id="e_address_conduit" type="shlib" location="@privconduitdir@/libeaddress_conduit.so"/>
<name value="EAddress"/>
<conduit-attribute name="description" value="Synchronizes Addressbook with Evolution"/>
<conduit-attribute name="default-synctype" value="synchronize"/>
<conduit-attribute name="valid-synctypes" value="synchronize copy_from_pilot copy_to_pilot"/>
<conduit-attribute name="settings" value="TRUE"/>
<conduit-attribute name="icon" value="@datadir@/images/evolution/conduits/48_evo-address-conduit.png"/>
</gnome-pilot-conduit>
if ENABLE_PILOT_CONDUITS
CONDUIT_DIR = conduits
else
CONDUIT_DIR =
endif
SUBDIRS = common importers gui $(CONDUIT_DIR)
SUBDIRS = common importers gui
error_DATA = calendar.error
errordir = $(privdatadir)/errors
......
SUBDIRS = common calendar memo todo
-include $(top_srcdir)/git.mk
# Calendar Conduit
privconduit_LTLIBRARIES = libecalendar_conduit.la
libecalendar_conduit_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir)/e-util \
-I$(top_builddir)/e-util \
-I$(top_srcdir)/widgets/misc \
-I$(top_builddir)/widgets/misc \
-I$(top_srcdir)/calendar/conduits/common \
-I$(top_builddir)/calendar/conduits/common \
$(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
libecalendar_conduit_la_SOURCES = calendar-conduit.c
libecalendar_conduit_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
libecalendar_conduit_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/e-util/libeconduit.la \
$(top_builddir)/widgets/misc/libemiscwidgets.la \
$(top_builddir)/calendar/conduits/common/libecalendar_common_conduit.la \
$(EVOLUTION_CALENDAR_CONDUIT_LIBS)
e-calendar.conduit: e-calendar.conduit.in
sed -e 's^\@privconduitdir\@^$(privconduitdir)^g' \
-e 's^\@datadir\@^$(datadir)^g' \
-e 's^\@BASE_VERSION\@^$(BASE_VERSION)^g' \
$< > $@
conduitdir = $(datadir)/gnome-pilot/conduits/
conduit_DATA = e-calendar.conduit
BUILT_SOURCES = $(conduit_DATA)
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = \
e-calendar.conduit.in
dist-hook:
cd $(distdir); rm -f $(BUILT_SOURCES)
-include $(top_srcdir)/git.mk
This diff is collapsed.
<gnome-pilot-conduit version="1.0">
<conduit id="e_calendar_conduit" type="shlib" location="@privconduitdir@/libecalendar_conduit.so"/>
<name value="ECalendar"/>
<conduit-attribute name="description" value="Synchronizes Calendar with Evolution @BASE_VERSION@"/>
<conduit-attribute name="default-synctype" value="synchronize"/>
<conduit-attribute name="valid-synctypes" value="synchronize copy_from_pilot copy_to_pilot"/>
<conduit-attribute name="settings" value="TRUE"/>
<conduit-attribute name="icon" value="@datadir@/images/evolution/conduits/48_evo-calendar-conduit.png"/>
</gnome-pilot-conduit>
# Calendar Conduit library
privconduit_LTLIBRARIES = libecalendar_common_conduit.la
libecalendar_common_conduit_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/e-util \
-I$(top_builddir)/e-util \
$(EVOLUTION_CALENDAR_CONDUIT_CFLAGS)
ecalendar_common_conduitincludedir = $(privincludedir)/calendar/conduits/common
ecalendar_common_conduitinclude_HEADERS = libecalendar-common-conduit.h
libecalendar_common_conduit_la_SOURCES = libecalendar-common-conduit.c
libecalendar_common_conduit_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
libecalendar_common_conduit_la_LIBADD = \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/e-util/libeconduit.la \
$(EVOLUTION_CALENDAR_CONDUIT_LIBS)
-include $(top_srcdir)/git.mk
/*
* Evolution calendar - ToDo Conduit
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the program; if not, see <http://www.gnu.org/licenses/>
*
*
* Authors:
* Tom Billet <mouse256@ulyssis.org>
* Nathan Owens <pianocomp81@yahoo.com>
*
* Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
*
*/
#include <string.h>
#include <libedataserver/e-categories.h>
#include <e-pilot-util.h>
#include <pi-appinfo.h>
#include <glib.h>
#include <gconf/gconf-client.h>
#include "libecalendar-common-conduit.h"
/*make debugging possible if it's required for a conduit */
#define LOG(x)
#ifdef DEBUG_CALCONDUIT
#define LOG(x) x
#endif
#ifdef DEBUG_MEMOCONDUIT
#define LOG(x) x
#endif
#ifdef DEBUG_TODOCONDUIT
#define LOG(x) x
#endif
#ifdef DEBUG_CONDUIT
#define LOG(x) x
#endif
/*
* Adds a category to the category app info structure (name and ID),
* sets category->renamed[i] to true if possible to rename.
*
* This will be packed and written to the app info block during post_sync.
*
* NOTE: cat_to_add MUST be in PCHAR format. Evolution stores categories
* in UTF-8 format. A conversion must take place before calling
* this function (see e_pilot_utf8_to_pchar() in e-pilot-util.c)
*/
gint
e_pilot_add_category_if_possible(gchar *cat_to_add, struct CategoryAppInfo *category)
{
gint i, j;
gint retval = 0; /* 0 is the Unfiled category */
LOG(g_message("e_pilot_add_category_if_possible\n"));
for (i=0; i<PILOT_MAX_CATEGORIES; i++) {
/* if strlen is 0, then the category is empty
the PalmOS doesn't let 0-length strings for
categories */
if (strlen(category->name[i]) == 0) {
gint cat_to_add_len;
gint desktopUniqueID;
cat_to_add_len = strlen(cat_to_add);
retval = i;
if (cat_to_add_len > 15) {
/* Have to truncate the category name */
cat_to_add_len = 15;
}
/* only 15 characters for category, 16th is
* '\0' can't do direct mem transfer due to
* declaration type
*/
for (j=0; j<cat_to_add_len; j++) {
category->name[i][j] = cat_to_add[j];
}
for (j=cat_to_add_len; j<16; j++) {
category->name[i][j] = '\0';
}
/* find a desktop id that is not in use between 128 and 255 */
for (desktopUniqueID = 128; desktopUniqueID <= 255; desktopUniqueID++) {
gint found = 0;
for (j=0; j<PILOT_MAX_CATEGORIES; j++) {
if (category->ID[i] == desktopUniqueID) {
found = 1;
}
}
if (found == 0) {
break;
}
if (desktopUniqueID == 255) {
LOG (g_warning ("*** no more categories available on PC ***"));
}
}
category->ID[i] = desktopUniqueID;
category->renamed[i] = TRUE;
break;
}
}
if (retval == 0) {
LOG (g_warning ("*** not adding category - category list already full ***"));
}
return retval;
}
/*
*conversion from an evolution category to a palm category
*/
void e_pilot_local_category_to_remote(gint * pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category, const gchar *pilot_charset)
{
GSList *c_list = NULL;
gchar * category_string;
gint i;
e_cal_component_get_categories_list (comp, &c_list);
if (c_list) {
/* list != 0, so at least 1 category is assigned */
category_string = e_pilot_utf8_to_pchar((const gchar *)c_list->data, pilot_charset);
if (c_list->next != 0) {
LOG (g_message ("Note: item has more categories in evolution, first chosen"));
}
i=1;
while (1) {
if (strcmp(category_string,category->name[i]) == 0) {
*pilotCategory = i;
break;
}
i++;
if (i == PILOT_MAX_CATEGORIES) {
/* category not available on palm, try to create it */
*pilotCategory = e_pilot_add_category_if_possible(category_string,category);
break;
}
}
e_cal_component_free_categories_list(c_list);
c_list = NULL;
} else {
*pilotCategory = 0;
}
/*end category*/
}
/*
*conversion from a palm category to an evolution category
*/
void e_pilot_remote_category_to_local(gint pilotCategory, ECalComponent *comp, struct CategoryAppInfo *category, const gchar *pilot_charset)
{
gchar *category_string = NULL;
if (pilotCategory != 0) {
/* pda has category assigned */
category_string = e_pilot_utf8_from_pchar(category->name[pilotCategory], pilot_charset);
LOG(g_message("Category: %s\n", category_string));
/* TODO The calendar editor page and search bar are not updated until a restart of the evolution client */
if (e_categories_exist(category_string) == FALSE) {
/* add if it doesn't exist */
LOG(g_message("Category created on pc\n"));
e_categories_add(category_string, NULL, NULL, TRUE);
}
}
/* store the data on in evolution */
if (category_string == NULL) {
/* note: this space is needed to make sure evolution clears the category */
e_cal_component_set_categories (comp, " ");
}
else {
/* Since only the first category is synced with the PDA, add the PDA's
* category to the beginning of the category list */
GSList *c_list = NULL;
GSList *newcat_in_list;
e_cal_component_get_categories_list (comp, &c_list);
/* remove old item from list so we don't have duplicate entries */
newcat_in_list = g_slist_find_custom(c_list, category_string, (GCompareFunc)strcmp);
if (newcat_in_list != NULL)
{
c_list = g_slist_remove(c_list, newcat_in_list->data);
}
c_list = g_slist_prepend(c_list, category_string);
e_cal_component_set_categories_list (comp, c_list);
e_cal_component_free_categories_list(c_list);
}
}
static gchar *
build_setup_path (const gchar *path, const gchar *key)
{
return g_strconcat ("/apps/evolution/conduit", "/", path, "/", key, NULL);
}
gboolean
e_pilot_setup_get_bool (const gchar *path, const gchar *key, gboolean def)
{
gboolean res = def;
gchar *full_path;
GConfValue *value;
GConfClient *gconf;
g_return_val_if_fail (path != NULL, res);
g_return_val_if_fail (key != NULL, res);
gconf = gconf_client_get_default ();
full_path = build_setup_path (path, key);
value = gconf_client_get (gconf, full_path, NULL);
if (value) {
if (value->type == GCONF_VALUE_BOOL)
res = gconf_value_get_bool (value);
gconf_value_free (value);
}
g_free (full_path);
g_object_unref (gconf);
return res;
}
void
e_pilot_setup_set_bool (const gchar *path, const gchar *key, gboolean value)
{
GError *error = NULL;
gchar *full_path;
GConfClient *gconf;
g_return_if_fail (path != NULL);
g_return_if_fail (key != NULL);
gconf = gconf_client_get_default ();
full_path = build_setup_path (path, key);
gconf_client_set_bool (gconf, full_path, value, &error);
g_free (full_path);
g_object_unref (gconf);
if (error) {
g_message ("%s: Failed to write: %s", G_STRFUNC, error->message);
g_error_free (error);
}
}
gint
e_pilot_setup_get_int (const gchar *path, const gchar *key, gint def)
{
gint res = def;
gchar *full_path;
GConfValue *value;
GConfClient *gconf;
g_return_val_if_fail (path != NULL, res);
g_return_val_if_fail (key != NULL, res);
gconf = gconf_client_get_default ();
full_path = build_setup_path (path, key);
value = gconf_client_get (gconf, full_path, NULL);
if (value) {
if (value->type == GCONF_VALUE_INT)
res = gconf_value_get_int (value);
gconf_value_free (value);
}
g_free (full_path);
g_object_unref (gconf);
return res;
}
void
e_pilot_setup_set_int (const gchar *path, const gchar *key, gint value)
{
GError *error = NULL;
gchar *full_path;
GConfClient *gconf;
g_return_if_fail (path != NULL);
g_return_if_fail (key != NULL);
gconf = gconf_client_get_default ();
full_path = build_setup_path (path, key);
gconf_client_set_int (gconf, full_path, value, &error);
g_free (full_path);
g_object_unref (gconf);
if (error) {
g_message ("%s: Failed to write: %s", G_STRFUNC, error->message);
g_error_free (error);
}
}
gchar *
e_pilot_setup_get_string (const gchar *path, const gchar *key, const gchar *def)
{
gchar *res = g_strdup (def);
gchar *full_path;
GConfValue *value;
GConfClient *gconf;
g_return_val_if_fail (path != NULL, res);
g_return_val_if_fail (key != NULL, res);
gconf = gconf_client_get_default ();
full_path = build_setup_path (path, key);
value = gconf_client_get (gconf, full_path, NULL);
if (value) {
if (value->type == GCONF_VALUE_STRING) {
g_free (res);
res = g_strdup (gconf_value_get_string (value));
}
gconf_value_free (value);
}
g_free (full_path);
g_object_unref (gconf);
return res;
}
void
e_pilot_setup_set_string (const gchar *path, const gchar *key, const gchar *value)
{
GError *error = NULL;
gchar *full_path;
GConfClient *gconf;
g_return_if_fail (path != NULL);
g_return_if_fail (key != NULL);
g_return_if_fail (value != NULL);
gconf = gconf_client_get_default ();
full_path = build_setup_path (path, key);
gconf_client_set_string (gconf, full_path, value, &error);
g_free (full_path);
g_object_unref (gconf);
if (error) {
g_message ("%s: Failed to write: %s", G_STRFUNC, error->message);
g_error_free (error);
}
}
This diff is collapsed.
This diff is collapsed.
<gnome-pilot-conduit version="1.0">
<conduit id="e_memo_conduit" type="shlib" location="@privconduitdir@/libememo_conduit.so"/>
<name value="EMemos"/>
<conduit-attribute name="description" value="Synchronizes Memo List with Evolution @BASE_VERSION@"/>
<conduit-attribute name="default-synctype" value="synchronize"/>
<conduit-attribute name="valid-synctypes" value="synchronize copy_from_pilot copy_to_pilot"/>
<conduit-attribute name="settings" value="TRUE"/>
</gnome-pilot-conduit>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -103,8 +103,6 @@
E_SHELL_WINDOW_ACTION ((window), "switcher-style-text")
#define E_SHELL_WINDOW_ACTION_SWITCHER_STYLE_USER(window) \
E_SHELL_WINDOW_ACTION ((window), "switcher-style-user")
#define E_SHELL_WINDOW_ACTION_SYNC_OPTIONS(window) \
E_SHELL_WINDOW_ACTION ((window), "sync-options")
#define E_SHELL_WINDOW_ACTION_WORK_OFFLINE(window) \
E_SHELL_WINDOW_ACTION ((window), "work-offline")
#define E_SHELL_WINDOW_ACTION_WORK_ONLINE(window) \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment