mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:42:45 +00:00 
			
		
		
		
	LibGUI: Add parent window argument to FilePicker functions
Since FilePicker almost always should be modal, add the parent window as mandatory first argument.
This commit is contained in:
		
							parent
							
								
									9844088964
								
							
						
					
					
						commit
						6568765e8f
					
				
					 14 changed files with 27 additions and 26 deletions
				
			
		|  | @ -92,7 +92,7 @@ int main(int argc, char** argv) | |||
| 
 | ||||
|     auto& app_menu = menubar->add_menu("Font Editor"); | ||||
|     app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) { | ||||
|         Optional<String> open_path = GUI::FilePicker::get_open_filepath(); | ||||
|         Optional<String> open_path = GUI::FilePicker::get_open_filepath(window); | ||||
|         if (!open_path.has_value()) | ||||
|             return; | ||||
| 
 | ||||
|  | @ -112,7 +112,7 @@ int main(int argc, char** argv) | |||
|     app_menu.add_action(GUI::Action::create("Save as...", { Mod_Ctrl | Mod_Shift, Key_S }, Gfx::Bitmap::load_from_file("/res/icons/16x16/save.png"), [&](auto&) { | ||||
|         FontEditorWidget* editor = static_cast<FontEditorWidget*>(window->main_widget()); | ||||
|         LexicalPath lexical_path(editor->path()); | ||||
|         Optional<String> save_path = GUI::FilePicker::get_save_filepath(lexical_path.title(), lexical_path.extension()); | ||||
|         Optional<String> save_path = GUI::FilePicker::get_save_filepath(window, lexical_path.title(), lexical_path.extension()); | ||||
|         if (!save_path.has_value()) | ||||
|             return; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tom
						Tom