Better mode PDA
- Form/Search fields on one columns - No toolbar on tree - Labels align on left
This commit is contained in:
@@ -134,7 +134,7 @@ class Tree(SignalEvent):
|
||||
else:
|
||||
self.name = name
|
||||
|
||||
if CONFIG['client.modepda'] and not self.tree_res.toolbar:
|
||||
if CONFIG['client.modepda']:
|
||||
self.toolbar_vpaned.hide()
|
||||
|
||||
self.treeview_sc.connect('row-activated', self.sc_go)
|
||||
@@ -171,7 +171,7 @@ class Tree(SignalEvent):
|
||||
ids = common.process_exception(exception, self.window, *args)
|
||||
if not ids:
|
||||
return
|
||||
if self.tree_res.toolbar:
|
||||
if self.tree_res.toolbar and not CONFIG['client.modepda']:
|
||||
|
||||
icon_name = 'icon'
|
||||
for child in self.toolbar.get_children():
|
||||
|
||||
@@ -412,7 +412,10 @@ class ParserForm(ParserInterface):
|
||||
if not tooltips:
|
||||
tooltips = gtk.Tooltips()
|
||||
container = _container(tooltips)
|
||||
container.new(col=int(attrs.get('col', 4)))
|
||||
if CONFIG['client.modepda']:
|
||||
container.new(col=1)
|
||||
else:
|
||||
container.new(col=int(attrs.get('col', 4)))
|
||||
cursor_widget = attrs.get('cursor')
|
||||
|
||||
if not self.title:
|
||||
@@ -482,6 +485,8 @@ class ParserForm(ParserInterface):
|
||||
label.set_use_markup(True)
|
||||
if 'align' in attrs:
|
||||
label.set_alignment(float(attrs['align'] or 0.0), 0.5)
|
||||
if CONFIG['client.modepda']:
|
||||
label.set_alignment(0.0, 0.5)
|
||||
label.set_angle(int(attrs.get('angle', 0)))
|
||||
expand = False
|
||||
if 'expand' in attrs:
|
||||
|
||||
@@ -3,6 +3,7 @@ import gtk
|
||||
from xml.parsers import expat
|
||||
import sys
|
||||
import gettext
|
||||
from tryton.config import CONFIG
|
||||
|
||||
_LIMIT = 20000
|
||||
|
||||
@@ -79,7 +80,7 @@ class Parse(object):
|
||||
self.fields = fields
|
||||
self.parent = parent
|
||||
self.model = model
|
||||
self.col = 6
|
||||
self.col = CONFIG['client.modepda'] and 1 or 6
|
||||
self.focusable = None
|
||||
self.add_widget_end = []
|
||||
self.container = None
|
||||
|
||||
Reference in New Issue
Block a user