@@ -373,15 +373,23 @@ impl eframe::App for App {
373373 egui:: TopBottomPanel :: top ( "top_panel" ) . show ( ctx, |ui| {
374374 egui:: menu:: bar ( ui, |ui| {
375375 ui. menu_button ( "File" , |ui| {
376+ if ui. button ( "Project…" ) . clicked ( ) {
377+ * show_project_config = !* show_project_config;
378+ ui. close_menu ( ) ;
379+ }
376380 let recent_projects = if let Ok ( guard) = config. read ( ) {
377381 guard. recent_projects . clone ( )
378382 } else {
379383 vec ! [ ]
380384 } ;
381385 if recent_projects. is_empty ( ) {
382- ui. add_enabled ( false , egui:: Button :: new ( "Recent Projects …" ) ) ;
386+ ui. add_enabled ( false , egui:: Button :: new ( "Recent projects …" ) ) ;
383387 } else {
384388 ui. menu_button ( "Recent Projects…" , |ui| {
389+ if ui. button ( "Clear" ) . clicked ( ) {
390+ config. write ( ) . unwrap ( ) . recent_projects . clear ( ) ;
391+ } ;
392+ ui. separator ( ) ;
385393 for path in recent_projects {
386394 if ui. button ( format ! ( "{}" , path. display( ) ) ) . clicked ( ) {
387395 config. write ( ) . unwrap ( ) . set_project_dir ( path) ;
@@ -404,6 +412,29 @@ impl eframe::App for App {
404412 ui. close_menu ( ) ;
405413 }
406414 } ) ;
415+ ui. menu_button ( "Diff Options" , |ui| {
416+ let mut config = config. write ( ) . unwrap ( ) ;
417+ let response = ui
418+ . checkbox ( & mut config. rebuild_on_changes , "Rebuild on changes" )
419+ . on_hover_text ( "Automatically re-run the build & diff when files change." ) ;
420+ if response. changed ( ) {
421+ config. watcher_change = true ;
422+ } ;
423+ ui. add_enabled (
424+ !diff_state. symbol_state . disable_reverse_fn_order ,
425+ egui:: Checkbox :: new (
426+ & mut diff_state. symbol_state . reverse_fn_order ,
427+ "Reverse function order (-inline deferred)" ,
428+ ) ,
429+ )
430+ . on_disabled_hover_text (
431+ "Option disabled because it's set by the project configuration file." ,
432+ ) ;
433+ ui. checkbox (
434+ & mut diff_state. symbol_state . show_hidden_symbols ,
435+ "Show hidden symbols" ,
436+ ) ;
437+ } ) ;
407438 } ) ;
408439 } ) ;
409440
0 commit comments