From 2110d7ee41affe44628dd3ac4a971ac80f36e1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 26 Jul 2017 23:39:52 +0200 Subject: [PATCH] Use get_color_selection instead of the pygtk colorsel attribute issue6656 review35171002 --- tryton/gui/window/view_form/view/form_gtk/richtextbox.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/richtextbox.py b/tryton/gui/window/view_form/view/form_gtk/richtextbox.py index 92fa3e6ac8..2d9f382f90 100644 --- a/tryton/gui/window/view_form/view/form_gtk/richtextbox.py +++ b/tryton/gui/window/view_form/view/form_gtk/richtextbox.py @@ -303,12 +303,13 @@ class RichTextBox(TextBox): dialog = gtk.ColorSelectionDialog(_('Select a color')) dialog.set_transient_for(get_toplevel_window()) - dialog.colorsel.set_has_palette(True) + colorsel = dialog.get_color_selection() + colorsel.set_has_palette(True) color = self.colors.get(name) if color: - dialog.colorsel.set_current_color(color) + colorsel.set_current_color(color) if dialog.run() == gtk.RESPONSE_OK: - color = dialog.colorsel.get_current_color() + color = colorsel.get_current_color() self.colors[name] = color if start is not None and end is not None: start = self.text_buffer.get_iter_at_offset(start)