FileSelectWindow.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. #
  5. # Copyright 2022 Stephen Stengel <stephen.stengel@cwu.edu> and friends
  6. #
  7. #
  8. import gi
  9. gi.require_version("Gtk", "3.0")
  10. from gi.repository import Gtk
  11. from Handlers import Handlers
  12. class FileSelectWindow(Gtk.Window):
  13. def __init__(self):
  14. super().__init__(title = "Animal Crossing File Classification")
  15. builder = Gtk.Builder()
  16. builder.add_from_file("file-select-window.glade")
  17. source_button = builder.get_object("source_button")
  18. destination_button = builder.get_object("destination_button")
  19. run_button = builder.get_object("run_button")
  20. source_text_field = builder.get_object("source_text_field")
  21. destination_text_field = builder.get_object("destination_text_field")
  22. progress_spinner = builder.get_object("progress_spinner")
  23. progress_bar = builder.get_object("progress_bar")
  24. window = builder.get_object("file_select_window")
  25. window.connect("destroy", Gtk.main_quit)
  26. window.connect("destroy", Handlers.myDestroy)
  27. myHandlers = Handlers(source_text_field, destination_text_field, progress_spinner, progress_bar, run_button)
  28. builder.connect_signals(myHandlers)
  29. window.show_all()