Commit 5ecc24758753c7c9d1c55a04ecb54179db1c2e8b

Authored by perry.werneck@gmail.com
1 parent 1cf442fa
Exists in master and in 1 other branch develop

Melhorando tooltip com status da conexão SSL

Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
@@ -292,7 +292,7 @@ gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboa @@ -292,7 +292,7 @@ gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboa
292 if(!lib3270_connected(GTK_V3270(widget)->host)) 292 if(!lib3270_connected(GTK_V3270(widget)->host))
293 { 293 {
294 gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DISCONNECT,GTK_ICON_SIZE_MENU); 294 gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DISCONNECT,GTK_ICON_SIZE_MENU);
295 - gtk_tooltip_set_markup(tooltip,_( "<b>Disconnected from host</b>\nNo security info" ) ); 295 + gtk_tooltip_set_markup(tooltip,_( "<b>Identity not verified</b>\nDisconnected from host" ) );
296 } 296 }
297 else if(lib3270_get_secure(GTK_V3270(widget)->host) == LIB3270_SSL_UNSECURE) 297 else if(lib3270_get_secure(GTK_V3270(widget)->host) == LIB3270_SSL_UNSECURE)
298 { 298 {
@@ -310,12 +310,14 @@ gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboa @@ -310,12 +310,14 @@ gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboa
310 310
311 if(msg) 311 if(msg)
312 { 312 {
  313 + gchar *text = g_strdup_printf("<b>%s</b>\n%s",_("Identity not verified"),msg->text);
313 gtk_tooltip_set_icon_from_stock(tooltip,msg->icon,GTK_ICON_SIZE_MENU); 314 gtk_tooltip_set_icon_from_stock(tooltip,msg->icon,GTK_ICON_SIZE_MENU);
314 - gtk_tooltip_set_markup(tooltip,msg->text); 315 + gtk_tooltip_set_markup(tooltip,text);
  316 + g_free(text);
315 } 317 }
316 else 318 else
317 { 319 {
318 - gchar *text = g_strdup_printf(_("<b>Unexpected SSL status %ld</b>\nSecurity status is undefined"),lib3270_get_SSL_verify_result(GTK_V3270(widget)->host)); 320 + gchar *text = g_strdup_printf(_("<b>SSL state is undefined</b>Unexpected SSL status %ld"),lib3270_get_SSL_verify_result(GTK_V3270(widget)->host));
319 gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DIALOG_ERROR,GTK_ICON_SIZE_MENU); 321 gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DIALOG_ERROR,GTK_ICON_SIZE_MENU);
320 gtk_tooltip_set_markup(tooltip,text); 322 gtk_tooltip_set_markup(tooltip,text);
321 g_free(text); 323 g_free(text);