Commit 107ace8e035f370cccd36fa1022faa2779d91abb
1 parent
77e8a405
Exists in
master
and in
1 other branch
Fixing
Showing
2 changed files
with
64 additions
and
9 deletions
Show diff stats
glade/widget-test.glade
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | <!-- Generated with glade 3.20.4 --> |
3 | 3 | <interface> |
4 | 4 | <requires lib="gtk+" version="3.20"/> |
5 | + <requires lib="v3270-5.2" version="0.50"/> | |
5 | 6 | <object class="GtkWindow"> |
6 | 7 | <property name="can_focus">False</property> |
7 | 8 | <child> |
... | ... | @@ -167,11 +168,57 @@ |
167 | 168 | </packing> |
168 | 169 | </child> |
169 | 170 | <child> |
170 | - <placeholder/> | |
171 | + <object class="GtkButtonBox"> | |
172 | + <property name="visible">True</property> | |
173 | + <property name="can_focus">False</property> | |
174 | + <property name="hexpand">False</property> | |
175 | + <property name="layout_style">start</property> | |
176 | + <child> | |
177 | + <placeholder/> | |
178 | + </child> | |
179 | + <child> | |
180 | + <placeholder/> | |
181 | + </child> | |
182 | + <child> | |
183 | + <placeholder/> | |
184 | + </child> | |
185 | + <child> | |
186 | + <placeholder/> | |
187 | + </child> | |
188 | + <child> | |
189 | + <placeholder/> | |
190 | + </child> | |
191 | + </object> | |
192 | + <packing> | |
193 | + <property name="expand">False</property> | |
194 | + <property name="fill">False</property> | |
195 | + <property name="position">1</property> | |
196 | + </packing> | |
197 | + </child> | |
198 | + <child> | |
199 | + <object class="v3270"> | |
200 | + <property name="visible">True</property> | |
201 | + <property name="can_focus">True</property> | |
202 | + <property name="can_default">True</property> | |
203 | + <property name="model">3279-2-E</property> | |
204 | + <property name="cursorblink">True</property> | |
205 | + <property name="showtiming">True</property> | |
206 | + <property name="cursorpos">True</property> | |
207 | + <property name="reconnect">True</property> | |
208 | + <property name="autoconnect">True</property> | |
209 | + <property name="beep">True</property> | |
210 | + <property name="altscreen">True</property> | |
211 | + <property name="keepalive">True</property> | |
212 | + </object> | |
213 | + <packing> | |
214 | + <property name="expand">True</property> | |
215 | + <property name="fill">True</property> | |
216 | + <property name="position">2</property> | |
217 | + </packing> | |
171 | 218 | </child> |
172 | 219 | </object> |
173 | 220 | </child> |
174 | - <child> | |
221 | + <child type="titlebar"> | |
175 | 222 | <placeholder/> |
176 | 223 | </child> |
177 | 224 | </object> | ... | ... |
src/v3270/properties.c
... | ... | @@ -39,6 +39,7 @@ |
39 | 39 | #include <lib3270/actions.h> |
40 | 40 | #include <lib3270/log.h> |
41 | 41 | #include <lib3270/macros.h> |
42 | + #include <stdlib.h> | |
42 | 43 | #include <errno.h> |
43 | 44 | #include <v3270.h> |
44 | 45 | #include "private.h" |
... | ... | @@ -62,7 +63,7 @@ |
62 | 63 | break; |
63 | 64 | |
64 | 65 | case PROP_AUTO_DISCONNECT: |
65 | - v3270_set_auto_disconnect(GTK_WIDGET(object),g_value_get_int(value)); | |
66 | + v3270_set_auto_disconnect(GTK_WIDGET(object),g_value_get_uint(value)); | |
66 | 67 | break; |
67 | 68 | |
68 | 69 | case PROP_URL: |
... | ... | @@ -93,7 +94,7 @@ |
93 | 94 | break; |
94 | 95 | |
95 | 96 | case PROP_AUTO_DISCONNECT: |
96 | - g_value_set_int(value,v3270_get_auto_disconnect(GTK_WIDGET(object))); | |
97 | + g_value_set_uint(value,v3270_get_auto_disconnect(GTK_WIDGET(object))); | |
97 | 98 | break; |
98 | 99 | |
99 | 100 | case PROP_LUNAME: |
... | ... | @@ -153,28 +154,35 @@ |
153 | 154 | "model", |
154 | 155 | "model", |
155 | 156 | "The model of 3270 display to be emulated", |
156 | - FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE); | |
157 | + NULL, | |
158 | + G_PARAM_READABLE|G_PARAM_WRITABLE); | |
159 | + | |
157 | 160 | g_object_class_install_property(gobject_class,PROP_MODEL,v3270_properties[PROP_MODEL]); |
158 | 161 | |
159 | 162 | v3270_properties[PROP_LUNAME] = g_param_spec_string( |
160 | 163 | "luname", |
161 | 164 | "luname", |
162 | 165 | "The logical Unit (LU) name", |
163 | - FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE); | |
166 | + NULL, | |
167 | + G_PARAM_READABLE|G_PARAM_WRITABLE); | |
164 | 168 | g_object_class_install_property(gobject_class,PROP_LUNAME,v3270_properties[PROP_LUNAME]); |
165 | 169 | |
166 | - v3270_properties[PROP_AUTO_DISCONNECT] = g_param_spec_string( | |
170 | + v3270_properties[PROP_AUTO_DISCONNECT] = g_param_spec_uint( | |
167 | 171 | "auto_disconnect", |
168 | 172 | "auto_disconnect", |
169 | 173 | "Minutes to disconnect when idle", |
170 | - FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE); | |
174 | + 0, // Minimo | |
175 | + 3600, // Máximo | |
176 | + 0, // Default | |
177 | + G_PARAM_READABLE|G_PARAM_WRITABLE); | |
171 | 178 | g_object_class_install_property(gobject_class,PROP_AUTO_DISCONNECT,v3270_properties[PROP_AUTO_DISCONNECT]); |
172 | 179 | |
173 | 180 | v3270_properties[PROP_URL] = g_param_spec_string( |
174 | 181 | "url", |
175 | 182 | "url", |
176 | 183 | "Host URL", |
177 | - FALSE,G_PARAM_READABLE|G_PARAM_WRITABLE); | |
184 | + getenv("LIB3270_DEFAULT_HOST"), | |
185 | + G_PARAM_READABLE|G_PARAM_WRITABLE); | |
178 | 186 | g_object_class_install_property(gobject_class,PROP_AUTO_DISCONNECT,v3270_properties[PROP_URL]); |
179 | 187 | |
180 | 188 | // Toggle properties | ... | ... |