Commit d60908ae13b8d95604f5e8a005fcb0be39fb8b68
1 parent
7bbfffa4
Exists in
master
and in
1 other branch
Fixing oversize settings.
Showing
3 changed files
with
20 additions
and
5 deletions
Show diff stats
src/dialogs/hostselect.c
@@ -38,6 +38,7 @@ | @@ -38,6 +38,7 @@ | ||
38 | #include <v3270/settings.h> | 38 | #include <v3270/settings.h> |
39 | #include <lib3270/log.h> | 39 | #include <lib3270/log.h> |
40 | #include <lib3270/toggle.h> | 40 | #include <lib3270/toggle.h> |
41 | + #include <lib3270/properties.h> | ||
41 | 42 | ||
42 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ | 43 | /*--[ Globals ]--------------------------------------------------------------------------------------*/ |
43 | 44 | ||
@@ -699,6 +700,9 @@ static void apply(GtkWidget *w, GtkWidget *terminal) | @@ -699,6 +700,9 @@ static void apply(GtkWidget *w, GtkWidget *terminal) | ||
699 | v3270_set_toggle(terminal, toggleList[toggle].id, gtk_toggle_button_get_active(widget->input.toggles[toggle])); | 700 | v3270_set_toggle(terminal, toggleList[toggle].id, gtk_toggle_button_get_active(widget->input.toggles[toggle])); |
700 | } | 701 | } |
701 | 702 | ||
703 | + // Apply oversize | ||
704 | + lib3270_set_oversize(hSession,gtk_entry_get_text(widget->input.entry[ENTRY_OVERSIZE])); | ||
705 | + | ||
702 | } | 706 | } |
703 | 707 | ||
704 | static void load(GtkWidget *w, GtkWidget *terminal) | 708 | static void load(GtkWidget *w, GtkWidget *terminal) |
@@ -827,5 +831,9 @@ static void load(GtkWidget *w, GtkWidget *terminal) | @@ -827,5 +831,9 @@ static void load(GtkWidget *w, GtkWidget *terminal) | ||
827 | gtk_toggle_button_set_active(widget->input.toggles[toggle],v3270_get_toggle(terminal,toggleList[toggle].id)); | 831 | gtk_toggle_button_set_active(widget->input.toggles[toggle],v3270_get_toggle(terminal,toggleList[toggle].id)); |
828 | } | 832 | } |
829 | 833 | ||
834 | + // Load oversize | ||
835 | + const char * oversize = lib3270_get_oversize(hSession); | ||
836 | + gtk_entry_set_text(widget->input.entry[ENTRY_OVERSIZE],oversize ? oversize : ""); | ||
837 | + | ||
830 | } | 838 | } |
831 | 839 |
src/include/terminal.h
@@ -42,6 +42,9 @@ G_BEGIN_DECLS | @@ -42,6 +42,9 @@ G_BEGIN_DECLS | ||
42 | V3270_SETTING_DYNAMIC_SPACING, | 42 | V3270_SETTING_DYNAMIC_SPACING, |
43 | V3270_SETTING_LU_NAMES, | 43 | V3270_SETTING_LU_NAMES, |
44 | V3270_SETTING_MODEL_NUMBER, | 44 | V3270_SETTING_MODEL_NUMBER, |
45 | + V3270_SETTING_OVERSIZE, | ||
46 | + V3270_SETTING_HOST_CHARSET, | ||
47 | + V3270_SETTING_UNLOCK_DELAY, | ||
45 | 48 | ||
46 | V3270_SETTING_COUNT ///< @brief Number of setting properties. | 49 | V3270_SETTING_COUNT ///< @brief Number of setting properties. |
47 | } V3270_SETTING; | 50 | } V3270_SETTING; |
src/terminal/properties/init.c
@@ -41,11 +41,15 @@ | @@ -41,11 +41,15 @@ | ||
41 | const char *name; | 41 | const char *name; |
42 | GParamSpec **prop; | 42 | GParamSpec **prop; |
43 | } properties[] = { | 43 | } properties[] = { |
44 | - { "connected", &klass->properties.online }, | ||
45 | - { "associated-lu", &klass->properties.associated_lu }, | ||
46 | - { "url", &klass->properties.settings[V3270_SETTING_URL] }, | ||
47 | - { "model-number", &klass->properties.settings[V3270_SETTING_MODEL_NUMBER] }, | ||
48 | - { "has-selection", &klass->properties.selection }, | 44 | + { "connected", &klass->properties.online }, |
45 | + { "associated-lu", &klass->properties.associated_lu }, | ||
46 | + { "url", &klass->properties.settings[V3270_SETTING_URL] }, | ||
47 | + { "model-number", &klass->properties.settings[V3270_SETTING_MODEL_NUMBER] }, | ||
48 | + { "has-selection", &klass->properties.selection }, | ||
49 | + { "oversize", &klass->properties.settings[V3270_SETTING_OVERSIZE] }, | ||
50 | + { "host-charset", &klass->properties.settings[V3270_SETTING_HOST_CHARSET] }, | ||
51 | + { "unlock-delay", &klass->properties.settings[V3270_SETTING_UNLOCK_DELAY] }, | ||
52 | + | ||
49 | }; | 53 | }; |
50 | 54 | ||
51 | size_t ix; | 55 | size_t ix; |