# HG changeset patch # User andrew.victor@mxit.com # Date 1314389375 0 # Node ID e893296d853b9736b66286f1fd3b9c681739adc7 # Parent a2febd62ec3ddec41385b1e7664f710f49ef5b8c Convert Finch to use the new accessor functions. diff -r a2febd62ec3d -r e893296d853b finch/gntft.c --- a/finch/gntft.c Fri Aug 26 20:04:35 2011 +0000 +++ b/finch/gntft.c Fri Aug 26 20:09:35 2011 +0000 @@ -42,9 +42,6 @@ #include "gntft.h" #include "prefs.h" -#define FINCHXFER(xfer) \ - (PurpleGntXferUiData *)FINCH_GET_DATA(xfer) - typedef struct { gboolean keep_open; @@ -262,7 +259,7 @@ for (iter = purple_xfers_get_all(); iter; iter = iter->next) { PurpleXfer *xfer = (PurpleXfer *)iter->data; - PurpleGntXferUiData *data = FINCHXFER(xfer); + PurpleGntXferUiData *data = purple_xfer_get_ui_data(xfer); if (data->in_list) { finch_xfer_dialog_add_xfer(xfer); finch_xfer_dialog_update_xfer(xfer); @@ -302,7 +299,7 @@ purple_xfer_ref(xfer); - data = FINCHXFER(xfer); + data = purple_xfer_get_ui_data(xfer); data->in_list = TRUE; finch_xfer_dialog_show(); @@ -340,7 +337,7 @@ g_return_if_fail(xfer_dialog != NULL); g_return_if_fail(xfer != NULL); - data = FINCHXFER(xfer); + data = purple_xfer_get_ui_data(xfer); if (data == NULL) return; @@ -370,7 +367,7 @@ g_return_if_fail(xfer_dialog != NULL); g_return_if_fail(xfer != NULL); - data = FINCHXFER(xfer); + data = purple_xfer_get_ui_data(xfer); if (data == NULL) return; @@ -416,7 +413,7 @@ g_return_if_fail(xfer_dialog != NULL); g_return_if_fail(xfer != NULL); - if ((data = FINCHXFER(xfer)) == NULL) + if ((data = purple_xfer_get_ui_data(xfer)) == NULL) return; if (data->in_list == FALSE || data->notified) @@ -471,9 +468,9 @@ { PurpleGntXferUiData *data; - /* This is where we're setting xfer->ui_data for the first time. */ + /* This is where we're setting xfer's "ui_data" for the first time. */ data = g_new0(PurpleGntXferUiData, 1); - FINCH_SET_DATA(xfer, data); + purple_xfer_set_ui_data(xfer, data); } static void @@ -481,11 +478,11 @@ { PurpleGntXferUiData *data; - data = FINCHXFER(xfer); + data = purple_xfer_get_ui_data(xfer); if (data) { g_free(data->name); g_free(data); - FINCH_SET_DATA(xfer, NULL); + purple_xfer_set_ui_data(xfer, NULL); } }