| 4467 PurpleAccount *account) |
4467 PurpleAccount *account) |
| 4468 { |
4468 { |
| 4469 g_hash_table_remove(gtkblist->connection_errors, account); |
4469 g_hash_table_remove(gtkblist->connection_errors, account); |
| 4470 } |
4470 } |
| 4471 |
4471 |
| |
4472 #define SSL_FAQ_URI "http://d.pidgin.im/wiki/FAQssl" |
| |
4473 |
| |
4474 static void |
| |
4475 ssl_faq_clicked_cb(GtkButton *button, |
| |
4476 PurpleAccount *account) |
| |
4477 { |
| |
4478 purple_notify_uri(NULL, SSL_FAQ_URI); |
| |
4479 } |
| |
4480 |
| 4472 static void |
4481 static void |
| 4473 add_generic_error_dialog(PurpleAccount *account, |
4482 add_generic_error_dialog(PurpleAccount *account, |
| 4474 const PurpleConnectionErrorInfo *err) |
4483 const PurpleConnectionErrorInfo *err) |
| 4475 { |
4484 { |
| 4476 GtkWidget *mini_dialog; |
4485 GtkWidget *mini_dialog; |
| 4495 |
4504 |
| 4496 g_free(primary); |
4505 g_free(primary); |
| 4497 |
4506 |
| 4498 g_object_set_data(G_OBJECT(mini_dialog), OBJECT_DATA_KEY_ACCOUNT, |
4507 g_object_set_data(G_OBJECT(mini_dialog), OBJECT_DATA_KEY_ACCOUNT, |
| 4499 account); |
4508 account); |
| |
4509 |
| |
4510 if(err->type == PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT) { |
| |
4511 GtkWidget *faq_button = gtk_button_new(); |
| |
4512 GtkWidget *faq_label = gtk_label_new(NULL); |
| |
4513 gtk_label_set_markup(GTK_LABEL(faq_label), |
| |
4514 "<span underline=\"single\" foreground=\"blue\"" |
| |
4515 " size=\"smaller\">" SSL_FAQ_URI "</span>"); |
| |
4516 #if GTK_CHECK_VERSION(2,6,0) |
| |
4517 g_object_set(G_OBJECT(faq_label), "ellipsize", |
| |
4518 PANGO_ELLIPSIZE_MIDDLE, NULL); |
| |
4519 #endif |
| |
4520 gtk_container_add(GTK_CONTAINER(faq_button), faq_label); |
| |
4521 gtk_button_set_relief(GTK_BUTTON(faq_button), GTK_RELIEF_NONE); |
| |
4522 |
| |
4523 g_signal_connect(faq_button, "clicked", |
| |
4524 (GCallback)ssl_faq_clicked_cb, account); |
| |
4525 |
| |
4526 gtk_box_pack_start(PIDGIN_MINI_DIALOG(mini_dialog)->contents, |
| |
4527 faq_button, FALSE, FALSE, 0); |
| |
4528 } |
| 4500 |
4529 |
| 4501 g_signal_connect_after(mini_dialog, "destroy", |
4530 g_signal_connect_after(mini_dialog, "destroy", |
| 4502 (GCallback)generic_error_destroy_cb, |
4531 (GCallback)generic_error_destroy_cb, |
| 4503 account); |
4532 account); |
| 4504 |
4533 |