mirror of
				https://github.com/johrpan/musicus.git
				synced 2025-10-26 19:57:25 +01:00 
			
		
		
		
	Make file choosers modal
This commit is contained in:
		
							parent
							
								
									4a407474e2
								
							
						
					
					
						commit
						d72a0583ff
					
				
					 3 changed files with 6 additions and 0 deletions
				
			
		|  | @ -56,6 +56,8 @@ impl Screen<(), ()> for SourceSelector { | ||||||
|                     (&gettext("Select"), gtk::ResponseType::Accept), |                     (&gettext("Select"), gtk::ResponseType::Accept), | ||||||
|                 ]); |                 ]); | ||||||
| 
 | 
 | ||||||
|  |             dialog.set_modal(true); | ||||||
|  | 
 | ||||||
|             dialog.connect_response(clone!(@weak this => move |dialog, response| { |             dialog.connect_response(clone!(@weak this => move |dialog, response| { | ||||||
|                 this.stack.set_visible_child_name("loading"); |                 this.stack.set_visible_child_name("loading"); | ||||||
|                 dialog.hide(); |                 dialog.hide(); | ||||||
|  |  | ||||||
|  | @ -60,6 +60,8 @@ impl Preferences { | ||||||
|                     (&gettext("Select"), gtk::ResponseType::Accept), |                     (&gettext("Select"), gtk::ResponseType::Accept), | ||||||
|                 ]); |                 ]); | ||||||
| 
 | 
 | ||||||
|  |             dialog.set_modal(true); | ||||||
|  | 
 | ||||||
|             dialog.connect_response(clone!(@strong this => move |dialog, response| { |             dialog.connect_response(clone!(@strong this => move |dialog, response| { | ||||||
|                 if let gtk::ResponseType::Accept = response { |                 if let gtk::ResponseType::Accept = response { | ||||||
|                     if let Some(file) = dialog.get_file() { |                     if let Some(file) = dialog.get_file() { | ||||||
|  |  | ||||||
|  | @ -56,6 +56,8 @@ impl Screen<(), ()> for WelcomeScreen { | ||||||
|                     (&gettext("Select"), gtk::ResponseType::Accept), |                     (&gettext("Select"), gtk::ResponseType::Accept), | ||||||
|                 ]); |                 ]); | ||||||
| 
 | 
 | ||||||
|  |             dialog.set_modal(true); | ||||||
|  | 
 | ||||||
|             dialog.connect_response(clone!(@weak this => move |dialog, response| { |             dialog.connect_response(clone!(@weak this => move |dialog, response| { | ||||||
|                 if let gtk::ResponseType::Accept = response { |                 if let gtk::ResponseType::Accept = response { | ||||||
|                     if let Some(file) = dialog.get_file() { |                     if let Some(file) = dialog.get_file() { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Elias Projahn
						Elias Projahn