# ----------------------------------- MainMenusGUI - Main Menus GUI Function (the code of this module in order to avoid running them during module import and defines GUI functions/signals) -----------------------------------
defmain_menus_gui_func():
globalbuilder
globalmenu1001m
# Define builder and get all objects (Main Menu GUI and About Dialog) from GUI file.
# ********************** Define object functions for Main Menu GUI **********************
defon_menu1001m_show(widget):
checkmenuitem1001m.disconnect_by_func(on_checkmenuitem1001m_toggled)# Disconnect "on_checkmenuitem1001m_toggled" function in order to prevent it from sending event signals when toggling is performed by the code for reflecting the user preference about "Floating Window".
open_terminal_thread=Thread(target=main_menus_gui_open_terminal_func,daemon=True).start()# Terminal is run in another thread in order not to wait end of the run which occurs in single threaded code execution.
defon_checkmenuitem1001m_toggled(widget):# "Floating Summary" menu item
...
...
@@ -100,7 +109,7 @@ def main_menus_gui_func():
Gtk.main_quit()
# ********************** Connect signals to GUI objects for Main Menu GUI **********************
disk_mount_point=bytes(line_split[1],"utf-8").decode("unicode_escape")# String is decoded in order to convert string with escape characters such as "\\040" if they exist.