46 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Python
		
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Python
		
	
	
| #!/usr/bin/python3
 | ||
| import os
 | ||
| import gui_helper, gui_handler
 | ||
| from config import Config
 | ||
| 
 | ||
| ################################################################################
 | ||
| # CONSTANTS
 | ||
| ################################################################################
 | ||
| 
 | ||
| default_configuration = {
 | ||
|     "window size": {
 | ||
|         "x": 800,
 | ||
|         "y": 600
 | ||
|     }
 | ||
| }
 | ||
| #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")
 | ||
| 
 | ||
| ################################################################################
 | ||
| # PROGRAM STARTUP
 | ||
| ################################################################################
 | ||
| 
 | ||
| configuration = Config(configuration_file_path, default_configuration)
 | ||
| 
 | ||
| ################################################################################
 | ||
| # PROGRAM MAIN WINDOW
 | ||
| ################################################################################
 | ||
| 
 | ||
| # It seems like opening multiple instances already works as intended
 | ||
| 
 | ||
| main_window = gui_handler.Window()
 | ||
| main_window2 = gui_handler.Window()
 | ||
| main_window.set_title("Concorde IDE")
 | ||
| main_window2.set_title("Another window")
 | ||
| main_window.set_size(configuration.get_configuration_value("window size")["x"], configuration.get_configuration_value("window size")["y"])
 | ||
| main_window2.set_size(400, 500)
 | ||
| 
 | ||
| main_window.update_menus(gui_helper.menu_structure)
 | ||
| main_window2.update_menus(gui_helper.menu_structure)
 | ||
| 
 | ||
| 
 | ||
| #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()
 |