Commit 46b8f7201fc3eaf8c7fc991f85e3baf8ed1e32d6

Authored by Perry Werneck
1 parent dffde78f
Exists in master and in 1 other branch develop

Updating security information dialog.

Showing 1 changed file with 11 additions and 6 deletions   Show diff stats
src/dialogs/security.c
... ... @@ -42,9 +42,10 @@
42 42  
43 43 static GtkWidget * label_new(const char *text)
44 44 {
45   - GtkWidget *widget = gtk_label_new(text);
46   - gtk_label_set_xalign(GTK_LABEL(widget),0);
47   - return widget;
  45 + GtkLabel *widget = GTK_LABEL(gtk_label_new(""));
  46 + gtk_label_set_markup(widget,text);
  47 + gtk_label_set_xalign(widget,0);
  48 + return GTK_WIDGET(widget);
48 49 }
49 50  
50 51 static GtkWidget * text_view_new(const char *contents)
... ... @@ -92,9 +93,10 @@
92 93 2,2
93 94 );
94 95  
  96 + g_autofree gchar * message = g_strdup_printf("<b>%s</b>",lib3270_get_ssl_state_message(hSession));
95 97 gtk_grid_attach(
96 98 grid,
97   - label_new((lib3270_get_ssl_state_message(hSession))),
  99 + label_new(message),
98 100 3,0,
99 101 6,1
100 102 );
... ... @@ -109,7 +111,10 @@
109 111 lib3270_autoptr(char) crl = lib3270_get_ssl_crl_text(hSession);
110 112 lib3270_autoptr(char) peer = lib3270_get_ssl_peer_certificate_text(hSession);
111 113  
112   - if(peer && crl)
  114 + if(!peer)
  115 + peer = g_strdup("");
  116 +
  117 + if(crl)
113 118 {
114 119 GtkWidget * frame = gtk_notebook_new();
115 120  
... ... @@ -136,7 +141,7 @@
136 141 );
137 142  
138 143 }
139   - else if(peer)
  144 + else
140 145 {
141 146 GtkWidget * frame = gtk_frame_new(_("Peer certificate"));
142 147 gtk_container_add(GTK_CONTAINER(frame),text_view_new(peer));
... ...