Mercurial > pidgin.yaz
changeset 21460:f3225e454f8d
merge of '9a0d3011817c44b114c37789a6561df8c8d75a80'
and 'fb7fda6b05cb7561280e5735d220925f3fb55bfb'
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Mon, 12 Nov 2007 19:04:01 +0000 |
parents | 389a51db740f (current diff) 675fbb9a402e (diff) |
children | a34204321321 |
files | |
diffstat | 1 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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), + "<span underline=\"single\" foreground=\"blue\"" + " size=\"smaller\">" SSL_FAQ_URI "</span>"); +#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);