changeset d362c64c4ebd in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=d362c64c4ebd
description:
        Do not set toolbar style to page without toolbar

        issue10676
        review375241002
diffstat:

 tryton/gui/main.py           |  3 ++-
 tryton/gui/window/infobar.py |  2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r b1b613ba6059 -r d362c64c4ebd tryton/gui/main.py
--- a/tryton/gui/main.py        Thu Sep 02 14:50:23 2021 +0200
+++ b/tryton/gui/main.py        Thu Sep 02 23:12:06 2021 +0200
@@ -489,7 +489,8 @@
             barstyle = Gtk.ToolbarStyle.ICONS
         for page_idx in range(self.notebook.get_n_pages()):
             page = self.get_page(page_idx)
-            page.toolbar.set_style(barstyle)
+            if page.toolbar:
+                page.toolbar.set_style(barstyle)
 
     def edit_limit(self):
         from tryton.gui.window.limit import Limit
diff -r b1b613ba6059 -r d362c64c4ebd tryton/gui/window/infobar.py
--- a/tryton/gui/window/infobar.py      Thu Sep 02 14:50:23 2021 +0200
+++ b/tryton/gui/window/infobar.py      Thu Sep 02 23:12:06 2021 +0200
@@ -6,6 +6,8 @@
 
 class InfoBar(object):
 
+    toolbar = None
+
     def create_info_bar(self):
         self.info_label = Gtk.Label()
 

Reply via email to