Mercurial > pidgin.yaz
comparison pidgin/gtkblist.c @ 25986:c0115655a94e
I have no idea how we've gone nearly 16 months with no one noticing that the
SSL FAQ button resiak added to the mini dialog for no SSL support didn't
actually appear. Instead of just making that button visible, I decided to
change to using mini dialog API to add the button without the URL.
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Sat, 07 Mar 2009 21:05:23 +0000 |
parents | 36f6f798e48a |
children | 31f0fece7502 38238d41923b f44832c6a65b |
comparison
equal
deleted
inserted
replaced
25985:7ace7bf0bfad | 25986:c0115655a94e |
---|---|
4836 } | 4836 } |
4837 | 4837 |
4838 #define SSL_FAQ_URI "http://d.pidgin.im/wiki/FAQssl" | 4838 #define SSL_FAQ_URI "http://d.pidgin.im/wiki/FAQssl" |
4839 | 4839 |
4840 static void | 4840 static void |
4841 ssl_faq_clicked_cb(GtkButton *button, | 4841 ssl_faq_clicked_cb(PidginMiniDialog *mini_dialog, |
4842 PurpleAccount *account) | 4842 GtkButton *button, |
4843 gpointer ignored) | |
4843 { | 4844 { |
4844 purple_notify_uri(NULL, SSL_FAQ_URI); | 4845 purple_notify_uri(NULL, SSL_FAQ_URI); |
4845 } | 4846 } |
4846 | 4847 |
4847 static void | 4848 static void |
4870 g_free(primary); | 4871 g_free(primary); |
4871 | 4872 |
4872 g_object_set_data(G_OBJECT(mini_dialog), OBJECT_DATA_KEY_ACCOUNT, | 4873 g_object_set_data(G_OBJECT(mini_dialog), OBJECT_DATA_KEY_ACCOUNT, |
4873 account); | 4874 account); |
4874 | 4875 |
4875 if(err->type == PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT) { | 4876 if(err->type == PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT) |
4876 GtkWidget *faq_button = gtk_button_new(); | 4877 pidgin_mini_dialog_add_button(PIDGIN_MINI_DIALOG(mini_dialog), |
4877 GtkWidget *faq_label = gtk_label_new(NULL); | 4878 _("SSL FAQs"), ssl_faq_clicked_cb, NULL); |
4878 gtk_label_set_markup(GTK_LABEL(faq_label), | |
4879 "<span underline=\"single\" foreground=\"blue\"" | |
4880 " size=\"smaller\">" SSL_FAQ_URI "</span>"); | |
4881 #if GTK_CHECK_VERSION(2,6,0) | |
4882 g_object_set(G_OBJECT(faq_label), "ellipsize", | |
4883 PANGO_ELLIPSIZE_MIDDLE, NULL); | |
4884 #endif | |
4885 gtk_container_add(GTK_CONTAINER(faq_button), faq_label); | |
4886 gtk_button_set_relief(GTK_BUTTON(faq_button), GTK_RELIEF_NONE); | |
4887 | |
4888 g_signal_connect(faq_button, "clicked", | |
4889 (GCallback)ssl_faq_clicked_cb, account); | |
4890 | |
4891 gtk_box_pack_start(PIDGIN_MINI_DIALOG(mini_dialog)->contents, | |
4892 faq_button, FALSE, FALSE, 0); | |
4893 } | |
4894 | 4879 |
4895 g_signal_connect_after(mini_dialog, "destroy", | 4880 g_signal_connect_after(mini_dialog, "destroy", |
4896 (GCallback)generic_error_destroy_cb, | 4881 (GCallback)generic_error_destroy_cb, |
4897 account); | 4882 account); |
4898 | 4883 |