mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:52:45 +00:00 
			
		
		
		
	LibWeb: Require parent window argument for MessageBox
Since the vast majority of message boxes should be modal, require the parent window to be passed in, which can be nullptr for the rare case that they don't. By it being the first argument, the default arguments also don't need to be explicitly stated in most cases, and it encourages passing in a parent window handle. Fix up several message boxes that should have been modal.
This commit is contained in:
		
							parent
							
								
									6568765e8f
								
							
						
					
					
						commit
						27bd2eab22
					
				
					 30 changed files with 109 additions and 135 deletions
				
			
		|  | @ -296,7 +296,7 @@ bool FontEditorWidget::save_as(const String& path) | |||
| { | ||||
|     auto ret_val = m_edited_font->write_to_file(path); | ||||
|     if (!ret_val) { | ||||
|         GUI::MessageBox::show("The font file could not be saved.", "Save failed", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window()); | ||||
|         GUI::MessageBox::show(window(), "The font file could not be saved.", "Save failed", GUI::MessageBox::Type::Error); | ||||
|         return false; | ||||
|     } | ||||
|     m_path = path; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tom
						Tom