From 57500675c375949e6d90b7af8de8ce0d88bc8a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 16 Jul 2017 23:52:05 +0200 Subject: [PATCH] Apply widget style to editable entry The Char widget with autocomplete should apply the style on the entry widget instead of the ComboBoxEntry. issue6620 review41431002 --- tryton/gui/window/view_form/view/form_gtk/char.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/char.py b/tryton/gui/window/view_form/view/form_gtk/char.py index 6face14b52..cd74964236 100644 --- a/tryton/gui/window/view_form/view/form_gtk/char.py +++ b/tryton/gui/window/view_form/view/form_gtk/char.py @@ -142,11 +142,12 @@ class Char(Widget, TranslateMixin, PopdownMixin): sensitivity = {True: gtk.SENSITIVITY_OFF, False: gtk.SENSITIVITY_AUTO} super(Char, self)._readonly_set(value) if self.autocomplete: - self.entry.get_child().set_editable(not value) + entry_editable = self.entry.get_child() self.entry.set_button_sensitivity(sensitivity[value]) else: - self.entry.set_editable(not value) - set_widget_style(self.entry, not value) + entry_editable = self.entry + entry_editable.set_editable(not value) + set_widget_style(entry_editable, not value) if value and CONFIG['client.fast_tabbing']: self.widget.set_focus_chain([]) else: