From d883f97ee64542accc3b2804779ebaf36375f9c4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 24 Nov 2020 21:10:22 +0530 Subject: [PATCH] Fix #1902978 [[Enhancement] Show current name when renaming an application in the Open with dialog](https://bugs.launchpad.net/calibre/+bug/1902978) --- src/calibre/gui2/open_with.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/open_with.py b/src/calibre/gui2/open_with.py index c9f38cea0d..91c7dfc785 100644 --- a/src/calibre/gui2/open_with.py +++ b/src/calibre/gui2/open_with.py @@ -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)