Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Commit 6adb675

Browse files
Add: Dialog for end of support announcement for SMC v1.x.x
1 parent 0409ae1 commit 6adb675

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/Config.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ def config_read_func(self):
8686
# ----------------------- Called for default all settings -----------------------
8787
def config_default_reset_all_func(self):
8888

89+
self.end_of_support_for_v1_dialog_dont_show = 0
90+
8991
self.config_default_general_general_func()
9092
self.config_default_performance_cpu_func()
9193
self.config_default_performance_memory_func()
@@ -236,6 +238,10 @@ def config_get_values_func(self):
236238
self.language = config_values[config_variables.index("language")]
237239
else:
238240
pass
241+
if "end_of_support_for_v1_dialog_dont_show" in config_variables:
242+
self.end_of_support_for_v1_dialog_dont_show = int(config_values[config_variables.index("end_of_support_for_v1_dialog_dont_show")])
243+
else:
244+
pass
239245

240246
self.chart_line_color_cpu_percent = [float(value) for value in config_values[config_variables.index("chart_line_color_cpu_percent")].strip("[]").split(", ")]
241247
self.show_cpu_usage_per_core = int(config_values[config_variables.index("show_cpu_usage_per_core")])
@@ -322,6 +328,7 @@ def config_save_func(self):
322328
config_write_text = config_write_text + "remember_last_opened_tabs_on_application_start = " + str(self.remember_last_opened_tabs_on_application_start) + "\n"
323329
config_write_text = config_write_text + "remember_last_selected_hardware = " + str(self.remember_last_selected_hardware) + "\n"
324330
config_write_text = config_write_text + "remember_window_size = " + str(self.remember_window_size) + "\n"
331+
config_write_text = config_write_text + "end_of_support_for_v1_dialog_dont_show = " + str(self.end_of_support_for_v1_dialog_dont_show) + "\n"
325332
config_write_text = config_write_text + "\n"
326333

327334
config_write_text = config_write_text + "[Performance Tab - CPU]" + "\n"

src/MainGUI.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,16 @@ def on_window1_show(self, widget):
224224
self.grid10.attach(label_root_warning, 0, 0, 1, 1)
225225
label_root_warning.set_visible(True)
226226

227+
# Show information for warning about end of support of v1.x.x version of the application.
228+
if Config.end_of_support_for_v1_dialog_dont_show == 0:
229+
dialog = Gtk.MessageDialog(transient_for=self.window1, title="", flags=0, message_type=Gtk.MessageType.INFO,
230+
buttons=Gtk.ButtonsType.CLOSE, text=_tr("Information"))
231+
dialog.format_secondary_text(_tr("End of support for System Monitoring Center v1.x.x.\nThere will not be new versions for new features, bug fixes, etc."))
232+
self.dialog_response = dialog.run()
233+
dialog.destroy()
234+
Config.end_of_support_for_v1_dialog_dont_show = 1
235+
Config.config_save_func()
236+
227237

228238
# ----------------------------------- Main GUI - Performance Summary Headerbar - Initial Function -----------------------------------
229239
def main_gui_performance_summary_headerbar_initial_func(self):

0 commit comments

Comments
 (0)