[pan2] fix markup for ssl cert info dialog



commit 499fd1e847efacbb313771fb6807fd758b54ba31
Author: Heinrich MÃller <henmull src gnome org>
Date:   Wed May 9 21:02:42 2012 +0200

    fix markup for ssl cert info dialog

 pan/gui/hig.cc       |    2 +-
 pan/gui/server-ui.cc |   13 +++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/pan/gui/hig.cc b/pan/gui/hig.cc
index b855d0b..00a8fc8 100644
--- a/pan/gui/hig.cc
+++ b/pan/gui/hig.cc
@@ -194,5 +194,5 @@ HIG :: message_dialog_set_text (GtkMessageDialog * dialog,
 {
   gtk_widget_show_all(GTK_WIDGET(dialog));
   gtk_message_dialog_set_markup (dialog, primary);
-  gtk_message_dialog_format_secondary_text (dialog, "%s", secondary);
+  if (secondary) gtk_message_dialog_format_secondary_text (dialog, "%s", secondary);
 }
diff --git a/pan/gui/server-ui.cc b/pan/gui/server-ui.cc
index 1974d21..535edcb 100644
--- a/pan/gui/server-ui.cc
+++ b/pan/gui/server-ui.cc
@@ -692,15 +692,20 @@ namespace
       const gnutls_x509_crt_t cert (store.get_cert_to_server(selected_server));
       if (cert)
       {
-        pretty_print_x509(buf,sizeof(buf),addr, cert,false);
+        pretty_print_x509(buf,sizeof(buf),addr, cert, false);
         if (!buf) g_snprintf(buf,sizeof(buf), "%s", _("No information available.")) ;
-        GtkWidget * w = gtk_message_dialog_new_with_markup (
+
+        GtkWidget * w = gtk_message_dialog_new (
         0,
-        GTK_DIALOG_MODAL,
+        GtkDialogFlags(GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT),
         GTK_MESSAGE_INFO,
-        GTK_BUTTONS_CLOSE, "%s",buf);
+        GTK_BUTTONS_CLOSE, NULL);
+
+        HIG :: message_dialog_set_text (GTK_MESSAGE_DIALOG(w), buf, NULL);
+
         g_snprintf(buf,sizeof(buf), _("Server Certificate for '%s'"), addr.c_str());
         gtk_window_set_title(GTK_WINDOW(w), buf);
+
         gtk_widget_show_all (w);
         g_signal_connect_swapped (w, "response", G_CALLBACK (gtk_widget_destroy), w);
       }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]