# ----------------------------------- MainGUI - Import Function (contains import code of this module in order to avoid running them during module import) -----------------------------------
defmain_gui_import_func():
globalGtk,Gdk,os
globalGtk,os
importgi
gi.require_version('Gtk','3.0')
fromgi.repositoryimportGtk,Gdk
fromgi.repositoryimportGtk
importos
...
...
@@ -121,6 +121,7 @@ def main_gui_func():
# Show information for warning the user if the application has been run with root privileges. Information is shown just below the application window headerbar.
ifos.geteuid()==0:# Check UID if it is "0". This means the application is run with root privileges.
importGdk# Used for changing default label color
label_root_warning=Gtk.Label(label=_tr("Warning! The application has been run with root privileges, you may harm your system."))# Generate a new label for the information. This label does not exist in the ".ui" UI file.