Commit d5364c6b9be33bcae294bdd1fdd85fa391217fd1

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

Corrigindo segfaults aleatorios em windows 64

Showing 1 changed file with 11 additions and 6 deletions   Show diff stats
widget.c
... ... @@ -220,6 +220,8 @@ void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type , const gchar *t
220 220 GtkMessageType msgtype = GTK_MESSAGE_WARNING;
221 221 GtkButtonsType buttons = GTK_BUTTONS_OK;
222 222  
  223 + trace("%s: widget=%p",__FUNCTION__,widget);
  224 +
223 225 if(widget && GTK_IS_WIDGET(widget))
224 226 toplevel = gtk_widget_get_toplevel(GTK_WIDGET(widget));
225 227  
... ... @@ -743,6 +745,8 @@ static void v3270_init(v3270 *widget)
743 745 {
744 746 widget->host = lib3270_session_new("");
745 747  
  748 + trace("%s",__FUNCTION__);
  749 +
746 750 if(widget->host->sz != sizeof(H3270))
747 751 {
748 752 g_error( _( "Unexpected signature in H3270 object, possible version mismatch in lib3270") );
... ... @@ -782,6 +786,7 @@ static void v3270_init(v3270 *widget)
782 786 // Setup events
783 787 gtk_widget_add_events(GTK_WIDGET(widget),GDK_KEY_PRESS_MASK|GDK_KEY_RELEASE_MASK|GDK_BUTTON_PRESS_MASK|GDK_BUTTON_MOTION_MASK|GDK_BUTTON_RELEASE_MASK|GDK_POINTER_MOTION_MASK|GDK_ENTER_NOTIFY_MASK);
784 788  
  789 + trace("%s",__FUNCTION__);
785 790 }
786 791  
787 792 GtkWidget * v3270_new(void)
... ... @@ -1133,6 +1138,12 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name)
1133 1138  
1134 1139 terminal = GTK_V3270(widget);
1135 1140  
  1141 + if(!name)
  1142 + {
  1143 + // TODO (perry#3#): Get default font family from currrent style
  1144 + name = "courier new";
  1145 + }
  1146 +
1136 1147 if(terminal->font_family)
1137 1148 {
1138 1149 if(!g_strcasecmp(terminal->font_family,name))
... ... @@ -1141,12 +1152,6 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name)
1141 1152 terminal->font_family = NULL;
1142 1153 }
1143 1154  
1144   - if(!name)
1145   - {
1146   - // TODO (perry#3#): Get default font family from currrent style
1147   - name = "courier new";
1148   - }
1149   -
1150 1155 terminal->font_family = g_strdup(name);
1151 1156 terminal->font_weight = lib3270_get_toggle(terminal->host,LIB3270_TOGGLE_BOLD) ? CAIRO_FONT_WEIGHT_BOLD : CAIRO_FONT_WEIGHT_NORMAL;
1152 1157  
... ...