From 522bb782c486833425633d9ba383c968d52d2289 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Wed, 6 Apr 2016 09:39:33 -0300 Subject: [PATCH] Indicador de SSL não estava atualizando em algumas situações. --- oia.c | 2 ++ widget.c | 20 +++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/oia.c b/oia.c index bba95be..213e80f 100644 --- a/oia.c +++ b/oia.c @@ -1081,6 +1081,8 @@ void v3270_stop_timer(GtkWidget *widget) void v3270_update_ssl(H3270 *session, LIB3270_SSL_STATE state) { + debug("%s **************************************** %d",__FUNCTION__,(int) state); + v3270 * terminal = GTK_V3270(session->user_data); cairo_t * cr; GdkRectangle * r; diff --git a/widget.c b/widget.c index 584c2a7..c288e23 100644 --- a/widget.c +++ b/widget.c @@ -226,28 +226,22 @@ gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboa { if(!lib3270_connected(GTK_V3270(widget)->host)) { -#if GTK_CHECK_VERSION(2,14,0) +#ifndef _WIN32 gtk_tooltip_set_icon_from_icon_name(tooltip,"gtk-disconnect",GTK_ICON_SIZE_MENU); -#else - gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DISCONNECT,GTK_ICON_SIZE_MENU); #endif // GTK_CHECK_VERSION gtk_tooltip_set_markup(tooltip,_( "Identity not verified\nDisconnected from host" ) ); } else if(lib3270_get_secure(GTK_V3270(widget)->host) == LIB3270_SSL_UNSECURE) { -#if GTK_CHECK_VERSION(2,14,0) +#ifndef _WIN32 gtk_tooltip_set_icon_from_icon_name(tooltip,"dialog-information",GTK_ICON_SIZE_MENU); -#else - gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_INFO,GTK_ICON_SIZE_MENU); #endif gtk_tooltip_set_markup(tooltip,_( "Identity not verified\nThe connection is insecure" ) ); } else if(!lib3270_get_SSL_verify_result(GTK_V3270(widget)->host)) { -#if GTK_CHECK_VERSION(2,14,0) +#ifndef _WIN32 gtk_tooltip_set_icon_from_icon_name(tooltip,"gtk-dialog-authentication",GTK_ICON_SIZE_MENU); -#else - gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DIALOG_AUTHENTICATION,GTK_ICON_SIZE_MENU); #endif gtk_tooltip_set_markup(tooltip,_( "Identity verified\nThe connection is secure" ) ); } @@ -258,10 +252,8 @@ gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboa if(msg) { gchar *text = g_strdup_printf("%s\n%s",_("Identity not verified"),gettext(msg->text)); -#if GTK_CHECK_VERSION(2,14,0) +#ifndef _WIN32 gtk_tooltip_set_icon_from_icon_name(tooltip,msg->icon,GTK_ICON_SIZE_MENU); -#else - gtk_tooltip_set_icon_from_stock(tooltip,msg->icon,GTK_ICON_SIZE_MENU); #endif gtk_tooltip_set_markup(tooltip,text); g_free(text); @@ -269,10 +261,8 @@ gboolean v3270_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboa else { gchar *text = g_strdup_printf(_("SSL state is undefinedUnexpected SSL status %ld"),lib3270_get_SSL_verify_result(GTK_V3270(widget)->host)); -#if GTK_CHECK_VERSION(2,14,0) +#ifndef _WIN32 gtk_tooltip_set_icon_from_icon_name(tooltip,"dialog-error",GTK_ICON_SIZE_MENU); -#else - gtk_tooltip_set_icon_from_stock(tooltip,GTK_STOCK_DIALOG_ERROR,GTK_ICON_SIZE_MENU); #endif // GTK_CHECK_VERSION gtk_tooltip_set_markup(tooltip,text); g_free(text); -- libgit2 0.21.2