comparison src/ft.c @ 5169:71927464a1db

[gaim-migrate @ 5533] I needed to do this for getfile. Basically, I added a new ui operation for when a new xfer is created. The ui operation creates the needed ui data. Previously it was done when the file was choosen, but with getfile, when sending files to other peeps there isn't a "save file" or "choose file to send" dialog. Ya catch my drift? committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 18 Apr 2003 21:01:38 +0000
parents 98d16e2d1bf9
children ad445074d239
comparison
equal deleted inserted replaced
5168:0f31d00d2501 5169:71927464a1db
39 struct gaim_xfer * 39 struct gaim_xfer *
40 gaim_xfer_new(struct gaim_account *account, GaimXferType type, 40 gaim_xfer_new(struct gaim_account *account, GaimXferType type,
41 const char *who) 41 const char *who)
42 { 42 {
43 struct gaim_xfer *xfer; 43 struct gaim_xfer *xfer;
44 struct gaim_xfer_ui_ops *ui_ops;
44 45
45 if (account == NULL || type == GAIM_XFER_UNKNOWN || who == NULL) 46 if (account == NULL || type == GAIM_XFER_UNKNOWN || who == NULL)
46 return NULL; 47 return NULL;
47 48
48 xfer = g_malloc0(sizeof(struct gaim_xfer)); 49 xfer = g_malloc0(sizeof(struct gaim_xfer));
49 50
50 xfer->type = type; 51 xfer->type = type;
51 xfer->account = account; 52 xfer->account = account;
52 xfer->who = g_strdup(who); 53 xfer->who = g_strdup(who);
53 xfer->ui_ops = gaim_get_xfer_ui_ops(); 54 xfer->ui_ops = gaim_get_xfer_ui_ops();
55
56 ui_ops = gaim_xfer_get_ui_ops(xfer);
57
58 if (ui_ops != NULL && ui_ops->new != NULL)
59 ui_ops->new(xfer);
54 60
55 return xfer; 61 return xfer;
56 } 62 }
57 63
58 void 64 void