From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- calendar/conduits/memo/memo-conduit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 4d599a6924..61e5c852e3 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -12,7 +12,7 @@ * 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 + * License along with the program; if not, see * * * Authors: -- cgit v1.2.3 From 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 27 May 2009 10:29:19 -0400 Subject: Prefer GLib basic types over C types. --- calendar/conduits/memo/memo-conduit.c | 86 +++++++++++++++++------------------ 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 61e5c852e3..1d32917760 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -86,7 +86,7 @@ struct _EMemoLocalRecord { struct Memo *memo; }; -int lastDesktopUniqueID; +gint lastDesktopUniqueID; static void memoconduit_destroy_record (EMemoLocalRecord *local) @@ -297,10 +297,10 @@ e_memo_context_destroy (EMemoConduitContext *ctxt) } /* Debug routines */ -static char * +static gchar * print_local (EMemoLocalRecord *local) { - static char buff[ 64 ]; + static gchar buff[ 64 ]; if (local == NULL) { sprintf (buff, "[NULL]"); @@ -317,9 +317,9 @@ print_local (EMemoLocalRecord *local) return ""; } -static char *print_remote (GnomePilotRecord *remote) +static gchar *print_remote (GnomePilotRecord *remote) { - static char buff[ 64 ]; + static gchar buff[ 64 ]; struct Memo memo; #ifdef PILOT_LINK_0_12 pi_buffer_t *buffer; @@ -377,7 +377,7 @@ get_default_timezone (void) { EConfigListener *listener; icaltimezone *timezone = NULL; - char *location; + gchar *location; listener = e_config_listener_new (); @@ -396,10 +396,10 @@ get_default_timezone (void) return timezone; } -static char * +static gchar * map_name (EMemoConduitContext *ctxt) { - char *filename; + gchar *filename; filename = g_strdup_printf ("%s/.evolution/memos/local/system/pilot-map-memo-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id); @@ -413,7 +413,7 @@ next_changed_item (EMemoConduitContext *ctxt, GList *changes) GList *l; for (l = changes; l != NULL; l = l->next) { - const char *uid; + const gchar *uid; ccc = l->data; @@ -426,7 +426,7 @@ next_changed_item (EMemoConduitContext *ctxt, GList *changes) } static void -compute_status (EMemoConduitContext *ctxt, EMemoLocalRecord *local, const char *uid) +compute_status (EMemoConduitContext *ctxt, EMemoLocalRecord *local, const gchar *uid) { ECalChange *ccc; @@ -461,7 +461,7 @@ local_record_to_pilot_record (EMemoLocalRecord *local, #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #else - static char record[0xffff]; + static gchar record[0xffff]; #endif memset(&p, 0, sizeof (p)); @@ -494,7 +494,7 @@ local_record_to_pilot_record (EMemoLocalRecord *local, pi_buffer_free(buffer); #else - p.record = (unsigned char *)record; + p.record = (guchar *)record; p.length = pack_Memo (local->memo, p.record, 0xffff); #endif return p; @@ -506,7 +506,7 @@ local_record_to_pilot_record (EMemoLocalRecord *local, static void local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; GSList *d_list = NULL; ECalComponentText *description; ECalComponentClassification classif; @@ -537,9 +537,9 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu struct Memo memo; pi_buffer_t * record; #else - char record[0xffff]; + gchar record[0xffff]; #endif - int cat = 0; + gint cat = 0; #ifdef PILOT_LINK_0_12 record = pi_buffer_new(DLP_BUF_SIZE); @@ -602,7 +602,7 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu static void local_record_from_uid (EMemoLocalRecord *local, - const char *uid, + const gchar *uid, EMemoConduitContext *ctxt) { ECalComponent *comp; @@ -648,8 +648,8 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, struct Memo memo; struct icaltimetype now; icaltimezone *utc_zone; - char *txt, *txt2, *txt3; - int i; + gchar *txt, *txt2, *txt3; + gint i; #ifdef PILOT_LINK_0_12 pi_buffer_t * buffer; #endif @@ -694,7 +694,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, e_cal_component_set_comment_list (comp, NULL); e_cal_component_set_summary(comp, NULL); } else { - int idxToUse = -1, ntext = strlen(memo.text); + gint idxToUse = -1, ntext = strlen(memo.text); gboolean foundNL = FALSE; GSList l; ECalComponentText text, sumText; @@ -755,8 +755,8 @@ static void check_for_slow_setting (GnomePilotConduit *c, EMemoConduitContext *ctxt) { GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c); - int map_count; - const char *uri; + gint map_count; + const gchar *uri; /* If there are no objects or objects but no log */ map_count = g_hash_table_size (ctxt->map->pid_map); @@ -787,9 +787,9 @@ pre_sync (GnomePilotConduit *conduit, { GnomePilotConduitSyncAbs *abs_conduit; GList *l; - int len; - unsigned char *buf; - char *filename, *change_id; + gint len; + guchar *buf; + gchar *filename, *change_id; icalcomponent *icalcomp; gint num_records, add_records = 0, mod_records = 0, del_records = 0; #ifdef PILOT_LINK_0_12 @@ -851,7 +851,7 @@ pre_sync (GnomePilotConduit *conduit, for (l = ctxt->changed; l != NULL; l = l->next) { ECalChange *ccc = l->data; - const char *uid; + const gchar *uid; e_cal_component_get_uid (ccc->comp, &uid); if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) { @@ -895,9 +895,9 @@ pre_sync (GnomePilotConduit *conduit, DLP_BUF_SIZE, buffer); #else - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, - (unsigned char *)buf, 0xffff); + (guchar *)buf, 0xffff); #endif if (len < 0) { WARN (_("Could not read pilot's Memo application block")); @@ -934,15 +934,15 @@ post_sync (GnomePilotConduit *conduit, { GList *changed; gchar *filename, *change_id; - unsigned char *buf; - int dlpRetVal, len; + guchar *buf; + gint dlpRetVal, len; - buf = (unsigned char*)g_malloc (0xffff); + buf = (guchar *)g_malloc (0xffff); len = pack_MemoAppInfo (&(ctxt->ai), buf, 0xffff); dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle, - (unsigned char *)buf, len); + (guchar *)buf, len); g_free (buf); @@ -984,7 +984,7 @@ set_pilot_id (GnomePilotConduitSyncAbs *conduit, guint32 ID, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_pilot_id: setting to %d\n", ID )); @@ -999,7 +999,7 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit, EMemoLocalRecord *local, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ( "set_status_cleared: clearing status\n" )); @@ -1015,7 +1015,7 @@ for_each (GnomePilotConduitSyncAbs *conduit, EMemoConduitContext *ctxt) { static GList *comps, *iterator; - static int count; + static gint count; GList *unused; g_return_val_if_fail (local != NULL, -1); @@ -1075,7 +1075,7 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit, EMemoConduitContext *ctxt) { static GList *iterator; - static int count; + static gint count; GList *unused; g_return_val_if_fail (local != NULL, 0); @@ -1138,7 +1138,7 @@ compare (GnomePilotConduitSyncAbs *conduit, { /* used by the quick compare */ GnomePilotRecord local_pilot; - int retval = 0; + gint retval = 0; LOG (g_message ("compare: local=%s remote=%s...\n", print_local (local), print_remote (remote))); @@ -1166,8 +1166,8 @@ add_record (GnomePilotConduitSyncAbs *conduit, EMemoConduitContext *ctxt) { ECalComponent *comp; - char *uid; - int retval = 0; + gchar *uid; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1196,7 +1196,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit, EMemoConduitContext *ctxt) { ECalComponent *new_comp; - int retval = 0; + gint retval = 0; g_return_val_if_fail (remote != NULL, -1); @@ -1219,7 +1219,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit, EMemoLocalRecord *local, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; g_return_val_if_fail (local != NULL, -1); g_return_val_if_fail (local->comp != NULL, -1); @@ -1241,8 +1241,8 @@ archive_record (GnomePilotConduitSyncAbs *conduit, gboolean archive, EMemoConduitContext *ctxt) { - const char *uid; - int retval = 0; + const gchar *uid; + gint retval = 0; g_return_val_if_fail (local != NULL, -1); @@ -1260,7 +1260,7 @@ match (GnomePilotConduitSyncAbs *conduit, EMemoLocalRecord **local, EMemoConduitContext *ctxt) { - const char *uid; + const gchar *uid; LOG (g_message ("match: looking for local copy of %s\n", print_remote (remote))); -- cgit v1.2.3 From 14f8eee012382f04090ea9277e9567d5f32e8bf0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 28 May 2009 13:06:29 -0400 Subject: Whitespace cleanup. --- calendar/conduits/memo/memo-conduit.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 1d32917760..9a226f59b8 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -891,7 +891,7 @@ pre_sync (GnomePilotConduit *conduit, return -1; } - len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, + len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0, DLP_BUF_SIZE, buffer); #else @@ -909,7 +909,7 @@ pre_sync (GnomePilotConduit *conduit, #ifdef PILOT_LINK_0_12 buf = g_new0 (unsigned char,buffer->used); memcpy(buf, buffer->data, buffer->used); - unpack_MemoAppInfo (&(ctxt->ai), buf, len); + unpack_MemoAppInfo (&(ctxt->ai), buf, len); pi_buffer_free(buffer); #else unpack_MemoAppInfo (&(ctxt->ai), buf, len); @@ -1035,7 +1035,7 @@ for_each (GnomePilotConduitSyncAbs *conduit, /* NOTE: ignore the return value, otherwise ctxt->locals * gets messed up. The calling function keeps track of * the *local variable */ - unused = g_list_prepend (ctxt->locals, *local); + unused = g_list_prepend (ctxt->locals, *local); iterator = comps; } else { LOG (g_message ( "no events" )); @@ -1391,22 +1391,22 @@ conduit_get_gpilot_conduit (guint32 pilot_id) g_signal_connect (retval, "pre_sync", G_CALLBACK (pre_sync), ctxt); g_signal_connect (retval, "post_sync", G_CALLBACK (post_sync), ctxt); - g_signal_connect (retval, "set_pilot_id", G_CALLBACK (set_pilot_id), ctxt); - g_signal_connect (retval, "set_status_cleared", G_CALLBACK (set_status_cleared), ctxt); + g_signal_connect (retval, "set_pilot_id", G_CALLBACK (set_pilot_id), ctxt); + g_signal_connect (retval, "set_status_cleared", G_CALLBACK (set_status_cleared), ctxt); - g_signal_connect (retval, "for_each", G_CALLBACK (for_each), ctxt); - g_signal_connect (retval, "for_each_modified", G_CALLBACK (for_each_modified), ctxt); - g_signal_connect (retval, "compare", G_CALLBACK (compare), ctxt); + g_signal_connect (retval, "for_each", G_CALLBACK (for_each), ctxt); + g_signal_connect (retval, "for_each_modified", G_CALLBACK (for_each_modified), ctxt); + g_signal_connect (retval, "compare", G_CALLBACK (compare), ctxt); - g_signal_connect (retval, "add_record", G_CALLBACK (add_record), ctxt); - g_signal_connect (retval, "replace_record", G_CALLBACK (replace_record), ctxt); - g_signal_connect (retval, "delete_record", G_CALLBACK (delete_record), ctxt); - g_signal_connect (retval, "archive_record", G_CALLBACK (archive_record), ctxt); + g_signal_connect (retval, "add_record", G_CALLBACK (add_record), ctxt); + g_signal_connect (retval, "replace_record", G_CALLBACK (replace_record), ctxt); + g_signal_connect (retval, "delete_record", G_CALLBACK (delete_record), ctxt); + g_signal_connect (retval, "archive_record", G_CALLBACK (archive_record), ctxt); - g_signal_connect (retval, "match", G_CALLBACK (match), ctxt); - g_signal_connect (retval, "free_match", G_CALLBACK (free_match), ctxt); + g_signal_connect (retval, "match", G_CALLBACK (match), ctxt); + g_signal_connect (retval, "free_match", G_CALLBACK (free_match), ctxt); - g_signal_connect (retval, "prepare", G_CALLBACK (prepare), ctxt); + g_signal_connect (retval, "prepare", G_CALLBACK (prepare), ctxt); /* Gui Settings */ g_signal_connect (retval, "create_settings_window", G_CALLBACK (create_settings_window), ctxt); -- cgit v1.2.3 From 433eac7844481b8ceda0bae8bf08f6bb623185b0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 1 Jun 2009 19:09:19 -0400 Subject: More code cleanup. --- calendar/conduits/memo/memo-conduit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 9a226f59b8..b22216eecd 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -356,7 +356,7 @@ static gchar *print_remote (GnomePilotRecord *remote) return buff; } -static int +static gint start_calendar_server (EMemoConduitContext *ctxt) { g_return_val_if_fail (ctxt != NULL, -2); -- cgit v1.2.3 From b0e26e9c5f13c710c7677959cc457158206befe1 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 5 Jun 2009 14:48:29 +0200 Subject: Fix even more compiler warnings and disable one for format strings --- calendar/conduits/memo/memo-conduit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index b22216eecd..8fae261828 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -126,7 +126,7 @@ memoconduit_load_configuration (guint32 pilot_id) c->pilot_id = pilot_id; - management = gnome_pilot_conduit_management_new ("e_memo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); + management = gnome_pilot_conduit_management_new ((gchar*)"e_memo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); g_object_ref_sink (management); config = gnome_pilot_conduit_config_new (management, pilot_id); g_object_ref_sink (config); @@ -314,7 +314,8 @@ print_local (EMemoLocalRecord *local) return buff; } - return ""; + strcpy (buff, ""); + return buff; } static gchar *print_remote (GnomePilotRecord *remote) @@ -1382,7 +1383,7 @@ conduit_get_gpilot_conduit (guint32 pilot_id) LOG (g_message ( "in memo's conduit_get_gpilot_conduit\n" )); - retval = gnome_pilot_conduit_sync_abs_new ("MemoDB", 0x6D656D6F); + retval = gnome_pilot_conduit_sync_abs_new ((gchar*)"MemoDB", 0x6D656D6F); g_assert (retval != NULL); ctxt = e_memo_context_new (pilot_id); -- cgit v1.2.3 From dc0ab70f11e998c5d038fe1f078768b8dc071dc7 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 13 Jun 2009 22:06:45 -0400 Subject: Fix coding style. --- calendar/conduits/memo/memo-conduit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 8fae261828..0027337b5b 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -126,7 +126,7 @@ memoconduit_load_configuration (guint32 pilot_id) c->pilot_id = pilot_id; - management = gnome_pilot_conduit_management_new ((gchar*)"e_memo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); + management = gnome_pilot_conduit_management_new ((gchar *)"e_memo_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); g_object_ref_sink (management); config = gnome_pilot_conduit_config_new (management, pilot_id); g_object_ref_sink (config); @@ -1383,7 +1383,7 @@ conduit_get_gpilot_conduit (guint32 pilot_id) LOG (g_message ( "in memo's conduit_get_gpilot_conduit\n" )); - retval = gnome_pilot_conduit_sync_abs_new ((gchar*)"MemoDB", 0x6D656D6F); + retval = gnome_pilot_conduit_sync_abs_new ((gchar *)"MemoDB", 0x6D656D6F); g_assert (retval != NULL); ctxt = e_memo_context_new (pilot_id); -- cgit v1.2.3 From bfc5ba2511dc5fd9f5aa9868946c8860afad81bf Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 30 Jun 2009 18:34:08 -0400 Subject: Fix "make distcheck" errors and other build cleanups. --- calendar/conduits/memo/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/Makefile.am b/calendar/conduits/memo/Makefile.am index 01a04579f7..b8502cba89 100644 --- a/calendar/conduits/memo/Makefile.am +++ b/calendar/conduits/memo/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/e-util \ -I$(top_builddir)/e-util \ -I$(top_srcdir)/widgets/misc \ -- cgit v1.2.3 From f9049cded460a9e316fa83ff1941970abfe0fd09 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 2 Jul 2009 19:13:15 -0400 Subject: Kill EConfigListener. --- calendar/conduits/memo/memo-conduit.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 0027337b5b..48a8f59f6e 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -46,7 +46,6 @@ #include #include #include -#include #include GnomePilotConduit * conduit_get_gpilot_conduit (guint32); @@ -376,15 +375,16 @@ start_calendar_server (EMemoConduitContext *ctxt) static icaltimezone * get_default_timezone (void) { - EConfigListener *listener; + GConfClient *client; icaltimezone *timezone = NULL; + const gchar *key; gchar *location; - listener = e_config_listener_new (); + client = gconf_client_get_default (); + key = "/apps/evolution/calendar/display/timezone"; + location = gconf_client_get_string (client, key, NULL); - location = e_config_listener_get_string_with_default (listener, - "/apps/evolution/calendar/display/timezone", "UTC", NULL); - if (!location || !location[0]) { + if (location == NULL || *location == '\0') { g_free (location); location = g_strdup ("UTC"); } @@ -392,7 +392,7 @@ get_default_timezone (void) timezone = icaltimezone_get_builtin_timezone (location); g_free (location); - g_object_unref (listener); + g_object_unref (client); return timezone; } -- cgit v1.2.3 From 374bd42f69aca2e132fd854c9619f3d7491f1f96 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 12 Jul 2009 23:33:07 -0400 Subject: Fix excessive whitespace. --- calendar/conduits/memo/memo-conduit.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index 48a8f59f6e..ae45e82439 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -117,7 +117,6 @@ memoconduit_load_configuration (guint32 pilot_id) GnomePilotConduitConfig *config; gchar prefix[256]; - g_snprintf (prefix, 255, "e-memo-conduit/Pilot_%u", pilot_id); c = g_new0 (EMemoConduitCfg,1); @@ -637,7 +636,6 @@ local_record_from_uid (EMemoLocalRecord *local, g_clear_error (&error); } - static ECalComponent * comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, GnomePilotRecord *remote, @@ -737,7 +735,6 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, free(txt3); } - e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_NONE); if (remote->secret) @@ -955,7 +952,6 @@ post_sync (GnomePilotConduit *conduit, return -1; } - LOG (g_message ( "post_sync: Memo Conduit v.%s", CONDUIT_VERSION )); g_free (ctxt->cfg->last_uri); -- cgit v1.2.3 From fa360fde289f9b850191f89059d1a5e6d67c07c7 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 18 Jul 2009 14:07:42 -0400 Subject: More whitespace cleanup. --- calendar/conduits/memo/memo-conduit.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index ae45e82439..ac28e0465c 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -332,11 +332,11 @@ static gchar *print_remote (GnomePilotRecord *remote) memset (&memo, 0, sizeof (struct Memo)); #ifdef PILOT_LINK_0_12 buffer = pi_buffer_new(DLP_BUF_SIZE); - if(buffer == NULL){ + if (buffer == NULL) { sprintf (buff, "[NULL]"); return buff; } - if(pi_buffer_append(buffer, remote->record, remote->length)==NULL){ + if (pi_buffer_append(buffer, remote->record, remote->length)==NULL) { sprintf (buff, "[NULL]"); return buff; } @@ -482,7 +482,7 @@ local_record_to_pilot_record (EMemoLocalRecord *local, /* Generate pilot record structure */ #ifdef PILOT_LINK_0_12 buffer = pi_buffer_new(DLP_BUF_SIZE); - if(buffer == NULL){ + if (buffer == NULL) { pi_set_error(ctxt->dbi->pilot_socket, PI_ERR_GENERIC_MEMORY); return p; } @@ -543,7 +543,7 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu #ifdef PILOT_LINK_0_12 record = pi_buffer_new(DLP_BUF_SIZE); - if(record == NULL){ + if (record == NULL) { pi_set_error(ctxt->dbi->pilot_socket, PI_ERR_GENERIC_MEMORY); return; } @@ -580,7 +580,7 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu e_cal_component_get_description_list (comp, &d_list); if (d_list) { description = (ECalComponentText *) d_list->data; - if (description && description->value){ + if (description && description->value) { local->memo->text = e_pilot_utf8_to_pchar (description->value); } else{ @@ -656,11 +656,11 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, #ifdef PILOT_LINK_0_12 buffer = pi_buffer_new(DLP_BUF_SIZE); - if(buffer == NULL){ + if (buffer == NULL) { return NULL; } - if(pi_buffer_append(buffer, remote->record, remote->length)==NULL){ + if (pi_buffer_append(buffer, remote->record, remote->length)==NULL) { return NULL; } @@ -698,16 +698,16 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit, GSList l; ECalComponentText text, sumText; - for(i = 0; i 50){ + if (foundNL == FALSE) { + if (ntext > 50) { txt2 = g_strndup(memo.text, 50); } else{ @@ -884,7 +884,7 @@ pre_sync (GnomePilotConduit *conduit, #ifdef PILOT_LINK_0_12 buffer = pi_buffer_new(DLP_BUF_SIZE); - if(buffer == NULL){ + if (buffer == NULL) { pi_set_error(dbi->pilot_socket, PI_ERR_GENERIC_MEMORY); return -1; } -- cgit v1.2.3 From 672adf12a0923437e90d08ab7925bd9329fcce0d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 16 Aug 2009 11:25:08 -0400 Subject: Fix compiler warnings and deprecated GTK+ API usage. --- calendar/conduits/memo/memo-conduit.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'calendar/conduits/memo') diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c index ac28e0465c..a7bc8952a1 100644 --- a/calendar/conduits/memo/memo-conduit.c +++ b/calendar/conduits/memo/memo-conduit.c @@ -29,6 +29,13 @@ #define G_LOG_DOMAIN "ememoconduit" +/* Work around deprecated API usage in GnomePilot. */ +#ifdef GTK_DISABLE_DEPRECATED +#include +#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST +typedef GType GtkType; +#endif + #include #include #include -- cgit v1.2.3