Commit ed38a034044c0ca7bfcd68540ae0063d43ff52a6
1 parent
4a388ff9
Exists in
master
and in
1 other branch
Corrigindo tratamento da tecla F10
Showing
6 changed files
with
18 additions
and
3 deletions
Show diff stats
accessible.c
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | #include <glib/gi18n.h> | 37 | #include <glib/gi18n.h> |
38 | 38 | ||
39 | #include <pw3270.h> | 39 | #include <pw3270.h> |
40 | -// #include <malloc.h> | 40 | + #include <lib3270/log.h> |
41 | #include "v3270.h" | 41 | #include "v3270.h" |
42 | #include "private.h" | 42 | #include "private.h" |
43 | #include "accessible.h" | 43 | #include "accessible.h" |
keyboard.c
@@ -33,6 +33,7 @@ | @@ -33,6 +33,7 @@ | ||
33 | #include <pw3270.h> | 33 | #include <pw3270.h> |
34 | #include <lib3270.h> | 34 | #include <lib3270.h> |
35 | #include <lib3270/actions.h> | 35 | #include <lib3270/actions.h> |
36 | + #include <lib3270/log.h> | ||
36 | #include <gtk/gtk.h> | 37 | #include <gtk/gtk.h> |
37 | #include <string.h> | 38 | #include <string.h> |
38 | #include <gdk/gdk.h> | 39 | #include <gdk/gdk.h> |
@@ -138,6 +139,9 @@ | @@ -138,6 +139,9 @@ | ||
138 | if(event->keyval >= GDK_F1 && event->keyval <= GDK_F12 && !(state & (GDK_CONTROL_MASK|GDK_ALT_MASK))) | 139 | if(event->keyval >= GDK_F1 && event->keyval <= GDK_F12 && !(state & (GDK_CONTROL_MASK|GDK_ALT_MASK))) |
139 | { | 140 | { |
140 | int pfcode = (event->keyval - GDK_F1) + ((state & GDK_SHIFT_MASK) ? 13 : 1); | 141 | int pfcode = (event->keyval - GDK_F1) + ((state & GDK_SHIFT_MASK) ? 13 : 1); |
142 | + | ||
143 | + trace("PF%02d",pfcode); | ||
144 | + | ||
141 | if(pfcode > 0 && pfcode < 25) | 145 | if(pfcode > 0 && pfcode < 25) |
142 | { | 146 | { |
143 | lib3270_pfkey(widget->host,pfcode); | 147 | lib3270_pfkey(widget->host,pfcode); |
mouse.c
@@ -34,6 +34,7 @@ | @@ -34,6 +34,7 @@ | ||
34 | #include "private.h" | 34 | #include "private.h" |
35 | #include <lib3270/selection.h> | 35 | #include <lib3270/selection.h> |
36 | #include <lib3270/actions.h> | 36 | #include <lib3270/actions.h> |
37 | + #include <lib3270/log.h> | ||
37 | 38 | ||
38 | /*--[ Implement ]------------------------------------------------------------------------------------*/ | 39 | /*--[ Implement ]------------------------------------------------------------------------------------*/ |
39 | 40 |
@@ -30,6 +30,7 @@ | @@ -30,6 +30,7 @@ | ||
30 | #include <pw3270.h> | 30 | #include <pw3270.h> |
31 | #include <lib3270.h> | 31 | #include <lib3270.h> |
32 | #include <lib3270/session.h> | 32 | #include <lib3270/session.h> |
33 | + #include <lib3270/log.h> | ||
33 | #include <lib3270/config.h> | 34 | #include <lib3270/config.h> |
34 | #include <gtk/gtk.h> | 35 | #include <gtk/gtk.h> |
35 | #include <string.h> | 36 | #include <string.h> |
selection.c
@@ -29,10 +29,10 @@ | @@ -29,10 +29,10 @@ | ||
29 | 29 | ||
30 | #include <gtk/gtk.h> | 30 | #include <gtk/gtk.h> |
31 | #include <pw3270.h> | 31 | #include <pw3270.h> |
32 | -// #include <malloc.h> | ||
33 | #include "v3270.h" | 32 | #include "v3270.h" |
34 | #include "private.h" | 33 | #include "private.h" |
35 | #include <lib3270/selection.h> | 34 | #include <lib3270/selection.h> |
35 | + #include <lib3270/log.h> | ||
36 | 36 | ||
37 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 37 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
38 | 38 | ||
@@ -52,7 +52,6 @@ | @@ -52,7 +52,6 @@ | ||
52 | static void clipboard_clear(GtkClipboard *clipboard, GObject *obj) | 52 | static void clipboard_clear(GtkClipboard *clipboard, GObject *obj) |
53 | { | 53 | { |
54 | trace("%s widget=%p",__FUNCTION__,obj); | 54 | trace("%s widget=%p",__FUNCTION__,obj); |
55 | - | ||
56 | } | 55 | } |
57 | 56 | ||
58 | static void clipboard_get(GtkClipboard *clipboard, GtkSelectionData *selection, guint target, GObject *obj) | 57 | static void clipboard_get(GtkClipboard *clipboard, GtkSelectionData *selection, guint target, GObject *obj) |
widget.c
@@ -39,6 +39,12 @@ | @@ -39,6 +39,12 @@ | ||
39 | #include "accessible.h" | 39 | #include "accessible.h" |
40 | #include "marshal.h" | 40 | #include "marshal.h" |
41 | 41 | ||
42 | +#if GTK_CHECK_VERSION(3,0,0) | ||
43 | + #include <gdk/gdkkeysyms-compat.h> | ||
44 | +#else | ||
45 | + #include <gdk/gdkkeysyms.h> | ||
46 | +#endif | ||
47 | + | ||
42 | #define WIDTH_IN_PIXELS(terminal,x) (x * cols) | 48 | #define WIDTH_IN_PIXELS(terminal,x) (x * cols) |
43 | #define HEIGHT_IN_PIXELS(terminal,x) (x * (rows+1)) | 49 | #define HEIGHT_IN_PIXELS(terminal,x) (x * (rows+1)) |
44 | 50 | ||
@@ -264,6 +270,10 @@ static void v3270_class_init(v3270Class *klass) | @@ -264,6 +270,10 @@ static void v3270_class_init(v3270Class *klass) | ||
264 | { | 270 | { |
265 | GObjectClass * gobject_class = G_OBJECT_CLASS(klass); | 271 | GObjectClass * gobject_class = G_OBJECT_CLASS(klass); |
266 | GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass); | 272 | GtkWidgetClass * widget_class = GTK_WIDGET_CLASS(klass); |
273 | + GtkBindingSet * binding = gtk_binding_set_by_class(klass); | ||
274 | + | ||
275 | + // Setup widget key bindings | ||
276 | + gtk_binding_entry_skip(binding,GDK_F10,0); | ||
267 | 277 | ||
268 | lib3270_set_log_handler(loghandler); | 278 | lib3270_set_log_handler(loghandler); |
269 | 279 |