pidgin: aa9e255d: I have no idea how we've gone nearly 16 ...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sat Mar 7 16:10:32 EST 2009


-----------------------------------------------------------------
Revision: aa9e255d8e32921a2fe4e6bd74fe36d1ffdc9ec1
Ancestor: 5528635133e9546d67a6e0723b62b4e8b4b886a6
Author: rekkanoryo at pidgin.im
Date: 2009-03-07T21:05:23
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/aa9e255d8e32921a2fe4e6bd74fe36d1ffdc9ec1

Modified files:
        pidgin/gtkblist.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	9910eff78848901bcbfe3d07a144899e6ba401cb
+++ pidgin/gtkblist.c	ad8a871cc01ffb9b9411fab186b911b5cf4af3f0
@@ -4838,8 +4838,9 @@ static void
 #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,26 +4873,10 @@ add_generic_error_dialog(PurpleAccount *
 	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);
+	 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(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);


More information about the Commits mailing list