comparison finch/gntft.c @ 22217:ad357ca94de9

We will probably eventually use purple_object_[get|set]_ui_data. Until then, this will do.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 26 Jan 2008 22:33:08 +0000
parents b99d6d21cd79
children bcc355f38ba4 f5bcb58bdf56
comparison
equal deleted inserted replaced
22216:b99d6d21cd79 22217:ad357ca94de9
21 * 21 *
22 * You should have received a copy of the GNU General Public License 22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */ 25 */
26 #include "finch.h"
27
26 #include <gnt.h> 28 #include <gnt.h>
27 #include <gntbox.h> 29 #include <gntbox.h>
28 #include <gntbutton.h> 30 #include <gntbutton.h>
29 #include <gntcheckbox.h> 31 #include <gntcheckbox.h>
30 #include <gntlabel.h> 32 #include <gntlabel.h>
31 #include <gnttree.h> 33 #include <gnttree.h>
32 #include "internal.h"
33 34
34 #include "debug.h" 35 #include "debug.h"
35 #include "notify.h" 36 #include "notify.h"
36 #include "ft.h" 37 #include "ft.h"
37 #include "prpl.h" 38 #include "prpl.h"
39 40
40 #include "gntft.h" 41 #include "gntft.h"
41 #include "prefs.h" 42 #include "prefs.h"
42 43
43 #define FINCHXFER(xfer) \ 44 #define FINCHXFER(xfer) \
44 (PurpleGntXferUiData *)(xfer)->ui_data 45 (PurpleGntXferUiData *)FINCH_GET_DATA(xfer)
45 46
46 typedef struct 47 typedef struct
47 { 48 {
48 gboolean keep_open; 49 gboolean keep_open;
49 gboolean auto_clear; 50 gboolean auto_clear;
465 { 466 {
466 PurpleGntXferUiData *data; 467 PurpleGntXferUiData *data;
467 468
468 /* This is where we're setting xfer->ui_data for the first time. */ 469 /* This is where we're setting xfer->ui_data for the first time. */
469 data = g_new0(PurpleGntXferUiData, 1); 470 data = g_new0(PurpleGntXferUiData, 1);
470 xfer->ui_data = data; 471 FINCH_SET_DATA(xfer, data);
471 } 472 }
472 473
473 static void 474 static void
474 finch_xfer_destroy(PurpleXfer *xfer) 475 finch_xfer_destroy(PurpleXfer *xfer)
475 { 476 {
477 478
478 data = FINCHXFER(xfer); 479 data = FINCHXFER(xfer);
479 if (data) { 480 if (data) {
480 g_free(data->name); 481 g_free(data->name);
481 g_free(data); 482 g_free(data);
482 xfer->ui_data = NULL; 483 FINCH_SET_DATA(xfer, NULL);
483 } 484 }
484 } 485 }
485 486
486 static void 487 static void
487 finch_xfer_add_xfer(PurpleXfer *xfer) 488 finch_xfer_add_xfer(PurpleXfer *xfer)