Commit 3f4315f0bc71fb895e3a0924a2f39c3e5df14fb9
1 parent
0921aee9
Exists in
master
and in
4 other branches
Restoring keypad state from session config.
Showing
1 changed file
with
22 additions
and
0 deletions
Show diff stats
src/objects/window/window.c
... | ... | @@ -701,6 +701,28 @@ |
701 | 701 | |
702 | 702 | pw3270_window_set_subtitle(GTK_WIDGET(window), v3270_is_connected(terminal) ? _("Connected to host") : _("Disconnected from host")); |
703 | 703 | |
704 | + // Setup keypads | |
705 | + if(window->keypads) { | |
706 | + | |
707 | + GKeyFile * keyfile = v3270_get_session_keyfile(terminal); | |
708 | + | |
709 | + if(keyfile) { | |
710 | + | |
711 | + GList * keypad; | |
712 | + for(keypad = window->keypads; keypad; keypad = g_list_next(keypad)) { | |
713 | + | |
714 | + GtkWidget *kWidget = GTK_WIDGET(keypad->data); | |
715 | + if(g_key_file_get_boolean(keyfile,"keypads",gtk_widget_get_name(kWidget),NULL)) { | |
716 | + gtk_widget_show(kWidget); | |
717 | + } else { | |
718 | + gtk_widget_hide(kWidget); | |
719 | + } | |
720 | + } | |
721 | + | |
722 | + } | |
723 | + | |
724 | + } | |
725 | + | |
704 | 726 | } else { |
705 | 727 | |
706 | 728 | terminal = NULL; | ... | ... |