Commit 7b6353471c53ab84682e8caa92da79d52e812cb6
1 parent
ed90bd96
Exists in
master
and in
1 other branch
Adjustments in the host settings dialog.
Showing
1 changed file
with
39 additions
and
8 deletions
Show diff stats
src/dialogs/settings/host.c
| ... | ... | @@ -85,10 +85,19 @@ |
| 85 | 85 | { |
| 86 | 86 | .left = 6, |
| 87 | 87 | .top = 1, |
| 88 | - .width = 2, | |
| 88 | + .width = 1, | |
| 89 | 89 | .grid = EMULATION, |
| 90 | 90 | .id = LIB3270_TOGGLE_ALTSCREEN, |
| 91 | + }, | |
| 92 | + | |
| 93 | + { | |
| 94 | + .left = 7, | |
| 95 | + .top = 1, | |
| 96 | + .width = 1, | |
| 97 | + .grid = EMULATION, | |
| 98 | + .id = LIB3270_TOGGLE_MONOCASE, | |
| 91 | 99 | } |
| 100 | + | |
| 92 | 101 | }; |
| 93 | 102 | |
| 94 | 103 | enum _entry |
| ... | ... | @@ -253,8 +262,8 @@ |
| 253 | 262 | |
| 254 | 263 | { |
| 255 | 264 | .top = 2, |
| 256 | - .left = 0, | |
| 257 | - .width = 8, | |
| 265 | + .left = 3, | |
| 266 | + .width = 4, | |
| 258 | 267 | .height = 1, |
| 259 | 268 | .grid = EMULATION, |
| 260 | 269 | |
| ... | ... | @@ -291,6 +300,7 @@ |
| 291 | 300 | GtkComboBox * charset; ///< @brief Charset combo box. |
| 292 | 301 | GtkToggleButton * toggles[G_N_ELEMENTS(toggleList)]; ///< @brief Toggle checks. |
| 293 | 302 | GtkSpinButton * auto_disconnect; ///< @brief Auto disconnect. |
| 303 | + GtkSpinButton * unlock_delay; ///< @brief Unlock delay. | |
| 294 | 304 | |
| 295 | 305 | } input; |
| 296 | 306 | |
| ... | ... | @@ -409,7 +419,7 @@ static void select_remap_file(GtkEditable *editable, G_GNUC_UNUSED GtkEntryIconP |
| 409 | 419 | |
| 410 | 420 | } |
| 411 | 421 | |
| 412 | -static gboolean auto_disconnect_format(GtkSpinButton *spin, G_GNUC_UNUSED gpointer data) { | |
| 422 | +static gboolean spin_format(GtkSpinButton *spin, G_GNUC_UNUSED gpointer data) { | |
| 413 | 423 | |
| 414 | 424 | GtkAdjustment * adjustment = gtk_spin_button_get_adjustment (spin); |
| 415 | 425 | guint value = (guint) gtk_adjustment_get_value(adjustment); |
| ... | ... | @@ -497,7 +507,6 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) |
| 497 | 507 | // Auto disconnect |
| 498 | 508 | { |
| 499 | 509 | GtkWidget *label = gtk_label_new_with_mnemonic(_("Auto _disconnect")); |
| 500 | - | |
| 501 | 510 | gtk_widget_set_halign(label,GTK_ALIGN_END); |
| 502 | 511 | |
| 503 | 512 | widget->input.auto_disconnect = GTK_SPIN_BUTTON(gtk_spin_button_new_with_range(0,60,1)); |
| ... | ... | @@ -508,7 +517,26 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) |
| 508 | 517 | |
| 509 | 518 | gtk_grid_attach(GTK_GRID(grids[CONNECTION]),label,0,2,1,1); |
| 510 | 519 | gtk_grid_attach(GTK_GRID(grids[CONNECTION]),GTK_WIDGET(widget->input.auto_disconnect),1,2,1,1); |
| 511 | - g_signal_connect(G_OBJECT(widget->input.auto_disconnect),"output",G_CALLBACK(auto_disconnect_format),widget); | |
| 520 | + g_signal_connect(G_OBJECT(widget->input.auto_disconnect),"output",G_CALLBACK(spin_format),widget); | |
| 521 | + } | |
| 522 | + | |
| 523 | + // Unlock delay | |
| 524 | + { | |
| 525 | + const LIB3270_UINT_PROPERTY * property = lib3270_unsigned_property_get_by_name("unlock_delay"); | |
| 526 | + | |
| 527 | + GtkWidget *label = gtk_label_new_with_mnemonic(lib3270_property_get_label((const LIB3270_PROPERTY *) property)); | |
| 528 | + gtk_widget_set_halign(label,GTK_ALIGN_END); | |
| 529 | + | |
| 530 | + widget->input.unlock_delay = GTK_SPIN_BUTTON(gtk_spin_button_new_with_range(property->min,property->max,1)); | |
| 531 | + gtk_widget_set_tooltip_markup(GTK_WIDGET(widget->input.unlock_delay),lib3270_property_get_description((const LIB3270_PROPERTY *) property)); | |
| 532 | + gtk_label_set_mnemonic_widget(GTK_LABEL(label),GTK_WIDGET(widget->input.unlock_delay)); | |
| 533 | + | |
| 534 | + gtk_spin_button_set_increments(widget->input.unlock_delay,1,1); | |
| 535 | + | |
| 536 | + gtk_grid_attach(GTK_GRID(grids[EMULATION]),label,6,0,1,1); | |
| 537 | + gtk_grid_attach(GTK_GRID(grids[EMULATION]),GTK_WIDGET(widget->input.unlock_delay),7,0,1,1); | |
| 538 | + g_signal_connect(G_OBJECT(widget->input.unlock_delay),"output",G_CALLBACK(spin_format),widget); | |
| 539 | + | |
| 512 | 540 | } |
| 513 | 541 | |
| 514 | 542 | // SSL checkbox |
| ... | ... | @@ -600,8 +628,8 @@ static void V3270HostSelectWidget_init(V3270HostSelectWidget *widget) |
| 600 | 628 | |
| 601 | 629 | static const struct v3270_entry_field descriptor = |
| 602 | 630 | { |
| 603 | - .top = 0, | |
| 604 | - .left = 6, | |
| 631 | + .top = 2, | |
| 632 | + .left = 0, | |
| 605 | 633 | .width = 2, |
| 606 | 634 | .height = 1, |
| 607 | 635 | |
| ... | ... | @@ -892,5 +920,8 @@ static void load(GtkWidget *w, GtkWidget *terminal) |
| 892 | 920 | // Load auto disconnect |
| 893 | 921 | gtk_spin_button_set_value(widget->input.auto_disconnect, v3270_get_auto_disconnect(terminal)); |
| 894 | 922 | |
| 923 | + // Load unlock delay | |
| 924 | + gtk_spin_button_set_value(widget->input.unlock_delay, lib3270_get_unlock_delay(hSession)); | |
| 925 | + | |
| 895 | 926 | } |
| 896 | 927 | ... | ... |