| 435 return gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, |
435 return gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, |
| 436 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); |
436 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); |
| 437 } |
437 } |
| 438 |
438 |
| 439 static void |
439 static void |
| |
440 pidgin_request_help_clicked(GtkButton *button, gpointer _unused) |
| |
441 { |
| |
442 PurpleRequestHelpCb cb; |
| |
443 gpointer data; |
| |
444 |
| |
445 cb = g_object_get_data(G_OBJECT(button), "pidgin-help-cb"); |
| |
446 data = g_object_get_data(G_OBJECT(button), "pidgin-help-data"); |
| |
447 |
| |
448 g_return_if_fail(cb != NULL); |
| |
449 cb(data); |
| |
450 } |
| |
451 |
| |
452 static void |
| 440 pidgin_request_add_help(GtkDialog *dialog, PurpleRequestCommonParameters *cpar) |
453 pidgin_request_add_help(GtkDialog *dialog, PurpleRequestCommonParameters *cpar) |
| 441 { |
454 { |
| 442 GtkWidget *button; |
455 GtkWidget *button; |
| 443 PurpleRequestHelpCb help_cb; |
456 PurpleRequestHelpCb help_cb; |
| 444 gpointer help_data; |
457 gpointer help_data; |
| 447 if (help_cb == NULL) |
460 if (help_cb == NULL) |
| 448 return; |
461 return; |
| 449 |
462 |
| 450 button = gtk_dialog_add_button(dialog, GTK_STOCK_HELP, |
463 button = gtk_dialog_add_button(dialog, GTK_STOCK_HELP, |
| 451 GTK_RESPONSE_HELP); |
464 GTK_RESPONSE_HELP); |
| 452 g_signal_connect(G_OBJECT(button), "clicked", (GCallback)help_cb, |
465 |
| 453 help_data); |
466 g_object_set_data(G_OBJECT(button), "pidgin-help-cb", help_cb); |
| |
467 g_object_set_data(G_OBJECT(button), "pidgin-help-data", help_data); |
| |
468 |
| |
469 g_signal_connect(G_OBJECT(button), "clicked", |
| |
470 G_CALLBACK(pidgin_request_help_clicked), NULL); |
| 454 } |
471 } |
| 455 |
472 |
| 456 static void * |
473 static void * |
| 457 pidgin_request_input(const char *title, const char *primary, |
474 pidgin_request_input(const char *title, const char *primary, |
| 458 const char *secondary, const char *default_value, |
475 const char *secondary, const char *default_value, |