mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +00:00 
			
		
		
		
	Application: Fix for reboot on PowerDialog close button click
This commit is contained in:
		
							parent
							
								
									3152559422
								
							
						
					
					
						commit
						b3bdab8cf7
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		|  | @ -53,10 +53,10 @@ static const Vector<PowerOption> options = { | |||
| Vector<char const*> PowerDialog::show() | ||||
| { | ||||
|     auto rc = PowerDialog::construct()->exec(); | ||||
|     if (rc < 0) | ||||
|         return {}; | ||||
|     if(rc == ExecResult::ExecOK) | ||||
|         return options[rc].cmd; | ||||
| 
 | ||||
|     return options[rc].cmd; | ||||
|     return {}; | ||||
| } | ||||
| 
 | ||||
| PowerDialog::PowerDialog() | ||||
|  | @ -103,13 +103,13 @@ PowerDialog::PowerDialog() | |||
| 
 | ||||
|     auto& ok_button = button_box.add<GUI::Button>(); | ||||
|     ok_button.on_click = [this] { | ||||
|         done(m_selected_option); | ||||
|         done(ExecResult::ExecOK); | ||||
|     }; | ||||
|     ok_button.set_text("OK"); | ||||
| 
 | ||||
|     auto& cancel_button = button_box.add<GUI::Button>(); | ||||
|     cancel_button.on_click = [this] { | ||||
|         done(-1); | ||||
|         done(ExecResult::ExecCancel); | ||||
|     }; | ||||
|     cancel_button.set_text("Cancel"); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Hüseyin ASLITÜRK
						Hüseyin ASLITÜRK