Commit e4cffdc6408e635b6eefb2e157baaa59b0731e01
1 parent
4a8e884a
Exists in
master
and in
5 other branches
Teste rapido com valgrind, retirando erros no gerenciamento de memória
Showing
5 changed files
with
26 additions
and
4 deletions
Show diff stats
pw3270.cbp
| ... | ... | @@ -134,6 +134,7 @@ |
| 134 | 134 | <Unit filename="src/gtk/v3270/widget.c"> |
| 135 | 135 | <Option compilerVar="CC" /> |
| 136 | 136 | </Unit> |
| 137 | + <Unit filename="src/gtk/valgrind.suppression" /> | |
| 137 | 138 | <Unit filename="src/include/lib3270.h" /> |
| 138 | 139 | <Unit filename="src/include/lib3270/action_table.h" /> |
| 139 | 140 | <Unit filename="src/include/lib3270/actions.h" /> | ... | ... |
src/gtk/dialog.c
src/gtk/v3270/widget.c
| ... | ... | @@ -934,7 +934,12 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name) |
| 934 | 934 | terminal = GTK_V3270(widget); |
| 935 | 935 | |
| 936 | 936 | if(terminal->font_family) |
| 937 | + { | |
| 938 | + if(!g_strcasecmp(terminal->font_family,name)) | |
| 939 | + return; | |
| 937 | 940 | g_free(terminal->font_family); |
| 941 | + terminal->font_family = NULL; | |
| 942 | + } | |
| 938 | 943 | |
| 939 | 944 | if(!name) |
| 940 | 945 | { |
| ... | ... | @@ -942,11 +947,11 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name) |
| 942 | 947 | name = "courier new"; |
| 943 | 948 | } |
| 944 | 949 | |
| 945 | - trace("%s(%s)",__FUNCTION__,name); | |
| 946 | - | |
| 947 | 950 | terminal->font_family = g_strdup(name); |
| 948 | 951 | terminal->font_weight = lib3270_get_toggle(terminal->host,LIB3270_TOGGLE_BOLD) ? CAIRO_FONT_WEIGHT_BOLD : CAIRO_FONT_WEIGHT_NORMAL; |
| 949 | 952 | |
| 953 | + trace("%s: %s (%p)",__FUNCTION__,terminal->font_family,terminal->font_family); | |
| 954 | + | |
| 950 | 955 | g_signal_emit(widget,v3270_widget_signal[SIGNAL_UPDATE_CONFIG], 0, "font-family", name); |
| 951 | 956 | |
| 952 | 957 | v3270_reload(widget); |
| ... | ... | @@ -958,7 +963,6 @@ void v3270_set_font_family(GtkWidget *widget, const gchar *name) |
| 958 | 963 | const gchar * v3270_get_font_family(GtkWidget *widget) |
| 959 | 964 | { |
| 960 | 965 | g_return_val_if_fail(GTK_IS_V3270(widget),NULL); |
| 961 | - | |
| 962 | 966 | return GTK_V3270(widget)->font_family; |
| 963 | 967 | } |
| 964 | 968 | ... | ... |
src/gtk/valgrind.suppression
ui/00default.xml
| ... | ... | @@ -32,9 +32,18 @@ |
| 32 | 32 | <menubar name='topmenu' topmenu='yes'> |
| 33 | 33 | |
| 34 | 34 | <menu name='FileMenu' label='_File' > |
| 35 | + | |
| 36 | + <!--- | |
| 37 | + Extended attributes for 'save' actions: | |
| 38 | + | |
| 39 | + * overwrite='yes' to always overwrite file | |
| 40 | + * filename='PATH' to save to a predefined file (no user save dialog) | |
| 41 | + | |
| 42 | + ---> | |
| 35 | 43 | <menuitem action='save' src='all' group='online' label='Save screen' /> |
| 36 | 44 | <menuitem action='save' src='selected' group='selection' label='Save selected' /> |
| 37 | 45 | <menuitem action='save' src='copy' group='clipboard' label='Save copy' /> |
| 46 | + | |
| 38 | 47 | <separator/> |
| 39 | 48 | <menuitem action='print' src='all' key='Print' icon='print' label='Print' /> |
| 40 | 49 | <menuitem action='print' src='selected' group='selection' label='Print selected' /> |
| ... | ... | @@ -176,7 +185,7 @@ |
| 176 | 185 | <separator /> |
| 177 | 186 | <menuitem action='backtab' label='Previous field' /> |
| 178 | 187 | <menuitem action='tab' label='Next field'/> |
| 179 | - <menuitem name="return" action='activate' label='Return' key='return' /> | |
| 188 | + <menuitem name="return" action='activate' label='Return' key='Return' /> | |
| 180 | 189 | |
| 181 | 190 | <separator /> |
| 182 | 191 | <menuitem action='Quit'/> | ... | ... |