aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-10-18 03:33:52 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-10-18 03:33:52 +0800
commitf5a84bbd66488aee1502a7aa17c7844f2bef0b4d (patch)
treed6fc5d2a48c34c5979a279de2fae8a088e0fb984
parent66492867d6c19d5378ff2b25147b662cf8e528a1 (diff)
downloadgsoc2013-evolution-f5a84bbd66488aee1502a7aa17c7844f2bef0b4d.tar
gsoc2013-evolution-f5a84bbd66488aee1502a7aa17c7844f2bef0b4d.tar.gz
gsoc2013-evolution-f5a84bbd66488aee1502a7aa17c7844f2bef0b4d.tar.bz2
gsoc2013-evolution-f5a84bbd66488aee1502a7aa17c7844f2bef0b4d.tar.lz
gsoc2013-evolution-f5a84bbd66488aee1502a7aa17c7844f2bef0b4d.tar.xz
gsoc2013-evolution-f5a84bbd66488aee1502a7aa17c7844f2bef0b4d.tar.zst
gsoc2013-evolution-f5a84bbd66488aee1502a7aa17c7844f2bef0b4d.zip
Add defines
2000-10-17 JP Rosevear <jpr@helixcode.com> * conduits/todo/todo-conduit-control-applet.c: Add defines * conduits/todo/todo-conduit-config.h: put #ifdefs around functions can't make this a public interface in the usual way as then the symbols would be exported * conduits/todo/todo-conduit.c: Kill warnings. clahey will be happy! Add some defines to include only the necessary config functions. (conduit_get_gpilot_conduit): Hook up archive signals * conduits/calendar/calendar-conduit.c: Same as above * conduits/calendar/calendar-conduit-control-applet.c: ditto * conduits/calendar/calendar-conduit-config.h: ditto svn path=/trunk/; revision=5967
-rw-r--r--calendar/ChangeLog19
-rw-r--r--calendar/conduits/calendar/calendar-conduit-config.h16
-rw-r--r--calendar/conduits/calendar/calendar-conduit-control-applet.c17
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c29
-rw-r--r--calendar/conduits/todo/todo-conduit-config.h10
-rw-r--r--calendar/conduits/todo/todo-conduit-control-applet.c18
-rw-r--r--calendar/conduits/todo/todo-conduit.c30
7 files changed, 82 insertions, 57 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 9bb02b4b5d..7eded8aff2 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,22 @@
+2000-10-17 JP Rosevear <jpr@helixcode.com>
+
+ * conduits/todo/todo-conduit-control-applet.c: Add defines
+
+ * conduits/todo/todo-conduit-config.h: put #ifdefs around functions
+ can't make this a public interface in the usual way as then the
+ symbols would be exported
+
+ * conduits/todo/todo-conduit.c: Kill warnings. clahey will be
+ happy! Add some defines to include only the necessary config functions.
+ (conduit_get_gpilot_conduit): Hook up archive signals
+
+ * conduits/calendar/calendar-conduit.c: Same as above
+
+ * conduits/calendar/calendar-conduit-control-applet.c: ditto
+
+ * conduits/calendar/calendar-conduit-config.h: ditto
+
+
2000-10-16 Jesse Pavel <jpavel@helixcode.com>
* gui/e-itip-control.c: You can now add incoming iTip
diff --git a/calendar/conduits/calendar/calendar-conduit-config.h b/calendar/conduits/calendar/calendar-conduit-config.h
index 115a2ea272..e353142aaa 100644
--- a/calendar/conduits/calendar/calendar-conduit-config.h
+++ b/calendar/conduits/calendar/calendar-conduit-config.h
@@ -22,8 +22,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef __TODO_CONDUIT_CONFIG_H__
-#define __TODO_CONDUIT_CONFIG_H__
+#ifndef __CAL_CONDUIT_CONFIG_H__
+#define __CAL_CONDUIT_CONFIG_H__
#include <gnome.h>
#include <libgpilotdCM/gnome-pilot-conduit-management.h>
@@ -37,6 +37,8 @@ struct _ECalConduitCfg {
GnomePilotConduitSyncType sync_type; /* only used by capplet */
};
+#ifdef CAL_CONFIG_LOAD
+/* Loads the configuration data */
static void
calconduit_load_configuration (ECalConduitCfg **c, guint32 pilot_id)
{
@@ -56,7 +58,9 @@ calconduit_load_configuration (ECalConduitCfg **c, guint32 pilot_id)
(*c)->pilot_id = pilot_id;
}
+#endif
+#ifdef CAL_CONFIG_SAVE
/* Saves the configuration data. */
static void
calconduit_save_configuration (ECalConduitCfg *c)
@@ -73,7 +77,9 @@ calconduit_save_configuration (ECalConduitCfg *c)
gnome_config_sync ();
gnome_config_drop_all ();
}
+#endif
+#ifdef CAL_CONFIG_DUPE
/* Creates a duplicate of the configuration data */
static ECalConduitCfg*
calconduit_dupe_configuration (ECalConduitCfg *c)
@@ -89,7 +95,10 @@ calconduit_dupe_configuration (ECalConduitCfg *c)
return retval;
}
+#endif
+#ifdef CAL_CONFIG_DESTROY
+/* Destroy a configuration */
static void
calconduit_destroy_configuration (ECalConduitCfg **c)
{
@@ -99,8 +108,9 @@ calconduit_destroy_configuration (ECalConduitCfg **c)
g_free (*c);
*c = NULL;
}
+#endif
-#endif __TODO_CONDUIT_CONFIG_H__
+#endif __CAL_CONDUIT_CONFIG_H__
diff --git a/calendar/conduits/calendar/calendar-conduit-control-applet.c b/calendar/conduits/calendar/calendar-conduit-control-applet.c
index b50cb03fe0..ecd8d84e65 100644
--- a/calendar/conduits/calendar/calendar-conduit-control-applet.c
+++ b/calendar/conduits/calendar/calendar-conduit-control-applet.c
@@ -32,7 +32,15 @@
#include <gpilotd/gnome-pilot-client.h>
-#include "calendar-conduit-config.h"
+#define CAL_CONFIG_LOAD 1
+#define CAL_CONFIG_SAVE 1
+#define CAL_CONFIG_DUPE 1
+#define CAL_CONFIG_DESTROY 1
+#include <calendar-conduit-config.h>
+#undef CAL_CONFIG_LOAD
+#undef CAL_CONFIG_SAVE
+#undef CAL_CONFIG_DUPE
+#undef CAL_CONFIG_DESTROY
/* tell changes callbacks to ignore changes or not */
static gboolean ignore_changes=FALSE;
@@ -55,7 +63,6 @@ static void doTrySettings(GtkWidget *widget, ECalConduitCfg *c);
static void doRevertSettings(GtkWidget *widget, ECalConduitCfg *c);
static void doSaveSettings(GtkWidget *widget, ECalConduitCfg *c);
-static void readStateCfg (GtkWidget *w, ECalConduitCfg *c);
static void setStateCfg (GtkWidget *w, ECalConduitCfg *c);
gint pilotId;
@@ -195,12 +202,6 @@ setStateCfg (GtkWidget *w, ECalConduitCfg *c)
static void
-readStateCfg (GtkWidget *w, ECalConduitCfg *c)
-{
-}
-
-
-static void
pilot_capplet_setup(void)
{
GtkWidget *frame, *table;
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index 37661377b1..3ba6e7d931 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -40,19 +40,24 @@
#include <pi-file.h>
#include <pi-dlp.h>
#include <pi-version.h>
-#include <calendar-conduit-config.h>
-#include <calendar-conduit.h>
#include <libical/src/libical/icaltypes.h>
+#define CAL_CONFIG_LOAD 1
+#define CAL_CONFIG_DESTROY 1
+#include <calendar-conduit-config.h>
+#undef CAL_CONFIG_LOAD
+#undef CAL_CONFIG_DESTROY
+
+#include <calendar-conduit.h>
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-#define CONDUIT_VERSION "0.8.11"
+#define CONDUIT_VERSION "0.1.0"
#ifdef G_LOG_DOMAIN
#undef G_LOG_DOMAIN
#endif
-#define G_LOG_DOMAIN "calconduit"
+#define G_LOG_DOMAIN "ecalconduit"
#define DEBUG_CALCONDUIT 1
/* #undef DEBUG_CALCONDUIT */
@@ -311,18 +316,6 @@ start_calendar_server (ECalConduitContext *ctxt)
}
/* Utility routines */
-static const char *
-status_to_string (gint status)
-{
- switch(status) {
- case GnomePilotRecordNothing: return "GnomePilotRecordNothing";
- case GnomePilotRecordDeleted: return "GnomePilotRecordDeleted";
- case GnomePilotRecordNew: return "GnomePilotRecordNew";
- case GnomePilotRecordModified: return "GnomePilotRecordModified";
- }
-
- return "Unknown";
-}
static icalrecurrencetype_weekday
get_ical_day (int day)
{
@@ -1216,12 +1209,12 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, ctxt);
gtk_signal_connect (retval, "add_record", (GtkSignalFunc) add_record, ctxt);
-/* gtk_signal_connect (retval, "add_archive_record", (GtkSignalFunc) add_archive_record, ctxt); */
+ gtk_signal_connect (retval, "add_archive_record", (GtkSignalFunc) add_archive_record, ctxt);
gtk_signal_connect (retval, "replace_record", (GtkSignalFunc) replace_record, ctxt);
gtk_signal_connect (retval, "delete_record", (GtkSignalFunc) delete_record, ctxt);
-/* gtk_signal_connect (retval, "delete_archive_record", (GtkSignalFunc) delete_archive_record, ctxt); */
+ gtk_signal_connect (retval, "delete_archive_record", (GtkSignalFunc) delete_archive_record, ctxt);
gtk_signal_connect (retval, "match", (GtkSignalFunc) match, ctxt);
gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt);
diff --git a/calendar/conduits/todo/todo-conduit-config.h b/calendar/conduits/todo/todo-conduit-config.h
index 38f3cf8e39..7a23475839 100644
--- a/calendar/conduits/todo/todo-conduit-config.h
+++ b/calendar/conduits/todo/todo-conduit-config.h
@@ -37,6 +37,8 @@ struct _EToDoConduitCfg {
GnomePilotConduitSyncType sync_type; /* only used by capplet */
};
+#ifdef TODO_CONFIG_LOAD
+/* Load the configuration data */
static void
todoconduit_load_configuration (EToDoConduitCfg **c, guint32 pilot_id)
{
@@ -56,7 +58,9 @@ todoconduit_load_configuration (EToDoConduitCfg **c, guint32 pilot_id)
(*c)->pilot_id = pilot_id;
}
+#endif
+#ifdef TODO_CONFIG_SAVE
/* Saves the configuration data. */
static void
todoconduit_save_configuration (EToDoConduitCfg *c)
@@ -73,7 +77,9 @@ todoconduit_save_configuration (EToDoConduitCfg *c)
gnome_config_sync ();
gnome_config_drop_all ();
}
+#endif
+#ifdef TODO_CONFIG_DUPE
/* Creates a duplicate of the configuration data */
static EToDoConduitCfg*
todoconduit_dupe_configuration (EToDoConduitCfg *c)
@@ -89,7 +95,10 @@ todoconduit_dupe_configuration (EToDoConduitCfg *c)
return retval;
}
+#endif
+#ifdef TODO_CONFIG_DESTROY
+/* Destroy a configuration */
static void
todoconduit_destroy_configuration (EToDoConduitCfg **c)
{
@@ -99,6 +108,7 @@ todoconduit_destroy_configuration (EToDoConduitCfg **c)
g_free (*c);
*c = NULL;
}
+#endif
#endif __TODO_CONDUIT_CONFIG_H__
diff --git a/calendar/conduits/todo/todo-conduit-control-applet.c b/calendar/conduits/todo/todo-conduit-control-applet.c
index c2a8dc16da..7140522b55 100644
--- a/calendar/conduits/todo/todo-conduit-control-applet.c
+++ b/calendar/conduits/todo/todo-conduit-control-applet.c
@@ -32,7 +32,15 @@
#include <gpilotd/gnome-pilot-client.h>
-#include "todo-conduit-config.h"
+#define TODO_CONFIG_LOAD 1
+#define TODO_CONFIG_SAVE 1
+#define TODO_CONFIG_DUPE 1
+#define TODO_CONFIG_DESTROY 1
+#include <todo-conduit-config.h>
+#undef TODO_CONFIG_LOAD
+#undef TODO_CONFIG_SAVE
+#undef TODO_CONFIG_DUPE
+#undef TODO_CONFIG_DESTROY
/* tell changes callbacks to ignore changes or not */
static gboolean ignore_changes=FALSE;
@@ -55,7 +63,6 @@ static void doTrySettings(GtkWidget *widget, EToDoConduitCfg *c);
static void doRevertSettings(GtkWidget *widget, EToDoConduitCfg *c);
static void doSaveSettings(GtkWidget *widget, EToDoConduitCfg *c);
-static void readStateCfg (GtkWidget *w, EToDoConduitCfg *c);
static void setStateCfg (GtkWidget *w, EToDoConduitCfg *c);
gint pilotId;
@@ -193,13 +200,6 @@ setStateCfg (GtkWidget *w, EToDoConduitCfg *c)
ignore_changes = FALSE;
}
-
-static void
-readStateCfg (GtkWidget *w, EToDoConduitCfg *c)
-{
-}
-
-
static void
pilot_capplet_setup(void)
{
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index 90ce255210..646f850b42 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -40,19 +40,24 @@
#include <pi-file.h>
#include <pi-dlp.h>
#include <pi-version.h>
-#include <todo-conduit-config.h>
-#include <todo-conduit.h>
#include <libical/src/libical/icaltypes.h>
+#define TODO_CONFIG_LOAD 1
+#define TODO_CONFIG_DESTROY 1
+#include <todo-conduit-config.h>
+#undef TODO_CONFIG_LOAD
+#undef TODO_CONFIG_DESTROY
+
+#include <todo-conduit.h>
GnomePilotConduit * conduit_get_gpilot_conduit (guint32);
void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
-#define CONDUIT_VERSION "0.8.11"
+#define CONDUIT_VERSION "0.1.0"
#ifdef G_LOG_DOMAIN
#undef G_LOG_DOMAIN
#endif
-#define G_LOG_DOMAIN "todoconduit"
+#define G_LOG_DOMAIN "etodoconduit"
#define DEBUG_CALCONDUIT 1
/* #undef DEBUG_CALCONDUIT */
@@ -315,19 +320,6 @@ start_calendar_server (EToDoConduitContext *ctxt)
}
/* Utility routines */
-static const char *
-status_to_string (gint status)
-{
- switch(status) {
- case GnomePilotRecordNothing: return "GnomePilotRecordNothing";
- case GnomePilotRecordDeleted: return "GnomePilotRecordDeleted";
- case GnomePilotRecordNew: return "GnomePilotRecordNew";
- case GnomePilotRecordModified: return "GnomePilotRecordModified";
- }
-
- return "Unknown";
-}
-
static void
compute_pid (EToDoConduitContext *ctxt, EToDoLocalRecord *local, const char *uid)
{
@@ -1098,12 +1090,12 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
gtk_signal_connect (retval, "compare", (GtkSignalFunc) compare, ctxt);
gtk_signal_connect (retval, "add_record", (GtkSignalFunc) add_record, ctxt);
-/* gtk_signal_connect (retval, "add_archive_record", (GtkSignalFunc) add_archive_record, ctxt); */
+ gtk_signal_connect (retval, "add_archive_record", (GtkSignalFunc) add_archive_record, ctxt);
gtk_signal_connect (retval, "replace_record", (GtkSignalFunc) replace_record, ctxt);
gtk_signal_connect (retval, "delete_record", (GtkSignalFunc) delete_record, ctxt);
-/* gtk_signal_connect (retval, "delete_archive_record", (GtkSignalFunc) delete_archive_record, ctxt); */
+ gtk_signal_connect (retval, "delete_archive_record", (GtkSignalFunc) delete_archive_record, ctxt);
gtk_signal_connect (retval, "match", (GtkSignalFunc) match, ctxt);
gtk_signal_connect (retval, "free_match", (GtkSignalFunc) free_match, ctxt);