304 for col in [1, 2]: # check against primary, |
304 for col in [1, 2]: # check against primary, |
305 # then alternative binding |
305 # then alternative binding |
306 itmseq = itm.text(col) |
306 itmseq = itm.text(col) |
307 # step 1: check if shortcut is already allocated |
307 # step 1: check if shortcut is already allocated |
308 if keystr == itmseq: |
308 if keystr == itmseq: |
309 res = E5MessageBox.yesNo(self, |
309 res = E5MessageBox.yesNo( |
|
310 self, |
310 self.trUtf8("Edit shortcuts"), |
311 self.trUtf8("Edit shortcuts"), |
311 self.trUtf8( |
312 self.trUtf8( |
312 """<p><b>{0}</b> has already been""" |
313 """<p><b>{0}</b> has already been""" |
313 """ allocated to the <b>{1}</b> action. """ |
314 """ allocated to the <b>{1}</b> action. """ |
314 """Remove this binding?</p>""") |
315 """Remove this binding?</p>""") |
323 if not itmseq: |
324 if not itmseq: |
324 continue |
325 continue |
325 |
326 |
326 # step 2: check if shortcut hides an already allocated |
327 # step 2: check if shortcut hides an already allocated |
327 if itmseq.startswith("{0}+".format(keystr)): |
328 if itmseq.startswith("{0}+".format(keystr)): |
328 res = E5MessageBox.yesNo(self, |
329 res = E5MessageBox.yesNo( |
|
330 self, |
329 self.trUtf8("Edit shortcuts"), |
331 self.trUtf8("Edit shortcuts"), |
330 self.trUtf8( |
332 self.trUtf8( |
331 """<p><b>{0}</b> hides the <b>{1}</b>""" |
333 """<p><b>{0}</b> hides the <b>{1}</b>""" |
332 """ action. Remove this binding?</p>""") |
334 """ action. Remove this binding?</p>""") |
333 .format(keystr, itm.text(0)), |
335 .format(keystr, itm.text(0)), |
339 return False |
341 return False |
340 |
342 |
341 # step 3: check if shortcut is hidden by an |
343 # step 3: check if shortcut is hidden by an |
342 # already allocated |
344 # already allocated |
343 if keystr.startswith("{0}+".format(itmseq)): |
345 if keystr.startswith("{0}+".format(itmseq)): |
344 res = E5MessageBox.yesNo(self, |
346 res = E5MessageBox.yesNo( |
|
347 self, |
345 self.trUtf8("Edit shortcuts"), |
348 self.trUtf8("Edit shortcuts"), |
346 self.trUtf8( |
349 self.trUtf8( |
347 """<p><b>{0}</b> is hidden by the """ |
350 """<p><b>{0}</b> is hidden by the """ |
348 """<b>{1}</b> action. """ |
351 """<b>{1}</b> action. """ |
349 """Remove this binding?</p>""") |
352 """Remove this binding?</p>""") |