Fix #1902978 [[Enhancement] Show current name when renaming an application in the Open with dialog](https://bugs.launchpad.net/calibre/+bug/1902978)

This commit is contained in:
Kovid Goyal 2020-11-24 21:10:22 +05:30
parent 53798ac95f
commit d883f97ee6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -444,7 +444,8 @@ class EditPrograms(Dialog): # {{{
if ci is None:
return error_dialog(self, _('No selection'), _(
'No application selected'), show=True)
name, ok = QInputDialog.getText(self, _('Enter new name'), _('New name for {}').format(ci.data(Qt.DisplayRole)))
name = ci.data(Qt.DisplayRole)
name, ok = QInputDialog.getText(self, _('Enter new name'), _('New name for {}').format(name), text=name)
if ok and name:
entry = ci.data(ENTRY_ROLE)
change_name_in_entry(entry, name)