@@ -915,12 +915,13 @@ def validate_accelerator(self, key, mods):
915
915
# Check nemo's built-ins (copy, paste, etc...)
916
916
for shortcut in self .builtin_shortcuts :
917
917
if shortcut .key == key and shortcut .mods == mods :
918
+ label = f"<b>{ shortcut .label } </b>"
918
919
dialog = Gtk .MessageDialog (
919
920
transient_for = self .main_window ,
920
921
modal = True ,
921
922
message_type = Gtk .MessageType .ERROR ,
922
923
buttons = Gtk .ButtonsType .OK ,
923
- text = _ ("This key combination is already in use by Nemo (<b>%s</b> ). It cannot be changed." ) % shortcut . label ,
924
+ text = _ ("This key combination is already in use by Nemo (%s ). It cannot be changed." ) % label ,
924
925
use_markup = True
925
926
)
926
927
dialog .run ()
@@ -941,14 +942,14 @@ def check_for_action_conflict(iter):
941
942
if accel_string is not None :
942
943
row_key , row_mod = Gtk .accelerator_parse (accel_string )
943
944
if row_key == key and row_mod == mods :
945
+ label = f"\n \n <b>{ row .get_label ()} </b>\n \n "
944
946
dialog = Gtk .MessageDialog (
945
947
transient_for = self .main_window ,
946
948
modal = True ,
947
949
message_type = Gtk .MessageType .WARNING ,
948
950
buttons = Gtk .ButtonsType .YES_NO ,
949
- text = _ ("This key combination is already in use by another action:"
950
- "\n \n <b>%s</b>\n \n "
951
- "Do you want to replace it?" ) % row .get_label (),
951
+ text = _ ("This key combination is already in use by another action:" ) +
952
+ label + _ ("Do you want to replace it?" ),
952
953
use_markup = True
953
954
)
954
955
resp = dialog .run ()
0 commit comments