Mercurial > pidgin.yaz
comparison src/request.c @ 8843:1bbe99a07e36
[gaim-migrate @ 9610]
Pekka Riikonen has provided us with a nice file selector request API.
This is it.
committer: Tailor Script <tailor@pidgin.im>
| author | Ethan Blanton <elb@pidgin.im> |
|---|---|
| date | Fri, 30 Apr 2004 03:00:05 +0000 |
| parents | 725413cc9fb9 |
| children | 578986136bac |
comparison
equal
deleted
inserted
replaced
| 8842:ad3633f92f91 | 8843:1bbe99a07e36 |
|---|---|
| 1328 g_free(info); | 1328 g_free(info); |
| 1329 } | 1329 } |
| 1330 } | 1330 } |
| 1331 } | 1331 } |
| 1332 | 1332 |
| 1333 void * | |
| 1334 gaim_request_file(void *handle, | |
| 1335 const char *title, const char *filename, | |
| 1336 GCallback ok_cb, GCallback cancel_cb, | |
| 1337 void *user_data) | |
| 1338 { | |
| 1339 GaimRequestUiOps *ops; | |
| 1340 | |
| 1341 ops = gaim_request_get_ui_ops(); | |
| 1342 | |
| 1343 if (ops != NULL && ops->request_file != NULL) { | |
| 1344 GaimRequestInfo *info; | |
| 1345 | |
| 1346 info = g_new0(GaimRequestInfo, 1); | |
| 1347 info->type = GAIM_REQUEST_INPUT; | |
| 1348 info->handle = handle; | |
| 1349 info->ui_handle = ops->request_file(title, filename, | |
| 1350 ok_cb, cancel_cb, user_data); | |
| 1351 handles = g_list_append(handles, info); | |
| 1352 return info->ui_handle; | |
| 1353 } | |
| 1354 | |
| 1355 return NULL; | |
| 1356 } | |
| 1357 | |
| 1333 void | 1358 void |
| 1334 gaim_request_set_ui_ops(GaimRequestUiOps *ops) | 1359 gaim_request_set_ui_ops(GaimRequestUiOps *ops) |
| 1335 { | 1360 { |
| 1336 request_ui_ops = ops; | 1361 request_ui_ops = ops; |
| 1337 } | 1362 } |
