diff options
author | Lovett, Trevor <trevor.lovett@att.com> | 2019-09-06 08:57:30 -0500 |
---|---|---|
committer | Lovett, Trevor (tl2972) <tl2972@att.com> | 2019-09-06 08:58:02 -0500 |
commit | 39119b4e131155ae38f7b435fc9f3693ca924eed (patch) | |
tree | b8e573d8cdf61fb9eeae36cfe2bf778af3ecab3d | |
parent | d7f6c7ca8191822cf437997337129d087a6533f6 (diff) |
Fixed GUI not saving users' prior settings
Change-Id: Id495e291ef6fe9f8ff024decfe27220a32e727ba
Issue-ID: VVP-298
Signed-off-by: Lovett, Trevor <trevor.lovett@att.com>
-rw-r--r-- | ice_validator/config.py | 4 | ||||
-rw-r--r-- | ice_validator/vvp.py | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/ice_validator/config.py b/ice_validator/config.py index 5ac1cf5..fa8ec62 100644 --- a/ice_validator/config.py +++ b/ice_validator/config.py @@ -226,6 +226,10 @@ class Config: return self._user_settings.get("report_format", "HTML") @property + def default_create_preloads(self): + return self._user_settings.get("create_preloads", 0) + + @property def report_formats(self): return ["CSV", "Excel", "HTML"] diff --git a/ice_validator/vvp.py b/ice_validator/vvp.py index cc2c66f..a998fd1 100644 --- a/ice_validator/vvp.py +++ b/ice_validator/vvp.py @@ -477,7 +477,7 @@ class ValidatorApp: settings_row += 1 self.create_preloads = BooleanVar(self._root, name="create_preloads") - self.create_preloads.set(0) + self.create_preloads.set(self.config.default_create_preloads) create_preloads_label = Label( settings_frame, text="Create Preload from Env Files:", @@ -507,8 +507,9 @@ class ValidatorApp: env_dir_label = Label(actions, text="Env Files:") env_dir_label.grid(row=5, column=1, pady=5, sticky=W) self.env_dir = StringVar(self._root, name="env_dir") + env_dir_state = NORMAL if self.create_preloads.get() else DISABLED self.env_dir_entry = Entry( - actions, width=40, textvariable=self.env_dir, state=DISABLED + actions, width=40, textvariable=self.env_dir, state=env_dir_state ) self.env_dir_entry.grid(row=5, column=2, pady=5, sticky=W) env_dir_browse = Button(actions, text="...", command=self.ask_env_dir_source) @@ -563,9 +564,9 @@ class ValidatorApp: self.input_format, self.report_format, self.halt_on_failure, + self.preload_format, + self.create_preloads, ) - if self.config.preload_formats: - self.config.watch(self.preload_format) self.schedule(self.execute_pollers) if self.config.terms_link_text and not self.config.are_terms_accepted: TermsAndConditionsDialog(parent_frame, self.config) |