@@ -25,6 +25,7 @@ use time::UtcOffset;
2525use crate :: {
2626 app_config:: { deserialize_config, AppConfigVersion } ,
2727 config:: { load_project_config, ProjectObjectNode } ,
28+ hotkeys,
2829 jobs:: {
2930 objdiff:: { start_build, ObjDiffConfig } ,
3031 Job , JobQueue , JobResult , JobStatus ,
@@ -527,6 +528,10 @@ impl App {
527528 }
528529
529530 fn post_update ( & mut self , ctx : & egui:: Context , action : Option < DiffViewAction > ) {
531+ if action. is_some ( ) {
532+ ctx. request_repaint ( ) ;
533+ }
534+
530535 self . appearance . post_update ( ctx) ;
531536
532537 let ViewState { jobs, diff_state, config_state, graphics_state, .. } = & mut self . view_state ;
@@ -690,13 +695,13 @@ impl eframe::App for App {
690695 * show_side_panel = !* show_side_panel;
691696 }
692697 ui. separator ( ) ;
693- ui. menu_button ( "File" , |ui| {
698+ ui. menu_button ( hotkeys :: button_alt_text ( ui , "_File" ) , |ui| {
694699 #[ cfg( debug_assertions) ]
695- if ui. button ( "Debug…" ) . clicked ( ) {
700+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Debug…" ) ) . clicked ( ) {
696701 * show_debug = !* show_debug;
697702 ui. close_menu ( ) ;
698703 }
699- if ui. button ( "Project…" ) . clicked ( ) {
704+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Project…" ) ) . clicked ( ) {
700705 * show_project_config = !* show_project_config;
701706 ui. close_menu ( ) ;
702707 }
@@ -705,10 +710,11 @@ impl eframe::App for App {
705710 } else {
706711 vec ! [ ]
707712 } ;
713+ let recent_projects_text = hotkeys:: button_alt_text ( ui, "_Recent Projects…" ) ;
708714 if recent_projects. is_empty ( ) {
709- ui. add_enabled ( false , egui:: Button :: new ( "Recent projects…" ) ) ;
715+ ui. add_enabled ( false , egui:: Button :: new ( recent_projects_text ) ) ;
710716 } else {
711- ui. menu_button ( "Recent Projects…" , |ui| {
717+ ui. menu_button ( recent_projects_text , |ui| {
712718 if ui. button ( "Clear" ) . clicked ( ) {
713719 state. write ( ) . unwrap ( ) . config . recent_projects . clear ( ) ;
714720 } ;
@@ -721,36 +727,39 @@ impl eframe::App for App {
721727 }
722728 } ) ;
723729 }
724- if ui. button ( "Appearance…" ) . clicked ( ) {
730+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Appearance…" ) ) . clicked ( ) {
725731 * show_appearance_config = !* show_appearance_config;
726732 ui. close_menu ( ) ;
727733 }
728- if ui. button ( "Graphics…" ) . clicked ( ) {
734+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Graphics…" ) ) . clicked ( ) {
729735 * show_graphics = !* show_graphics;
730736 ui. close_menu ( ) ;
731737 }
732- if ui. button ( "Quit" ) . clicked ( ) {
738+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Quit" ) ) . clicked ( ) {
733739 ctx. send_viewport_cmd ( egui:: ViewportCommand :: Close ) ;
734740 }
735741 } ) ;
736- ui. menu_button ( "Tools" , |ui| {
737- if ui. button ( "Demangle…" ) . clicked ( ) {
742+ ui. menu_button ( hotkeys :: button_alt_text ( ui , "_Tools" ) , |ui| {
743+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Demangle…" ) ) . clicked ( ) {
738744 * show_demangle = !* show_demangle;
739745 ui. close_menu ( ) ;
740746 }
741- if ui. button ( "Rlwinm Decoder…") . clicked ( ) {
747+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Rlwinm Decoder…") ) . clicked ( ) {
742748 * show_rlwinm_decode = !* show_rlwinm_decode;
743749 ui. close_menu ( ) ;
744750 }
745751 } ) ;
746- ui. menu_button ( "Diff Options", |ui| {
747- if ui. button ( "Arch Settings…") . clicked ( ) {
752+ ui. menu_button ( hotkeys :: button_alt_text ( ui , "_Diff Options") , |ui| {
753+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Arch Settings…") ) . clicked ( ) {
748754 * show_arch_config = !* show_arch_config;
749755 ui. close_menu ( ) ;
750756 }
751757 let mut state = state. write ( ) . unwrap ( ) ;
752758 let response = ui
753- . checkbox ( & mut state. config . rebuild_on_changes , "Rebuild on changes" )
759+ . checkbox (
760+ & mut state. config . rebuild_on_changes ,
761+ hotkeys:: button_alt_text ( ui, "_Rebuild on changes" ) ,
762+ )
754763 . on_hover_text ( "Automatically re-run the build & diff when files change." ) ;
755764 if response. changed ( ) {
756765 state. watcher_change = true ;
@@ -759,18 +768,21 @@ impl eframe::App for App {
759768 !diff_state. symbol_state . disable_reverse_fn_order ,
760769 egui:: Checkbox :: new (
761770 & mut diff_state. symbol_state . reverse_fn_order ,
762- "Reverse function order (-inline deferred)" ,
771+ hotkeys:: button_alt_text (
772+ ui,
773+ "Reverse function order (-inline _deferred)" ,
774+ ) ,
763775 ) ,
764776 )
765777 . on_disabled_hover_text ( CONFIG_DISABLED_TEXT ) ;
766778 ui. checkbox (
767779 & mut diff_state. symbol_state . show_hidden_symbols ,
768- "Show hidden symbols" ,
780+ hotkeys :: button_alt_text ( ui , "Show _hidden symbols" ) ,
769781 ) ;
770782 if ui
771783 . checkbox (
772784 & mut state. config . diff_obj_config . relax_reloc_diffs ,
773- "Relax relocation diffs",
785+ hotkeys :: button_alt_text ( ui , "Rela_x relocation diffs") ,
774786 )
775787 . on_hover_text (
776788 "Ignores differences in relocation targets. (Address, name, etc)" ,
@@ -782,7 +794,7 @@ impl eframe::App for App {
782794 if ui
783795 . checkbox (
784796 & mut state. config . diff_obj_config . space_between_args ,
785- "Space between args",
797+ hotkeys :: button_alt_text ( ui , "_Space between args") ,
786798 )
787799 . changed ( )
788800 {
@@ -791,14 +803,17 @@ impl eframe::App for App {
791803 if ui
792804 . checkbox (
793805 & mut state. config . diff_obj_config . combine_data_sections ,
794- "Combine data sections" ,
806+ hotkeys :: button_alt_text ( ui , "Combine _data sections" ) ,
795807 )
796808 . on_hover_text ( "Combines data sections with equal names." )
797809 . changed ( )
798810 {
799811 state. queue_reload = true ;
800812 }
801- if ui. button ( "Clear custom symbol mappings" ) . clicked ( ) {
813+ if ui
814+ . button ( hotkeys:: button_alt_text ( ui, "_Clear custom symbol mappings" ) )
815+ . clicked ( )
816+ {
802817 state. clear_mappings ( ) ;
803818 diff_state. post_build_nav = Some ( DiffViewNavigation :: symbol_diff ( ) ) ;
804819 state. queue_reload = true ;
0 commit comments