Commit 34b345e11bf53548073fb110b5fa71e1dc7d9b42
1 parent
9705cef6
Exists in
master
and in
5 other branches
Incluindo testes
Showing
7 changed files
with
21 additions
and
15 deletions
Show diff stats
pw3270.cbp
... | ... | @@ -305,7 +305,8 @@ |
305 | 305 | </Unit> |
306 | 306 | <Unit filename="src/lib3270/xioc.h" /> |
307 | 307 | <Unit filename="src/lib3270/xl.h" /> |
308 | - <Unit filename="ui/default.xml" /> | |
308 | + <Unit filename="ui/00default.xml" /> | |
309 | + <Unit filename="ui/99debug.xml" /> | |
309 | 310 | <Unit filename="valgrind.suppression" /> |
310 | 311 | <Extensions> |
311 | 312 | <code_completion /> | ... | ... |
src/gtk/actions.c
... | ... | @@ -61,12 +61,19 @@ static void activate_action(GtkAction *action, GtkWidget *widget) |
61 | 61 | gtk_widget_activate(widget); |
62 | 62 | } |
63 | 63 | |
64 | +static void reload_action(GtkAction *action, GtkWidget *widget) | |
65 | +{ | |
66 | + trace("Action %s activated on widget %p",gtk_action_get_name(action),widget); | |
67 | + v3270_reload(widget); | |
68 | +} | |
69 | + | |
64 | 70 | static void copy_action(GtkAction *action, GtkWidget *widget) |
65 | 71 | { |
66 | 72 | trace("Action %s activated on widget %p",gtk_action_get_name(action),widget); |
67 | 73 | v3270_copy_clipboard(GTK_V3270(widget)); |
68 | 74 | } |
69 | 75 | |
76 | + | |
70 | 77 | void ui_connect_action(GtkAction *action, GtkWidget *widget, const gchar *name, const gchar *id) |
71 | 78 | { |
72 | 79 | #undef DECLARE_LIB3270_ACTION |
... | ... | @@ -98,6 +105,7 @@ void ui_connect_action(GtkAction *action, GtkWidget *widget, const gchar *name, |
98 | 105 | gtk_action[] = |
99 | 106 | { |
100 | 107 | { "activate", activate_action }, |
108 | + { "reload", reload_action }, | |
101 | 109 | { "connect", connect_action }, |
102 | 110 | { "copy", copy_action }, |
103 | 111 | { "disconnect", disconnect_action }, | ... | ... |
src/gtk/mainwindow.c
src/gtk/uiparser/parser.c
... | ... | @@ -211,7 +211,7 @@ static void release_popups(GtkWidget **popup) |
211 | 211 | int f; |
212 | 212 | for(f=0;popup[f] != ((GtkWidget *) -1);f++) |
213 | 213 | { |
214 | - trace("%s[%d]=%p",__FUNCTION__,f,popup[f]); | |
214 | +// trace("%s[%d]=%p",__FUNCTION__,f,popup[f]); | |
215 | 215 | if(popup[f]) |
216 | 216 | g_object_unref(popup[f]); |
217 | 217 | } | ... | ... |
src/gtk/v3270/draw.c
src/lib3270/screen.c
... | ... | @@ -72,18 +72,10 @@ |
72 | 72 | #define get_color_pair(fg,bg) (((bg&0x0F) << 4) | (fg&0x0F)) |
73 | 73 | #define DEFCOLOR_MAP(f) ((((f) & FA_PROTECT) >> 4) | (((f) & FA_INT_HIGH_SEL) >> 3)) |
74 | 74 | |
75 | -// #if defined(WC3270) | |
76 | -// extern char *profile_name; | |
77 | -// #endif | |
78 | - | |
79 | 75 | static int logpopup(H3270 *session, LIB3270_NOTIFY type, const char *title, const char *msg, const char *fmt, va_list arg); |
80 | 76 | |
81 | 77 | static int (*popup_handler)(H3270 *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list) = logpopup; |
82 | 78 | |
83 | -// static const struct lib3270_screen_callbacks *callbacks = NULL; | |
84 | -// static SCRIPT_STATE script_state = SCRIPT_STATE_NONE; | |
85 | - | |
86 | - | |
87 | 79 | enum ts { TS_AUTO, TS_ON, TS_OFF }; |
88 | 80 | |
89 | 81 | static void screen_update(H3270 *session, int bstart, int bend); |
... | ... | @@ -755,12 +747,14 @@ LIB3270_ACTION( testpattern ) |
755 | 747 | }; |
756 | 748 | |
757 | 749 | int row = 0; |
758 | - int max = (hSession->maxROWS * hSession->maxCOLS); | |
750 | + int max; | |
759 | 751 | int pos = 0; |
760 | 752 | int f; |
761 | 753 | int fg = COLOR_BLUE; |
762 | 754 | |
763 | - Trace("%s begins",__FUNCTION__); | |
755 | + CHECK_SESSION_HANDLE(hSession); | |
756 | + | |
757 | + max = (hSession->maxROWS * hSession->maxCOLS); | |
764 | 758 | for(f=0;f<max;f++) |
765 | 759 | { |
766 | 760 | if(!pat[row].cc[pos]) |
... | ... | @@ -779,11 +773,8 @@ LIB3270_ACTION( testpattern ) |
779 | 773 | hSession->ea_buf[f].cc = pat[row].cc[pos++]; |
780 | 774 | } |
781 | 775 | |
782 | - Trace("%s display",__FUNCTION__); | |
783 | - | |
784 | 776 | screen_disp(hSession); |
785 | 777 | |
786 | - Trace("%s ends",__FUNCTION__); | |
787 | 778 | return 0; |
788 | 779 | } |
789 | 780 | ... | ... |
ui/99debug.xml