summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Bailey <rekkanoryo@rekkanoryo.org>2009-03-07 21:05:23 +0000
committerJohn Bailey <rekkanoryo@rekkanoryo.org>2009-03-07 21:05:23 +0000
commit144c523e25d27a7338f18a04b2327ad6188c4979 (patch)
treec56e9c72ac5c91178c7372f82952dc76cd66746b
parent095f04e23b9abaeb12d210ea01f7ffaf0574fe3f (diff)
downloadpidgin-144c523e25d27a7338f18a04b2327ad6188c4979.tar.gz
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.
-rw-r--r--pidgin/gtkblist.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/pidgin/gtkblist.c b/pidgin/gtkblist.c
index a552b7024b..3b5bce815d 100644
--- a/pidgin/gtkblist.c
+++ b/pidgin/gtkblist.c
@@ -4838,8 +4838,9 @@ generic_error_destroy_cb(GtkObject *dialog,
#define SSL_FAQ_URI "http://d.pidgin.im/wiki/FAQssl"
static void
-ssl_faq_clicked_cb(GtkButton *button,
- PurpleAccount *account)
+ssl_faq_clicked_cb(PidginMiniDialog *mini_dialog,
+ GtkButton *button,
+ gpointer ignored)
{
purple_notify_uri(NULL, SSL_FAQ_URI);
}
@@ -4872,25 +4873,9 @@ add_generic_error_dialog(PurpleAccount *account,
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);
- }
+ if(err->type == PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT)
+ pidgin_mini_dialog_add_button(PIDGIN_MINI_DIALOG(mini_dialog),
+ _("SSL FAQs"), ssl_faq_clicked_cb, NULL);
g_signal_connect_after(mini_dialog, "destroy",
(GCallback)generic_error_destroy_cb,