This repository has been archived on 2022-12-22. You can view files and clone it, but cannot push or open issues/pull-requests.
Concorde-IDE/main.py

40 lines
1.6 KiB
Python
Raw Normal View History

#!/usr/bin/python3
import os
import gui_helper, gui_handler
2022-02-15 20:38:33 +01:00
from config import Config
2022-02-14 13:18:51 +01:00
################################################################################
# CONSTANTS
2022-02-14 13:18:51 +01:00
################################################################################
2022-02-14 14:04:45 +01:00
default_configuration = {
"window size": {
"x": 800,
"y": 600
}
2022-02-14 14:04:45 +01:00
}
#TODO: make this a hidden file once development is far enough along that it doesnt need to be recreated constantly
configuration_file_path = os.path.join(os.path.expanduser("~"), "concorde.json")
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-15 20:38:33 +01:00
configuration = Config(configuration_file_path, default_configuration)
2022-02-14 23:58:48 +01:00
################################################################################
# PROGRAM MAIN WINDOW
################################################################################
main_window = gui_handler.Window()
2022-03-19 06:08:38 +01:00
main_window.set_title("Concorde IDE")
main_window.set_size(configuration.get_configuration_value("window size")["x"], configuration.get_configuration_value("window size")["y"])
2022-03-19 14:05:10 +01:00
2022-03-19 06:08:38 +01:00
main_window.update_menus(gui_helper.menu_structure)
2022-03-19 14:05:10 +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()