animal-gui.py 878 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. #
  5. # Copyright 2022 Stephen Stengel <stephen.stengel@cwu.edu> and friends
  6. #
  7. import gi
  8. gi.require_version("Gtk", "3.0")
  9. from gi.repository import Gtk
  10. def main(args):
  11. print("Hello! Loading...")
  12. #Splash screen should go here.
  13. #I can't find any working tutorials or documentation. Gtk.main()
  14. #My plan:
  15. #Create a splash window using default glade splash window thing
  16. #Create a timer like in handlers.
  17. #Use multiprocessing to spawn a function that does loading
  18. #check if it is done with the timer
  19. #when it is done, destroy the splash screen and load the main screen.
  20. print("loading file window...")
  21. from FileSelectWindow import FileSelectWindow
  22. print("Done!")
  23. # ~ splash.destroy()
  24. theWindow2 = FileSelectWindow()
  25. Gtk.main()
  26. return 0
  27. if __name__ == '__main__':
  28. import sys
  29. sys.exit(main(sys.argv))