FileSelectWindow.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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_bar = builder.get_object("progress_bar")
  23. window = builder.get_object("file_select_window")
  24. window.connect("destroy", Gtk.main_quit)
  25. window.connect("destroy", Handlers.myDestroy)
  26. myHandlers = Handlers(source_text_field, destination_text_field, progress_bar, run_button)
  27. builder.connect_signals(myHandlers)
  28. window.show_all()