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

Commit

Permalink
Add: Dialog for end of support announcement for SMC v1.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
hakandundar34coding committed Oct 17, 2023
1 parent 0409ae1 commit 6adb675
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def config_read_func(self):
# ----------------------- Called for default all settings -----------------------
def config_default_reset_all_func(self):

self.end_of_support_for_v1_dialog_dont_show = 0

self.config_default_general_general_func()
self.config_default_performance_cpu_func()
self.config_default_performance_memory_func()
Expand Down Expand Up @@ -236,6 +238,10 @@ def config_get_values_func(self):
self.language = config_values[config_variables.index("language")]
else:
pass
if "end_of_support_for_v1_dialog_dont_show" in config_variables:
self.end_of_support_for_v1_dialog_dont_show = int(config_values[config_variables.index("end_of_support_for_v1_dialog_dont_show")])
else:
pass

self.chart_line_color_cpu_percent = [float(value) for value in config_values[config_variables.index("chart_line_color_cpu_percent")].strip("[]").split(", ")]
self.show_cpu_usage_per_core = int(config_values[config_variables.index("show_cpu_usage_per_core")])
Expand Down Expand Up @@ -322,6 +328,7 @@ def config_save_func(self):
config_write_text = config_write_text + "remember_last_opened_tabs_on_application_start = " + str(self.remember_last_opened_tabs_on_application_start) + "\n"
config_write_text = config_write_text + "remember_last_selected_hardware = " + str(self.remember_last_selected_hardware) + "\n"
config_write_text = config_write_text + "remember_window_size = " + str(self.remember_window_size) + "\n"
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"
config_write_text = config_write_text + "\n"

config_write_text = config_write_text + "[Performance Tab - CPU]" + "\n"
Expand Down
10 changes: 10 additions & 0 deletions src/MainGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@ def on_window1_show(self, widget):
self.grid10.attach(label_root_warning, 0, 0, 1, 1)
label_root_warning.set_visible(True)

# Show information for warning about end of support of v1.x.x version of the application.
if Config.end_of_support_for_v1_dialog_dont_show == 0:
dialog = Gtk.MessageDialog(transient_for=self.window1, title="", flags=0, message_type=Gtk.MessageType.INFO,
buttons=Gtk.ButtonsType.CLOSE, text=_tr("Information"))
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."))
self.dialog_response = dialog.run()
dialog.destroy()
Config.end_of_support_for_v1_dialog_dont_show = 1
Config.config_save_func()


# ----------------------------------- Main GUI - Performance Summary Headerbar - Initial Function -----------------------------------
def main_gui_performance_summary_headerbar_initial_func(self):
Expand Down

0 comments on commit 6adb675

Please sign in to comment.