Commit 303fede16d708e7163b4e8be8b9e546e2e25104c

Authored by Perry Werneck
1 parent fe506fe1

Ajustando diálogo de transferência de arquivos.

src/pw3270/v3270ft/Makefile.in
... ... @@ -29,7 +29,7 @@ MODULE_NAME=v3270ft
29 29 #---[ Application sources ]--------------------------------------------------------------
30 30  
31 31 SOURCES=filelist.c load.c misc.c select.c transfer.c v3270ftprogress.c get.c \
32   - marshal.c save.c set.c testprogram.c v3270ft.c
  32 + marshal.c save.c set.c testprogram.c v3270ft.c tables.c
33 33  
34 34 #---[ Configuration values ]-------------------------------------------------------------
35 35  
... ...
src/pw3270/v3270ft/ftdialog.cbp
... ... @@ -112,6 +112,9 @@
112 112 <Unit filename="set.c">
113 113 <Option compilerVar="CC" />
114 114 </Unit>
  115 + <Unit filename="tables.c">
  116 + <Option compilerVar="CC" />
  117 + </Unit>
115 118 <Unit filename="testprogram.c">
116 119 <Option compilerVar="CC" />
117 120 </Unit>
... ...
src/pw3270/v3270ft/private.h
... ... @@ -56,23 +56,24 @@
56 56 FT_BUTTON_COUNT
57 57 } FT_BUTTON;
58 58  
59   - const struct v3270ft_option {
  59 + struct v3270ft_option {
60 60  
61 61 LIB3270_FT_OPTION opt;
62 62 const char * name;
63 63 const char * label;
64 64 const char * tooltip;
65 65  
66   - } ft_option[NUM_OPTIONS_WIDGETS];
  66 + };
  67 +
67 68  
68   - const struct v3270ft_type {
  69 + struct v3270ft_type {
69 70 LIB3270_FT_OPTION opt;
70 71 const gchar * name;
71 72 const gchar * type;
72 73 const gchar * label;
73   - } ft_type[NUM_TYPES];
  74 + };
74 75  
75   - const struct v3270ft_value {
  76 + struct v3270ft_value {
76 77  
77 78 const gchar * name;
78 79 guint minval;
... ... @@ -80,7 +81,11 @@
80 81 const gchar * label;
81 82 const gchar * tooltip;
82 83  
83   - } ft_value[LIB3270_FT_VALUE_COUNT];
  84 + };
  85 +
  86 + extern const struct v3270ft_option ft_option[];
  87 + extern const struct v3270ft_type ft_type[];
  88 + extern const struct v3270ft_value ft_value[];
84 89  
85 90 struct v3270ft_entry {
86 91 gint type; ///< Transfer type.
... ...
src/pw3270/v3270ft/select.c
... ... @@ -64,7 +64,7 @@ gchar * v3270ft_select_file(v3270ft *dialog, const gchar *title, const gchar *bu
64 64 (
65 65 title,
66 66 GTK_WINDOW(dialog),
67   - GTK_FILE_CHOOSER_ACTION_OPEN,
  67 + action,
68 68 _("_Cancel" ), GTK_RESPONSE_CANCEL,
69 69 button, GTK_RESPONSE_ACCEPT,
70 70 NULL
... ...
src/pw3270/v3270ft/v3270ft.c
... ... @@ -42,168 +42,6 @@
42 42  
43 43 G_DEFINE_TYPE(v3270ft, v3270ft, GTK_TYPE_DIALOG);
44 44  
45   -
46   -/*--[ Globals ]--------------------------------------------------------------------------------------*/
47   -
48   -const struct v3270ft_option ft_option[NUM_OPTIONS_WIDGETS] = {
49   -
50   - // Transfer options
51   - {
52   - LIB3270_FT_OPTION_ASCII,
53   - "ascii",
54   - N_("_Text file"),
55   - N_( "Check this if the file consists of character data only.")
56   - },
57   - {
58   - LIB3270_FT_OPTION_CRLF,
59   - "crlf",
60   - N_("Follow the convention for _ASCII text files."),
61   -#ifdef _WIN32
62   - N_( "Following the convention for ASCII text files, CR/LF pairs are used to terminate records in the PC file, and a CTRL-Z (x'1A') marks the end of file.")
63   -#else
64   - N_( "Following the convention for ASCII text files, LF is used to terminate records in the PC file.")
65   -#endif // _WIN32
66   -
67   - },
68   - {
69   - LIB3270_FT_OPTION_APPEND,
70   - "append",
71   - N_("A_ppend to file"),
72   - N_( "Appends the source file to the destination file.")
73   - },
74   - {
75   - LIB3270_FT_OPTION_REMAP,
76   - "remap",
77   - N_("Re_map ASCII Characters."),
78   - N_("Remap the text to ensure maximum compatibility between the workstation's character set and encoding and the host's EBCDIC code page.")
79   - },
80   -
81   - // Record format
82   - {
83   - LIB3270_FT_RECORD_FORMAT_DEFAULT,
84   - "recfm.default",
85   - N_("Default"),
86   - N_("Use host default record format.")
87   - },
88   - {
89   - LIB3270_FT_RECORD_FORMAT_FIXED,
90   - "recfm.fixed",
91   - N_("Fixed"),
92   - N_("Creates a file with fixed-length records.")
93   - },
94   - {
95   - LIB3270_FT_RECORD_FORMAT_VARIABLE,
96   - "recfm.variable",
97   - N_("Variable"),
98   - N_("Creates a file with variable-length records.")
99   - },
100   - {
101   - LIB3270_FT_RECORD_FORMAT_UNDEFINED,
102   - "recfm.undefined",
103   - N_("Undefined"),
104   - N_("Creates a file with undefined-length records (TSO hosts only).")
105   - },
106   -
107   - // Space allocation units
108   - {
109   - LIB3270_FT_ALLOCATION_UNITS_DEFAULT,
110   - "units.default",
111   - N_("Default"),
112   - NULL
113   - },
114   - {
115   - LIB3270_FT_ALLOCATION_UNITS_TRACKS,
116   - "units.tracks",
117   - N_("Tracks"),
118   - NULL
119   - },
120   - {
121   - LIB3270_FT_ALLOCATION_UNITS_CYLINDERS,
122   - "units.cylinders",
123   - N_("Cylinders"),
124   - NULL
125   - },
126   - {
127   - LIB3270_FT_ALLOCATION_UNITS_AVBLOCK,
128   - "units.avblock",
129   - N_("Avblock"),
130   - NULL
131   - },
132   -
133   -};
134   -
135   -const struct v3270ft_type ft_type[NUM_TYPES] = {
136   -
137   - {
138   - LIB3270_FT_OPTION_SEND,
139   - "send",
140   - "binary",
141   - N_("Send file")
142   - },
143   - {
144   - LIB3270_FT_OPTION_RECEIVE,
145   - "receive",
146   - "binary",
147   - N_("Receive file")
148   - },
149   - {
150   - LIB3270_FT_OPTION_SEND|LIB3270_FT_OPTION_ASCII|LIB3270_FT_OPTION_CRLF|LIB3270_FT_OPTION_REMAP,
151   - "send",
152   - "text",
153   - N_("Send text file")
154   - },
155   - {
156   - LIB3270_FT_OPTION_RECEIVE|LIB3270_FT_OPTION_ASCII|LIB3270_FT_OPTION_CRLF|LIB3270_FT_OPTION_REMAP,
157   - "receive",
158   - "text",
159   - N_("Receive text file")
160   - }
161   -};
162   -
163   -const struct v3270ft_value ft_value[LIB3270_FT_VALUE_COUNT] = {
164   - {
165   - "lrecl",
166   - 0, 32760,
167   - N_( "Record Length:" ),
168   - N_( "Specifies the logical record length (n) for a data set consisting of fixed length records or the maximum logical record length for a data set consisting of variable length records." )
169   - },
170   -
171   -
172   - {
173   - "primary",
174   - 0,99999,
175   - N_( "Primary space:" ),
176   - N_( "Primary allocation for a file created on a TSO host.\nThe units are given by the space allocation units option." )
177   - },
178   -
179   - {
180   - "blksize",
181   - 0,32760,
182   - N_( "Block size:" ),
183   - N_( "Specifies the block size (n) for a new data set. For data sets containing fixed " \
184   - "length records, the block size must be a multiple of the record length. " \
185   - "For data sets containing variable length records, the block size must be " \
186   - "greater than or equal to the record length plus four bytes. The block size " \
187   - "must not exceed the track length of the device on which the data set resides." )
188   - },
189   -
190   - {
191   - "secondary",
192   - 0,99999,
193   - N_( "Secondary space:" ),
194   - N_( "Secondary allocation for a file created on a TSO host.\nThe units are given by the space allocation units option." )
195   - },
196   -
197   - {
198   - "dft",
199   - 0,99999,
200   - N_( "DFT B_uffer size:" ),
201   - N_("Specifies the default buffer size for DFT IND$FILE file transfers.")
202   - },
203   -
204   -};
205   -
206   -
207 45 /*--[ Implement ]------------------------------------------------------------------------------------*/
208 46  
209 47 void v3270ft_remove_all(GtkWidget *widget) {
... ...