2022-02-14 13:04:51 +01:00
|
|
|
|
#!/usr/bin/python3
|
2022-02-15 20:03:45 +01:00
|
|
|
|
import os
|
2022-03-19 11:50:15 +01:00
|
|
|
|
import gui_helper, gui_handler
|
2022-02-15 20:38:33 +01:00
|
|
|
|
from config import Config
|
2022-02-14 13:04:51 +01:00
|
|
|
|
|
2022-02-14 13:18:51 +01:00
|
|
|
|
################################################################################
|
2022-02-15 20:03:45 +01:00
|
|
|
|
# CONSTANTS
|
2022-02-14 13:18:51 +01:00
|
|
|
|
################################################################################
|
|
|
|
|
|
2022-02-14 14:04:45 +01:00
|
|
|
|
default_configuration = {
|
2022-03-19 11:50:15 +01:00
|
|
|
|
"window size": {
|
|
|
|
|
"x": 800,
|
|
|
|
|
"y": 600
|
|
|
|
|
}
|
2022-02-14 14:04:45 +01:00
|
|
|
|
}
|
2022-03-19 11:50:15 +01:00
|
|
|
|
#TODO: make this a hidden file once development is far enough along that it doesn’t need to be recreated constantly
|
|
|
|
|
configuration_file_path = os.path.join(os.path.expanduser("~"), "concorde.json")
|
2022-02-14 13:04:51 +01:00
|
|
|
|
|
2022-02-14 13:18:51 +01:00
|
|
|
|
################################################################################
|
2022-02-14 23:58:48 +01:00
|
|
|
|
# PROGRAM STARTUP
|
2022-02-14 13:18:51 +01:00
|
|
|
|
################################################################################
|
2022-02-14 13:04:51 +01:00
|
|
|
|
|
2022-02-15 20:38:33 +01:00
|
|
|
|
configuration = Config(configuration_file_path, default_configuration)
|
2022-02-14 13:04:51 +01:00
|
|
|
|
|
2022-02-14 23:58:48 +01:00
|
|
|
|
################################################################################
|
|
|
|
|
# PROGRAM MAIN WINDOW
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2022-03-26 09:43:00 +01:00
|
|
|
|
#Commented out so that I can work on the dockable windows
|
2022-03-19 14:05:10 +01:00
|
|
|
|
|
2022-03-27 12:27:58 +02:00
|
|
|
|
|
|
|
|
|
main_window = gui_handler.Editor((configuration.get_configuration_value("window size")["x"], configuration.get_configuration_value("window size")["y"]))
|
2022-03-26 09:43:00 +01:00
|
|
|
|
main_window.set_title("Concorde IDE")
|
2022-03-19 06:08:38 +01:00
|
|
|
|
main_window.update_menus(gui_helper.menu_structure)
|
2022-03-26 09:43:00 +01:00
|
|
|
|
main_window.show()
|
2022-03-27 12:27:58 +02:00
|
|
|
|
|
2022-03-19 11:50:15 +01:00
|
|
|
|
|
|
|
|
|
#TODO: get resolution of main window on exit and save it back to the configuration
|
|
|
|
|
#TODO: check if the GUI encountered an error in a toolkit agnostic way
|
|
|
|
|
|
|
|
|
|
gui_handler.fixme_window_mainloop_workaround_to_just_get_a_window_started_really_should_not_be_implemented_this_way_for_reasons_stated_in_the_comment_above_the_definition_of_this_function()
|