Reviewers: ,
Please review this at http://codereview.tryton.org/35003/
Affected files:
M tryton/action/main.py
M tryton/gui/window/window.py
M tryton/gui/window/wizard.py
Index: tryton/action/main.py
===================================================================
--- a/tryton/action/main.py
+++ b/tryton/action/main.py
@@ -154,7 +154,7 @@
direct_print=action.get('direct_print', False),
email_print=action.get('email_print', False),
email=action.get('email'), name=action.get('name',
False),
- context=context)
+ context=context, icon=(action.get('icon.rec_name')
or ''))
else:
Wizard.execute(action['wiz_name'], data, window,
direct_print=action.get('direct_print', False),
Index: tryton/gui/window/window.py
===================================================================
--- a/tryton/gui/window/window.py
+++ b/tryton/gui/window/window.py
@@ -29,10 +29,12 @@
@staticmethod
def create_wizard(action, datas, parent, state='init',
direct_print=False,
- email_print=False, email=None, name=False, context=None):
+ email_print=False, email=None, name=False, context=None,
+ icon=None):
from tryton.gui import Main
from wizard import Wizard
win = Wizard(parent, name=name)
+ win.icon = icon
Main.get_main().win_add(win)
win.run(action, datas, state=state, direct_print=direct_print,
email_print=email_print, email=email, context=context)
Index: tryton/gui/window/wizard.py
===================================================================
--- a/tryton/gui/window/wizard.py
+++ b/tryton/gui/window/wizard.py
@@ -16,6 +16,8 @@
super(Wizard, self).__init__()
self.window = window
self.widget = gtk.VBox(spacing=3)
+ self.toolbar_box = gtk.HBox()
+ self.widget.pack_start(self.toolbar_box, False, True)
self.widget.show()
self.name = name or ''
self.model = ''
@@ -117,6 +119,9 @@
self.end()
def destroy(self):
+ if self.toolbar_box.get_children():
+ toolbar = self.toolbar_box.get_children()[0]
+ self.toolbar_box.remove(toolbar)
if hasattr(self, 'screen'):
self.screen.signal_unconnect(self)
self.screen.destroy()
@@ -217,6 +222,8 @@
self.widget.pack_start(eb, expand=False, fill=True, padding=3)
+ self.widget.pack_start(self.toolbar_box, False, True)
+
viewport = gtk.Viewport()
viewport.set_shadow_type(gtk.SHADOW_NONE)
viewport.add(self.screen.widget)
--
[email protected] mailing list