From 6fa017bf4bd509af5b82206ceb5ff0cf207e5d0f Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Fri, 11 May 2018 10:15:45 +0200 Subject: [PATCH] Set primary icon as insensitive when date widget is readonly Changeset e94d02425edb moved the icon to primary widget but did not update the sensitive property when widget is readonly issue7426 review47401002 --- tryton/gui/window/view_form/view/form_gtk/calendar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/calendar.py b/tryton/gui/window/view_form/view/form_gtk/calendar.py index aa6da62f69..e9428f19f4 100644 --- a/tryton/gui/window/view_form/view/form_gtk/calendar.py +++ b/tryton/gui/window/view_form/view/form_gtk/calendar.py @@ -37,7 +37,7 @@ class Date(Widget): def _set_editable(self, value): self.entry.set_editable(value) - self.entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, value) + self.entry.set_icon_sensitive(gtk.ENTRY_ICON_PRIMARY, value) def _readonly_set(self, value): self._set_editable(not value) @@ -151,7 +151,7 @@ class DateTime(Date): for child in self.entry.get_children(): if isinstance(child, gtk.Entry): child.set_editable(value) - child.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, value) + child.set_icon_sensitive(gtk.ENTRY_ICON_PRIMARY, value) elif isinstance(child, gtk.ComboBoxEntry): child.set_sensitive(value)