@@ -25,6 +25,7 @@ use time::UtcOffset;
25
25
use crate :: {
26
26
app_config:: { deserialize_config, AppConfigVersion } ,
27
27
config:: { load_project_config, ProjectObjectNode } ,
28
+ hotkeys,
28
29
jobs:: {
29
30
objdiff:: { start_build, ObjDiffConfig } ,
30
31
Job , JobQueue , JobResult , JobStatus ,
@@ -527,6 +528,10 @@ impl App {
527
528
}
528
529
529
530
fn post_update ( & mut self , ctx : & egui:: Context , action : Option < DiffViewAction > ) {
531
+ if action. is_some ( ) {
532
+ ctx. request_repaint ( ) ;
533
+ }
534
+
530
535
self . appearance . post_update ( ctx) ;
531
536
532
537
let ViewState { jobs, diff_state, config_state, graphics_state, .. } = & mut self . view_state ;
@@ -690,13 +695,13 @@ impl eframe::App for App {
690
695
* show_side_panel = !* show_side_panel;
691
696
}
692
697
ui. separator ( ) ;
693
- ui. menu_button ( "File" , |ui| {
698
+ ui. menu_button ( hotkeys :: button_alt_text ( ui , "_File" ) , |ui| {
694
699
#[ cfg( debug_assertions) ]
695
- if ui. button ( "Debug…" ) . clicked ( ) {
700
+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Debug…" ) ) . clicked ( ) {
696
701
* show_debug = !* show_debug;
697
702
ui. close_menu ( ) ;
698
703
}
699
- if ui. button ( "Project…" ) . clicked ( ) {
704
+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Project…" ) ) . clicked ( ) {
700
705
* show_project_config = !* show_project_config;
701
706
ui. close_menu ( ) ;
702
707
}
@@ -705,10 +710,11 @@ impl eframe::App for App {
705
710
} else {
706
711
vec ! [ ]
707
712
} ;
713
+ let recent_projects_text = hotkeys:: button_alt_text ( ui, "_Recent Projects…" ) ;
708
714
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 ) ) ;
710
716
} else {
711
- ui. menu_button ( "Recent Projects…" , |ui| {
717
+ ui. menu_button ( recent_projects_text , |ui| {
712
718
if ui. button ( "Clear" ) . clicked ( ) {
713
719
state. write ( ) . unwrap ( ) . config . recent_projects . clear ( ) ;
714
720
} ;
@@ -721,36 +727,39 @@ impl eframe::App for App {
721
727
}
722
728
} ) ;
723
729
}
724
- if ui. button ( "Appearance…" ) . clicked ( ) {
730
+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Appearance…" ) ) . clicked ( ) {
725
731
* show_appearance_config = !* show_appearance_config;
726
732
ui. close_menu ( ) ;
727
733
}
728
- if ui. button ( "Graphics…" ) . clicked ( ) {
734
+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Graphics…" ) ) . clicked ( ) {
729
735
* show_graphics = !* show_graphics;
730
736
ui. close_menu ( ) ;
731
737
}
732
- if ui. button ( "Quit" ) . clicked ( ) {
738
+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Quit" ) ) . clicked ( ) {
733
739
ctx. send_viewport_cmd ( egui:: ViewportCommand :: Close ) ;
734
740
}
735
741
} ) ;
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 ( ) {
738
744
* show_demangle = !* show_demangle;
739
745
ui. close_menu ( ) ;
740
746
}
741
- if ui. button ( "Rlwinm Decoder…") . clicked ( ) {
747
+ if ui. button ( hotkeys :: button_alt_text ( ui , "_Rlwinm Decoder…") ) . clicked ( ) {
742
748
* show_rlwinm_decode = !* show_rlwinm_decode;
743
749
ui. close_menu ( ) ;
744
750
}
745
751
} ) ;
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 ( ) {
748
754
* show_arch_config = !* show_arch_config;
749
755
ui. close_menu ( ) ;
750
756
}
751
757
let mut state = state. write ( ) . unwrap ( ) ;
752
758
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
+ )
754
763
. on_hover_text ( "Automatically re-run the build & diff when files change." ) ;
755
764
if response. changed ( ) {
756
765
state. watcher_change = true ;
@@ -759,18 +768,21 @@ impl eframe::App for App {
759
768
!diff_state. symbol_state . disable_reverse_fn_order ,
760
769
egui:: Checkbox :: new (
761
770
& 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
+ ) ,
763
775
) ,
764
776
)
765
777
. on_disabled_hover_text ( CONFIG_DISABLED_TEXT ) ;
766
778
ui. checkbox (
767
779
& mut diff_state. symbol_state . show_hidden_symbols ,
768
- "Show hidden symbols" ,
780
+ hotkeys :: button_alt_text ( ui , "Show _hidden symbols" ) ,
769
781
) ;
770
782
if ui
771
783
. checkbox (
772
784
& mut state. config . diff_obj_config . relax_reloc_diffs ,
773
- "Relax relocation diffs",
785
+ hotkeys :: button_alt_text ( ui , "Rela_x relocation diffs") ,
774
786
)
775
787
. on_hover_text (
776
788
"Ignores differences in relocation targets. (Address, name, etc)" ,
@@ -782,7 +794,7 @@ impl eframe::App for App {
782
794
if ui
783
795
. checkbox (
784
796
& mut state. config . diff_obj_config . space_between_args ,
785
- "Space between args",
797
+ hotkeys :: button_alt_text ( ui , "_Space between args") ,
786
798
)
787
799
. changed ( )
788
800
{
@@ -791,14 +803,17 @@ impl eframe::App for App {
791
803
if ui
792
804
. checkbox (
793
805
& mut state. config . diff_obj_config . combine_data_sections ,
794
- "Combine data sections" ,
806
+ hotkeys :: button_alt_text ( ui , "Combine _data sections" ) ,
795
807
)
796
808
. on_hover_text ( "Combines data sections with equal names." )
797
809
. changed ( )
798
810
{
799
811
state. queue_reload = true ;
800
812
}
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
+ {
802
817
state. clear_mappings ( ) ;
803
818
diff_state. post_build_nav = Some ( DiffViewNavigation :: symbol_diff ( ) ) ;
804
819
state. queue_reload = true ;
0 commit comments