# HG changeset patch # User Stu Tomlinson # Date 1194894241 0 # Node ID f3225e454f8d7ea5b83bd330561d81c5a5f03999 # Parent 389a51db740fd3795e62217ba857e96089bfa6d3# Parent 675fbb9a402e121ac08dd1b328ff7fbfacac8ab4 merge of '9a0d3011817c44b114c37789a6561df8c8d75a80' and 'fb7fda6b05cb7561280e5735d220925f3fb55bfb' diff -r 389a51db740f -r f3225e454f8d pidgin/gtkblist.c --- a/pidgin/gtkblist.c Mon Nov 12 19:02:00 2007 +0000 +++ b/pidgin/gtkblist.c Mon Nov 12 19:04:01 2007 +0000 @@ -4469,6 +4469,15 @@ g_hash_table_remove(gtkblist->connection_errors, account); } +#define SSL_FAQ_URI "http://d.pidgin.im/wiki/FAQssl" + +static void +ssl_faq_clicked_cb(GtkButton *button, + PurpleAccount *account) +{ + purple_notify_uri(NULL, SSL_FAQ_URI); +} + static void add_generic_error_dialog(PurpleAccount *account, const PurpleConnectionErrorInfo *err) @@ -4498,6 +4507,26 @@ g_object_set_data(G_OBJECT(mini_dialog), OBJECT_DATA_KEY_ACCOUNT, account); + if(err->type == PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT) { + GtkWidget *faq_button = gtk_button_new(); + GtkWidget *faq_label = gtk_label_new(NULL); + gtk_label_set_markup(GTK_LABEL(faq_label), + "" SSL_FAQ_URI ""); +#if GTK_CHECK_VERSION(2,6,0) + g_object_set(G_OBJECT(faq_label), "ellipsize", + PANGO_ELLIPSIZE_MIDDLE, NULL); +#endif + gtk_container_add(GTK_CONTAINER(faq_button), faq_label); + gtk_button_set_relief(GTK_BUTTON(faq_button), GTK_RELIEF_NONE); + + g_signal_connect(faq_button, "clicked", + (GCallback)ssl_faq_clicked_cb, account); + + gtk_box_pack_start(PIDGIN_MINI_DIALOG(mini_dialog)->contents, + faq_button, FALSE, FALSE, 0); + } + g_signal_connect_after(mini_dialog, "destroy", (GCallback)generic_error_destroy_cb, account);