Commit 9e9c84919b41dcbfa8dccb9cb4ddd8b127a4c0ce
1 parent
553d56a4
Exists in
master
and in
5 other branches
Iniciando implementação do dialogo de impressao
Showing
4 changed files
with
47 additions
and
42 deletions
Show diff stats
src/gtk/actions.c
@@ -34,6 +34,7 @@ | @@ -34,6 +34,7 @@ | ||
34 | #include "v3270/v3270.h" | 34 | #include "v3270/v3270.h" |
35 | #include <lib3270/actions.h> | 35 | #include <lib3270/actions.h> |
36 | #include <lib3270/selection.h> | 36 | #include <lib3270/selection.h> |
37 | + #include <stdlib.h> | ||
37 | 38 | ||
38 | #define ERROR_DOMAIN g_quark_from_static_string(PACKAGE_NAME) | 39 | #define ERROR_DOMAIN g_quark_from_static_string(PACKAGE_NAME) |
39 | #define TOGGLE_GDKDEBUG LIB3270_TOGGLE_COUNT+1 | 40 | #define TOGGLE_GDKDEBUG LIB3270_TOGGLE_COUNT+1 |
@@ -200,7 +201,7 @@ static void lib3270_toggle_action(GtkToggleAction *action,GtkWidget *widget) | @@ -200,7 +201,7 @@ static void lib3270_toggle_action(GtkToggleAction *action,GtkWidget *widget) | ||
200 | 201 | ||
201 | static void selection_move_action(GtkAction *action, GtkWidget *widget) | 202 | static void selection_move_action(GtkAction *action, GtkWidget *widget) |
202 | { | 203 | { |
203 | - trace("Action %s activated on widget %p dir=%d",gtk_action_get_name(action),widget,g_object_get_data(G_OBJECT(action),"direction")); | 204 | + trace("Action %s activated on widget %p dir=%s",gtk_action_get_name(action),widget,g_object_get_data(G_OBJECT(action),"direction")); |
204 | lib3270_move_selection(GTK_V3270(widget)->host,(LIB3270_DIRECTION) g_object_get_data(G_OBJECT(action),"direction")); | 205 | lib3270_move_selection(GTK_V3270(widget)->host,(LIB3270_DIRECTION) g_object_get_data(G_OBJECT(action),"direction")); |
205 | } | 206 | } |
206 | 207 | ||
@@ -241,13 +242,13 @@ static void connect_move_action(GtkAction *action, GtkWidget *widget, const gcha | @@ -241,13 +242,13 @@ static void connect_move_action(GtkAction *action, GtkWidget *widget, const gcha | ||
241 | 242 | ||
242 | static void action_pfkey(GtkAction *action, GtkWidget *widget) | 243 | static void action_pfkey(GtkAction *action, GtkWidget *widget) |
243 | { | 244 | { |
244 | - trace("Action %s activated on widget %p key=%d",gtk_action_get_name(action),widget,g_object_get_data(G_OBJECT(action),"pfkey")); | 245 | + trace("Action %s activated on widget %p key=%p",gtk_action_get_name(action),widget,g_object_get_data(G_OBJECT(action),"pfkey")); |
245 | lib3270_pfkey(GTK_V3270(widget)->host,(int) g_object_get_data(G_OBJECT(action),"pfkey")); | 246 | lib3270_pfkey(GTK_V3270(widget)->host,(int) g_object_get_data(G_OBJECT(action),"pfkey")); |
246 | } | 247 | } |
247 | 248 | ||
248 | static void action_pakey(GtkAction *action, GtkWidget *widget) | 249 | static void action_pakey(GtkAction *action, GtkWidget *widget) |
249 | { | 250 | { |
250 | - trace("Action %s activated on widget %p key=%d",gtk_action_get_name(action),widget,g_object_get_data(G_OBJECT(action),"pakey")); | 251 | + trace("Action %s activated on widget %p key=%p",gtk_action_get_name(action),widget,g_object_get_data(G_OBJECT(action),"pakey")); |
251 | lib3270_pakey(GTK_V3270(widget)->host,(int) g_object_get_data(G_OBJECT(action),"pakey")); | 252 | lib3270_pakey(GTK_V3270(widget)->host,(int) g_object_get_data(G_OBJECT(action),"pakey")); |
252 | } | 253 | } |
253 | 254 |
src/gtk/pw3270-GTK.cbp
@@ -7,8 +7,8 @@ | @@ -7,8 +7,8 @@ | ||
7 | <Option compiler="gcc" /> | 7 | <Option compiler="gcc" /> |
8 | <Build> | 8 | <Build> |
9 | <Target title="Debug"> | 9 | <Target title="Debug"> |
10 | - <Option output=".bin\Debug\pw3270-GTK" prefix_auto="1" extension_auto="1" /> | ||
11 | - <Option object_output=".obj\Debug\" /> | 10 | + <Option output=".bin/Debug/pw3270-GTK" prefix_auto="1" extension_auto="1" /> |
11 | + <Option object_output=".obj/Debug/" /> | ||
12 | <Option type="1" /> | 12 | <Option type="1" /> |
13 | <Option compiler="gcc" /> | 13 | <Option compiler="gcc" /> |
14 | <Compiler> | 14 | <Compiler> |
@@ -17,8 +17,8 @@ | @@ -17,8 +17,8 @@ | ||
17 | </Compiler> | 17 | </Compiler> |
18 | </Target> | 18 | </Target> |
19 | <Target title="Release"> | 19 | <Target title="Release"> |
20 | - <Option output=".bin\Release\pw3270-GTK" prefix_auto="1" extension_auto="1" /> | ||
21 | - <Option object_output=".obj\Release\" /> | 20 | + <Option output=".bin/Release/pw3270-GTK" prefix_auto="1" extension_auto="1" /> |
21 | + <Option object_output=".obj/Release/" /> | ||
22 | <Option type="0" /> | 22 | <Option type="0" /> |
23 | <Option compiler="gcc" /> | 23 | <Option compiler="gcc" /> |
24 | <Compiler> | 24 | <Compiler> |
@@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
32 | <Compiler> | 32 | <Compiler> |
33 | <Add option="-Wall" /> | 33 | <Add option="-Wall" /> |
34 | <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --cflags`" /> | 34 | <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --cflags`" /> |
35 | - <Add directory="..\include" /> | 35 | + <Add directory="../include" /> |
36 | </Compiler> | 36 | </Compiler> |
37 | <Linker> | 37 | <Linker> |
38 | <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --libs`" /> | 38 | <Add option="`pkg-config lib3270 gtk+-2.0 lib3270 --libs`" /> |
@@ -41,11 +41,11 @@ | @@ -41,11 +41,11 @@ | ||
41 | <Unit filename="actions.c"> | 41 | <Unit filename="actions.c"> |
42 | <Option compilerVar="CC" /> | 42 | <Option compilerVar="CC" /> |
43 | </Unit> | 43 | </Unit> |
44 | - <Unit filename="common\common.h" /> | ||
45 | - <Unit filename="common\config.c"> | 44 | + <Unit filename="common/common.h" /> |
45 | + <Unit filename="common/config.c"> | ||
46 | <Option compilerVar="CC" /> | 46 | <Option compilerVar="CC" /> |
47 | </Unit> | 47 | </Unit> |
48 | - <Unit filename="common\sources.mak" /> | 48 | + <Unit filename="common/sources.mak" /> |
49 | <Unit filename="dialog.c"> | 49 | <Unit filename="dialog.c"> |
50 | <Option compilerVar="CC" /> | 50 | <Option compilerVar="CC" /> |
51 | </Unit> | 51 | </Unit> |
@@ -59,74 +59,77 @@ | @@ -59,74 +59,77 @@ | ||
59 | <Unit filename="mainwindow.c"> | 59 | <Unit filename="mainwindow.c"> |
60 | <Option compilerVar="CC" /> | 60 | <Option compilerVar="CC" /> |
61 | </Unit> | 61 | </Unit> |
62 | - <Unit filename="uiparser\accelerator.c"> | 62 | + <Unit filename="print.c"> |
63 | <Option compilerVar="CC" /> | 63 | <Option compilerVar="CC" /> |
64 | </Unit> | 64 | </Unit> |
65 | - <Unit filename="uiparser\action.c"> | 65 | + <Unit filename="uiparser/accelerator.c"> |
66 | <Option compilerVar="CC" /> | 66 | <Option compilerVar="CC" /> |
67 | </Unit> | 67 | </Unit> |
68 | - <Unit filename="uiparser\menu.c"> | 68 | + <Unit filename="uiparser/action.c"> |
69 | <Option compilerVar="CC" /> | 69 | <Option compilerVar="CC" /> |
70 | </Unit> | 70 | </Unit> |
71 | - <Unit filename="uiparser\menubar.c"> | 71 | + <Unit filename="uiparser/menu.c"> |
72 | <Option compilerVar="CC" /> | 72 | <Option compilerVar="CC" /> |
73 | </Unit> | 73 | </Unit> |
74 | - <Unit filename="uiparser\menuitem.c"> | 74 | + <Unit filename="uiparser/menubar.c"> |
75 | <Option compilerVar="CC" /> | 75 | <Option compilerVar="CC" /> |
76 | </Unit> | 76 | </Unit> |
77 | - <Unit filename="uiparser\parsefile.c"> | 77 | + <Unit filename="uiparser/menuitem.c"> |
78 | <Option compilerVar="CC" /> | 78 | <Option compilerVar="CC" /> |
79 | </Unit> | 79 | </Unit> |
80 | - <Unit filename="uiparser\parser.c"> | 80 | + <Unit filename="uiparser/parsefile.c"> |
81 | <Option compilerVar="CC" /> | 81 | <Option compilerVar="CC" /> |
82 | </Unit> | 82 | </Unit> |
83 | - <Unit filename="uiparser\parser.h" /> | ||
84 | - <Unit filename="uiparser\popup.c"> | 83 | + <Unit filename="uiparser/parser.c"> |
85 | <Option compilerVar="CC" /> | 84 | <Option compilerVar="CC" /> |
86 | </Unit> | 85 | </Unit> |
87 | - <Unit filename="uiparser\private.h" /> | ||
88 | - <Unit filename="uiparser\script.c"> | 86 | + <Unit filename="uiparser/parser.h" /> |
87 | + <Unit filename="uiparser/popup.c"> | ||
89 | <Option compilerVar="CC" /> | 88 | <Option compilerVar="CC" /> |
90 | </Unit> | 89 | </Unit> |
91 | - <Unit filename="uiparser\separator.c"> | 90 | + <Unit filename="uiparser/private.h" /> |
91 | + <Unit filename="uiparser/script.c"> | ||
92 | <Option compilerVar="CC" /> | 92 | <Option compilerVar="CC" /> |
93 | </Unit> | 93 | </Unit> |
94 | - <Unit filename="uiparser\sources.mak" /> | ||
95 | - <Unit filename="uiparser\toolbar.c"> | 94 | + <Unit filename="uiparser/separator.c"> |
96 | <Option compilerVar="CC" /> | 95 | <Option compilerVar="CC" /> |
97 | </Unit> | 96 | </Unit> |
98 | - <Unit filename="uiparser\toolitem.c"> | 97 | + <Unit filename="uiparser/sources.mak" /> |
98 | + <Unit filename="uiparser/toolbar.c"> | ||
99 | <Option compilerVar="CC" /> | 99 | <Option compilerVar="CC" /> |
100 | </Unit> | 100 | </Unit> |
101 | - <Unit filename="v3270\clipboard.c"> | 101 | + <Unit filename="uiparser/toolitem.c"> |
102 | <Option compilerVar="CC" /> | 102 | <Option compilerVar="CC" /> |
103 | </Unit> | 103 | </Unit> |
104 | - <Unit filename="v3270\draw.c"> | 104 | + <Unit filename="v3270/clipboard.c"> |
105 | <Option compilerVar="CC" /> | 105 | <Option compilerVar="CC" /> |
106 | </Unit> | 106 | </Unit> |
107 | - <Unit filename="v3270\genmarshal" /> | ||
108 | - <Unit filename="v3270\iocallback.c"> | 107 | + <Unit filename="v3270/draw.c"> |
109 | <Option compilerVar="CC" /> | 108 | <Option compilerVar="CC" /> |
110 | </Unit> | 109 | </Unit> |
111 | - <Unit filename="v3270\keyboard.c"> | 110 | + <Unit filename="v3270/genmarshal" /> |
111 | + <Unit filename="v3270/iocallback.c"> | ||
112 | <Option compilerVar="CC" /> | 112 | <Option compilerVar="CC" /> |
113 | </Unit> | 113 | </Unit> |
114 | - <Unit filename="v3270\locked.xbm" /> | ||
115 | - <Unit filename="v3270\marshal.c"> | 114 | + <Unit filename="v3270/keyboard.c"> |
116 | <Option compilerVar="CC" /> | 115 | <Option compilerVar="CC" /> |
117 | </Unit> | 116 | </Unit> |
118 | - <Unit filename="v3270\marshal.h" /> | ||
119 | - <Unit filename="v3270\mouse.c"> | 117 | + <Unit filename="v3270/locked.xbm" /> |
118 | + <Unit filename="v3270/marshal.c"> | ||
120 | <Option compilerVar="CC" /> | 119 | <Option compilerVar="CC" /> |
121 | </Unit> | 120 | </Unit> |
122 | - <Unit filename="v3270\oia.c"> | 121 | + <Unit filename="v3270/marshal.h" /> |
122 | + <Unit filename="v3270/mouse.c"> | ||
123 | <Option compilerVar="CC" /> | 123 | <Option compilerVar="CC" /> |
124 | </Unit> | 124 | </Unit> |
125 | - <Unit filename="v3270\private.h" /> | ||
126 | - <Unit filename="v3270\sources.mak" /> | ||
127 | - <Unit filename="v3270\unlocked.xbm" /> | ||
128 | - <Unit filename="v3270\v3270.h" /> | ||
129 | - <Unit filename="v3270\widget.c"> | 125 | + <Unit filename="v3270/oia.c"> |
126 | + <Option compilerVar="CC" /> | ||
127 | + </Unit> | ||
128 | + <Unit filename="v3270/private.h" /> | ||
129 | + <Unit filename="v3270/sources.mak" /> | ||
130 | + <Unit filename="v3270/unlocked.xbm" /> | ||
131 | + <Unit filename="v3270/v3270.h" /> | ||
132 | + <Unit filename="v3270/widget.c"> | ||
130 | <Option compilerVar="CC" /> | 133 | <Option compilerVar="CC" /> |
131 | </Unit> | 134 | </Unit> |
132 | <Unit filename="valgrind.suppression" /> | 135 | <Unit filename="valgrind.suppression" /> |
src/gtk/v3270/private.h
@@ -112,7 +112,6 @@ void v3270_stop_timer(GtkWidget *terminal); | @@ -112,7 +112,6 @@ void v3270_stop_timer(GtkWidget *terminal); | ||
112 | void v3270_draw_connection(cairo_t *cr, H3270 *host, struct v3270_metrics *metrics, GdkColor *color, GdkRectangle *rect); | 112 | void v3270_draw_connection(cairo_t *cr, H3270 *host, struct v3270_metrics *metrics, GdkColor *color, GdkRectangle *rect); |
113 | void v3270_draw_ssl_status(cairo_t *cr, H3270 *host, struct v3270_metrics *metrics, GdkColor *color, GdkRectangle *rect); | 113 | void v3270_draw_ssl_status(cairo_t *cr, H3270 *host, struct v3270_metrics *metrics, GdkColor *color, GdkRectangle *rect); |
114 | 114 | ||
115 | -void v3270_reload(GtkWidget * widget); | ||
116 | void v3270_update_char(H3270 *session, int addr, unsigned char chr, unsigned short attr, unsigned char cursor); | 115 | void v3270_update_char(H3270 *session, int addr, unsigned char chr, unsigned short attr, unsigned char cursor); |
117 | 116 | ||
118 | void v3270_update_font_metrics(v3270 *terminal, cairo_t *cr, int width, int height); | 117 | void v3270_update_font_metrics(v3270 *terminal, cairo_t *cr, int width, int height); |
src/gtk/v3270/v3270.h
@@ -189,6 +189,8 @@ | @@ -189,6 +189,8 @@ | ||
189 | GtkWidget * v3270_new(void); | 189 | GtkWidget * v3270_new(void); |
190 | GType v3270_get_type(void); | 190 | GType v3270_get_type(void); |
191 | 191 | ||
192 | + void v3270_reload(GtkWidget * widget); | ||
193 | + | ||
192 | void v3270_set_colors(GtkWidget *widget, const gchar *); | 194 | void v3270_set_colors(GtkWidget *widget, const gchar *); |
193 | void v3270_set_color(GtkWidget *widget, enum V3270_COLOR id, const gchar *name); | 195 | void v3270_set_color(GtkWidget *widget, enum V3270_COLOR id, const gchar *name); |
194 | 196 |