| 283 pidgin_request_input(const char *title, const char *primary, |
283 pidgin_request_input(const char *title, const char *primary, |
| 284 const char *secondary, const char *default_value, |
284 const char *secondary, const char *default_value, |
| 285 gboolean multiline, gboolean masked, gchar *hint, |
285 gboolean multiline, gboolean masked, gchar *hint, |
| 286 const char *ok_text, GCallback ok_cb, |
286 const char *ok_text, GCallback ok_cb, |
| 287 const char *cancel_text, GCallback cancel_cb, |
287 const char *cancel_text, GCallback cancel_cb, |
| |
288 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 288 void *user_data) |
289 void *user_data) |
| 289 { |
290 { |
| 290 PidginRequestData *data; |
291 PidginRequestData *data; |
| 291 GtkWidget *dialog; |
292 GtkWidget *dialog; |
| 292 GtkWidget *vbox; |
293 GtkWidget *vbox; |
| 441 static void * |
442 static void * |
| 442 pidgin_request_choice(const char *title, const char *primary, |
443 pidgin_request_choice(const char *title, const char *primary, |
| 443 const char *secondary, unsigned int default_value, |
444 const char *secondary, unsigned int default_value, |
| 444 const char *ok_text, GCallback ok_cb, |
445 const char *ok_text, GCallback ok_cb, |
| 445 const char *cancel_text, GCallback cancel_cb, |
446 const char *cancel_text, GCallback cancel_cb, |
| |
447 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 446 void *user_data, va_list args) |
448 void *user_data, va_list args) |
| 447 { |
449 { |
| 448 PidginRequestData *data; |
450 PidginRequestData *data; |
| 449 GtkWidget *dialog; |
451 GtkWidget *dialog; |
| 450 GtkWidget *vbox, *vbox2; |
452 GtkWidget *vbox, *vbox2; |
| 542 } |
544 } |
| 543 |
545 |
| 544 static void * |
546 static void * |
| 545 pidgin_request_action(const char *title, const char *primary, |
547 pidgin_request_action(const char *title, const char *primary, |
| 546 const char *secondary, unsigned int default_action, |
548 const char *secondary, unsigned int default_action, |
| |
549 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 547 void *user_data, size_t action_count, va_list actions) |
550 void *user_data, size_t action_count, va_list actions) |
| 548 { |
551 { |
| 549 PidginRequestData *data; |
552 PidginRequestData *data; |
| 550 GtkWidget *dialog; |
553 GtkWidget *dialog; |
| 551 GtkWidget *vbox; |
554 GtkWidget *vbox; |
| 1023 static void * |
1026 static void * |
| 1024 pidgin_request_fields(const char *title, const char *primary, |
1027 pidgin_request_fields(const char *title, const char *primary, |
| 1025 const char *secondary, PurpleRequestFields *fields, |
1028 const char *secondary, PurpleRequestFields *fields, |
| 1026 const char *ok_text, GCallback ok_cb, |
1029 const char *ok_text, GCallback ok_cb, |
| 1027 const char *cancel_text, GCallback cancel_cb, |
1030 const char *cancel_text, GCallback cancel_cb, |
| |
1031 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1028 void *user_data) |
1032 void *user_data) |
| 1029 { |
1033 { |
| 1030 PidginRequestData *data; |
1034 PidginRequestData *data; |
| 1031 GtkWidget *win; |
1035 GtkWidget *win; |
| 1032 GtkWidget *vbox; |
1036 GtkWidget *vbox; |
| 1465 #endif /* FILECHOOSER */ |
1469 #endif /* FILECHOOSER */ |
| 1466 |
1470 |
| 1467 if ((data->u.file.savedialog == TRUE) && |
1471 if ((data->u.file.savedialog == TRUE) && |
| 1468 (g_file_test(data->u.file.name, G_FILE_TEST_EXISTS))) { |
1472 (g_file_test(data->u.file.name, G_FILE_TEST_EXISTS))) { |
| 1469 purple_request_action(data, NULL, _("That file already exists"), |
1473 purple_request_action(data, NULL, _("That file already exists"), |
| 1470 _("Would you like to overwrite it?"), 0, data, 2, |
1474 _("Would you like to overwrite it?"), 0, |
| |
1475 NULL, NULL, NULL, |
| |
1476 data, 2, |
| 1471 _("Overwrite"), G_CALLBACK(file_yes_no_cb), |
1477 _("Overwrite"), G_CALLBACK(file_yes_no_cb), |
| 1472 _("Choose New Name"), G_CALLBACK(file_yes_no_cb)); |
1478 _("Choose New Name"), G_CALLBACK(file_yes_no_cb)); |
| 1473 } else |
1479 } else |
| 1474 file_yes_no_cb(data, 1); |
1480 file_yes_no_cb(data, 1); |
| 1475 } |
1481 } |
| 1489 |
1495 |
| 1490 static void * |
1496 static void * |
| 1491 pidgin_request_file(const char *title, const char *filename, |
1497 pidgin_request_file(const char *title, const char *filename, |
| 1492 gboolean savedialog, |
1498 gboolean savedialog, |
| 1493 GCallback ok_cb, GCallback cancel_cb, |
1499 GCallback ok_cb, GCallback cancel_cb, |
| |
1500 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1494 void *user_data) |
1501 void *user_data) |
| 1495 { |
1502 { |
| 1496 PidginRequestData *data; |
1503 PidginRequestData *data; |
| 1497 GtkWidget *filesel; |
1504 GtkWidget *filesel; |
| 1498 const gchar *current_folder; |
1505 const gchar *current_folder; |
| 1586 } |
1593 } |
| 1587 |
1594 |
| 1588 static void * |
1595 static void * |
| 1589 pidgin_request_folder(const char *title, const char *dirname, |
1596 pidgin_request_folder(const char *title, const char *dirname, |
| 1590 GCallback ok_cb, GCallback cancel_cb, |
1597 GCallback ok_cb, GCallback cancel_cb, |
| |
1598 PurpleAccount *account, const char *who, PurpleConversation *conv, |
| 1591 void *user_data) |
1599 void *user_data) |
| 1592 { |
1600 { |
| 1593 PidginRequestData *data; |
1601 PidginRequestData *data; |
| 1594 GtkWidget *dirsel; |
1602 GtkWidget *dirsel; |
| 1595 |
1603 |