diff options
author | JP Rosevear <jpr@helixcode.com> | 2000-09-15 03:08:51 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2000-09-15 03:08:51 +0800 |
commit | 8ab84a1ebff365b8138623bc0da1dfec3bc385e5 (patch) | |
tree | 205e9f73cfd3cbbb1c62619b8840209114092034 /calendar/conduits | |
parent | dc5039bf5f71401879555beb6b61d04c5d809af5 (diff) | |
download | gsoc2013-evolution-8ab84a1ebff365b8138623bc0da1dfec3bc385e5.tar.gz gsoc2013-evolution-8ab84a1ebff365b8138623bc0da1dfec3bc385e5.tar.zst gsoc2013-evolution-8ab84a1ebff365b8138623bc0da1dfec3bc385e5.zip |
Add headers with GPL notice and credit copyright to those appropriate
2000-09-14 JP Rosevear <jpr@helixcode.com>
* Add headers with GPL notice and credit copyright to those
appropriate
* conduits/todo/todo-conduit-control-applet.c (doHelp): Update
name,
authors, copyright for about dialog.
(activate_sync_type): Tidy
* conduits/todo/Makefile.am: Rename binaries and libs to e-todo*
to avoid conflicts.
* conduits/todo/e-todo.conduit.in: Reflect binary/lib name changes
* conduits/todo/e-todo-conduit-control-applet.desktop: ditto
* conduits/todo/todo.conduit.in: Removed
* conduits/todo/todo-conduit-control-applet.desktop: Removed
* conduits/todo/todo-conduit-config.h
(todoconduit_load_configuration):
The config file will now be called e-todo-conduit
(todoconduit_save_configuration): ditto
* conduits/todo/todo-conduit.c: Some renaming to keep consistent.
(pre_sync): Remove commented out function that does not exist.
* conduits/todo/todo-conduit-control-applet.c: ditto
* conduits/todo/todo-conduit-config.h: ditto
* conduits/todo/todo-conduit.h: ditto
svn path=/trunk/; revision=5433
Diffstat (limited to 'calendar/conduits')
-rw-r--r-- | calendar/conduits/todo/Makefile.am | 28 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit-config.h | 71 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit-control-applet.c | 80 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit.c | 32 | ||||
-rw-r--r-- | calendar/conduits/todo/todo-conduit.h | 24 |
5 files changed, 166 insertions, 69 deletions
diff --git a/calendar/conduits/todo/Makefile.am b/calendar/conduits/todo/Makefile.am index 5f93c81f72..3bbfc3f418 100644 --- a/calendar/conduits/todo/Makefile.am +++ b/calendar/conduits/todo/Makefile.am @@ -7,11 +7,11 @@ INCLUDES = \ $(GNOME_PILOT_CFLAGS) # ToDo Capplet -bin_PROGRAMS = todo-conduit-control-applet +bin_PROGRAMS = e-todo-conduit-control-applet -todo_conduit_control_applet_SOURCES = todo-conduit-control-applet.c +e_todo_conduit_control_applet_SOURCES = todo-conduit-control-applet.c -todo_conduit_control_applet_LDADD = \ +e_todo_conduit_control_applet_LDADD = \ $(CAPPLET_LIBS) \ $(GNOME_LIBDIR) \ $(GNOME_PILOT_LIBS) \ @@ -25,15 +25,15 @@ todo_conduit_control_applet_LDADD = \ # ToDo Conduit -todo_conduitsdir=$(libdir)/gnome-pilot/conduits -todo_conduits_LTLIBRARIES = libtodo_conduit.la +e_todo_conduitsdir=$(libdir)/gnome-pilot/conduits +e_todo_conduits_LTLIBRARIES = libetodo_conduit.la -libtodo_conduit_la_SOURCES = todo-conduit.c +libetodo_conduit_la_SOURCES = todo-conduit.c -libtodo_conduit_la_LDFLAGS = \ +libetodo_conduit_la_LDFLAGS = \ -rpath $(libdir) -libtodo_conduit_la_LIBADD = \ +libetodo_conduit_la_LIBADD = \ $(top_builddir)/calendar/cal-client/libcal-client-static.la \ $(top_builddir)/calendar/cal-util/libcal-util-static.la \ $(top_builddir)/libversit/libversit.la \ @@ -43,24 +43,24 @@ libtodo_conduit_la_LIBADD = \ $(GNOME_LIBDIR) \ $(GNOME_LIBS) -todo.conduit: todo.conduit.in Makefile - sed -e 's^\@prefix\@^$(prefix)^g' < $(srcdir)/todo.conduit.in > todo.conduit.tmp \ - && mv todo.conduit.tmp todo.conduit +e-todo.conduit: e-todo.conduit.in Makefile + sed -e 's^\@prefix\@^$(prefix)^g' < $(srcdir)/e-todo.conduit.in > e-todo.conduit.tmp \ + && mv e-todo.conduit.tmp e-todo.conduit ccenterdir = $(datadir)/control-center ccenterPalmPilotdir = $(ccenterdir)/Peripherals ccenterConduitsdir = $(ccenterPalmPilotdir)/Conduits -ccenterConduits_DATA = todo-conduit-control-applet.desktop +ccenterConduits_DATA = e-todo-conduit-control-applet.desktop panelConduitsdir = $(datadir)/gnome/apps/Settings/Peripherals/Conduits panelConduits_DATA = $(ccenterConduits_DATA) Conduitdir = $(datadir)/gnome-pilot/conduits/ -Conduit_DATA = todo.conduit +Conduit_DATA = e-todo.conduit EXTRA_DIST = \ - todo.conduit.in \ + e-todo.conduit.in \ $(ccenterConduits_DATA) install-data-local: diff --git a/calendar/conduits/todo/todo-conduit-config.h b/calendar/conduits/todo/todo-conduit-config.h index fb4d35c7e8..18bb353b08 100644 --- a/calendar/conduits/todo/todo-conduit-config.h +++ b/calendar/conduits/todo/todo-conduit-config.h @@ -1,4 +1,26 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* Evolution calendar - ToDo Conduit Configuration + * + * Copyright (C) 1998 Free Software Foundation + * Copyright (C) 2000 Helix Code, Inc. + * + * Authors: Eskil Heyn Olsen <deity@eskil.dk> + * JP Rosevear <jpr@helixcode.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ #ifndef __TODO_CONDUIT_CONFIG_H__ #define __TODO_CONDUIT_CONFIG_H__ @@ -8,24 +30,28 @@ #include <libgpilotdCM/gnome-pilot-conduit-config.h> /* This is the configuration of the GnomeCal conduit. */ -typedef struct _ToDoConduitCfg ToDoConduitCfg; -struct _ToDoConduitCfg { +typedef struct _EToDoConduitCfg EToDoConduitCfg; +struct _EToDoConduitCfg { gboolean open_secret; guint32 pilotId; GnomePilotConduitSyncType sync_type; /* only used by capplet */ }; static void -todoconduit_load_configuration (ToDoConduitCfg **c, guint32 pilotId) +todoconduit_load_configuration (EToDoConduitCfg **c, guint32 pilotId) { gchar prefix[256]; - g_snprintf (prefix,255,"/gnome-pilot.d/todo-conduit/Pilot_%u/",pilotId); + g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/", + pilotId); - *c = g_new0 (ToDoConduitCfg,1); + *c = g_new0 (EToDoConduitCfg,1); g_assert (*c != NULL); + gnome_config_push_prefix (prefix); (*c)->open_secret = gnome_config_get_bool ("open_secret=FALSE"); - (*c)->sync_type = GnomePilotConduitSyncTypeCustom; /* set in capplets main */ + + /* set in capplets main */ + (*c)->sync_type = GnomePilotConduitSyncTypeCustom; gnome_config_pop_prefix (); (*c)->pilotId = pilotId; @@ -33,38 +59,43 @@ todoconduit_load_configuration (ToDoConduitCfg **c, guint32 pilotId) /* Saves the configuration data. */ static void -todoconduit_save_configuration (ToDoConduitCfg *c) +todoconduit_save_configuration (EToDoConduitCfg *c) { gchar prefix[256]; - g_snprintf(prefix,255,"/gnome-pilot.d/todo-conduit/Pilot_%u/",c->pilotId); + g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/", + c->pilotId); - gnome_config_push_prefix(prefix); + gnome_config_push_prefix (prefix); gnome_config_set_bool ("open_secret", c->open_secret); - gnome_config_pop_prefix(); + gnome_config_pop_prefix (); - gnome_config_sync(); - gnome_config_drop_all(); + gnome_config_sync (); + gnome_config_drop_all (); } /* Creates a duplicate of the configuration data */ -static ToDoConduitCfg* -todoconduit_dupe_configuration (ToDoConduitCfg *c) +static EToDoConduitCfg* +todoconduit_dupe_configuration (EToDoConduitCfg *c) { - ToDoConduitCfg *retval; - g_return_val_if_fail (c!=NULL,NULL); - retval = g_new0 (ToDoConduitCfg,1); + EToDoConduitCfg *retval; + + g_return_val_if_fail (c != NULL, NULL); + + retval = g_new0 (EToDoConduitCfg, 1); retval->sync_type = c->sync_type; retval->open_secret = c->open_secret; retval->pilotId = c->pilotId; + return retval; } static void -todoconduit_destroy_configuration (ToDoConduitCfg **c) +todoconduit_destroy_configuration (EToDoConduitCfg **c) { - g_return_if_fail (c!=NULL); - g_return_if_fail (*c!=NULL); + g_return_if_fail (c != NULL); + g_return_if_fail (*c != NULL); + g_free (*c); *c = NULL; } diff --git a/calendar/conduits/todo/todo-conduit-control-applet.c b/calendar/conduits/todo/todo-conduit-control-applet.c index b8b0a36dc0..c2a8dc16da 100644 --- a/calendar/conduits/todo/todo-conduit-control-applet.c +++ b/calendar/conduits/todo/todo-conduit-control-applet.c @@ -1,7 +1,26 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* Control applet ("capplet") for the gnome-pilot todo conduit, */ -/* based on */ -/* gpilotd control applet ('capplet') for use with the GNOME control center */ +/* Evolution calendar - ToDo Conduit Capplet + * + * Copyright (C) 1998 Free Software Foundation + * Copyright (C) 2000 Helix Code, Inc. + * + * Authors: Eskil Heyn Olsen <deity@eskil.dk> + * JP Rosevear <jpr@helixcode.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ #include <pwd.h> #include <sys/types.h> @@ -29,15 +48,15 @@ GtkWidget *dialogWindow=NULL; gboolean activated,org_activation_state; GnomePilotConduitManagement *conduit; GnomePilotConduitConfig *conduit_config; -ToDoConduitCfg *origState = NULL; -ToDoConduitCfg *curState = NULL; +EToDoConduitCfg *origState = NULL; +EToDoConduitCfg *curState = NULL; -static void doTrySettings(GtkWidget *widget, ToDoConduitCfg *c); -static void doRevertSettings(GtkWidget *widget, ToDoConduitCfg *c); -static void doSaveSettings(GtkWidget *widget, ToDoConduitCfg *c); +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, ToDoConduitCfg *c); -static void setStateCfg (GtkWidget *w, ToDoConduitCfg *c); +static void readStateCfg (GtkWidget *w, EToDoConduitCfg *c); +static void setStateCfg (GtkWidget *w, EToDoConduitCfg *c); gint pilotId; static GnomePilotClient *gpc; @@ -57,7 +76,7 @@ static gchar* sync_options[] ={ N_("Disabled"), #define SYNC_OPTIONS_COUNT 6 static void -doTrySettings (GtkWidget *widget, ToDoConduitCfg *c) +doTrySettings (GtkWidget *widget, EToDoConduitCfg *c) { if (c->sync_type != GnomePilotConduitSyncTypeCustom) gnome_pilot_conduit_config_enable_with_first_sync (conduit_config, @@ -71,7 +90,7 @@ doTrySettings (GtkWidget *widget, ToDoConduitCfg *c) } static void -doRevertSettings (GtkWidget *widget, ToDoConduitCfg *c) +doRevertSettings (GtkWidget *widget, EToDoConduitCfg *c) { activated = org_activation_state; *c = *origState; @@ -80,7 +99,7 @@ doRevertSettings (GtkWidget *widget, ToDoConduitCfg *c) } static void -doSaveSettings (GtkWidget *widget, ToDoConduitCfg *c) +doSaveSettings (GtkWidget *widget, EToDoConduitCfg *c) { *origState = *c; doTrySettings (widget, c); @@ -91,13 +110,18 @@ static void doHelp (GtkWidget *widget, gpointer data) { GtkWidget *about; - const gchar *authors[] = {_("Eskil Heyn Olsen <deity@eskil.dk>"),NULL}; + const gchar *authors[] = { + _("JP Rosevear <jpr@helixcode.com>"), + "", _("Original Author:"), + _("Eskil Heyn Olsen <deity@eskil.dk>"), + NULL}; - about = gnome_about_new (_("Gpilotd todo conduit"), VERSION, - _("(C) 1998 the Free Software Foundation"), - authors, - _("Configuration utility for the todo conduit.\n"), - _("gnome-unknown.xpm")); + about = gnome_about_new ( + _("Evolution ToDo Conduit"), VERSION, + _("(C) 1998-2000 the Free Software Foundation and Helix Code"), + authors, + _("Configuration utility for the evolution todo conduit.\n"), + _("gnome-unknown.xpm")); gtk_widget_show (about); return; @@ -106,16 +130,16 @@ doHelp (GtkWidget *widget, gpointer data) /* called by the sync_type GtkOptionMenu */ static void -activate_sync_type(GtkMenuItem *widget, gpointer data) +activate_sync_type (GtkMenuItem *widget, gpointer data) { - curState->sync_type = GPOINTER_TO_INT(data); - if(!ignore_changes) - capplet_widget_state_changed(CAPPLET_WIDGET(capplet), TRUE); + curState->sync_type = GPOINTER_TO_INT (data); + if (!ignore_changes) + capplet_widget_state_changed (CAPPLET_WIDGET (capplet), TRUE); } -static GtkWidget -*createStateCfgWindow(void) +static GtkWidget * +createStateCfgWindow(void) { GtkWidget *vbox, *table; GtkWidget *label; @@ -153,7 +177,7 @@ static GtkWidget static void -setStateCfg (GtkWidget *w, ToDoConduitCfg *c) +setStateCfg (GtkWidget *w, EToDoConduitCfg *c) { GtkOptionMenu *optionMenu; GtkMenu *menu; @@ -171,7 +195,7 @@ setStateCfg (GtkWidget *w, ToDoConduitCfg *c) static void -readStateCfg (GtkWidget *w, ToDoConduitCfg *c) +readStateCfg (GtkWidget *w, EToDoConduitCfg *c) { } @@ -291,7 +315,7 @@ main (int argc, char *argv[]) /* Put all code to set things up in here */ - conduit = gnome_pilot_conduit_management_new ("todo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); + conduit = gnome_pilot_conduit_management_new ("e_todo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); if (conduit == NULL) return -1; diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c index 4ff862ceb6..f1f0e11e28 100644 --- a/calendar/conduits/todo/todo-conduit.c +++ b/calendar/conduits/todo/todo-conduit.c @@ -1,4 +1,26 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* Evolution calendar - ToDo Conduit + * + * Copyright (C) 1998 Free Software Foundation + * Copyright (C) 2000 Helix Code, Inc. + * + * Authors: Eskil Heyn Olsen <deity@eskil.dk> + * JP Rosevear <jpr@helixcode.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ #include <config.h> #include <sys/stat.h> @@ -355,7 +377,7 @@ find_record_in_repository(GnomePilotConduitStandardAbs *conduit, char *uid = NULL; EToDoLocalRecord *loc; CalClientGetStatus status; - CalComponent *obj; + CalComponent *comp; g_return_val_if_fail(conduit!=NULL,NULL); g_return_val_if_fail(remote!=NULL,NULL); @@ -368,12 +390,12 @@ find_record_in_repository(GnomePilotConduitStandardAbs *conduit, status = cal_client_get_uid_by_pilot_id (ctxt->client, remote->ID, &uid); if (status == CAL_CLIENT_GET_SUCCESS) { - status = cal_client_get_object (ctxt->client, uid, &obj); + status = cal_client_get_object (ctxt->client, uid, &comp); if (status == CAL_CLIENT_GET_SUCCESS) { - LOG ("found %s\n", cal_component_get_as_string (obj)); + LOG ("found %s\n", cal_component_get_as_string (comp)); loc = g_new0(EToDoLocalRecord,1); /* memory allocated in new_from_string is freed in free_match */ - local_record_from_compobject (loc, obj); + local_record_from_compobject (loc, comp); return loc; } LOG ("Pilot ID found, but comp for uid %s was not\n", uid); @@ -620,8 +642,6 @@ pre_sync (GnomePilotConduit *c, gtk_object_set_data (GTK_OBJECT(c), "dbinfo", dbi); - /* load_records(c); */ - buf = (unsigned char*)g_malloc (0xffff); l = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, (unsigned char *)buf, 0xffff); diff --git a/calendar/conduits/todo/todo-conduit.h b/calendar/conduits/todo/todo-conduit.h index 5cef98d5e4..ee2576ddb7 100644 --- a/calendar/conduits/todo/todo-conduit.h +++ b/calendar/conduits/todo/todo-conduit.h @@ -1,4 +1,26 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* Evolution calendar - ToDo Conduit Capplet + * + * Copyright (C) 1998 Free Software Foundation + * Copyright (C) 2000 Helix Code, Inc. + * + * Authors: Eskil Heyn Olsen <deity@eskil.dk> + * JP Rosevear <jpr@helixcode.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ #ifndef __TODO_CONDUIT_H__ #define __TODO_CONDUIT_H__ @@ -33,7 +55,7 @@ struct _EToDoLocalRecord { typedef struct _EToDoConduitContext EToDoConduitContext; struct _EToDoConduitContext { struct ToDoAppInfo ai; - ToDoConduitCfg *cfg; + EToDoConduitCfg *cfg; CalClient *client; gboolean calendar_load_tried; |