Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit gnuhealth-client for openSUSE:Factory
Hello community,

here is the log from the commit of package gnuhealth-client for
openSUSE:Factory checked in at 2019-04-20 17:13:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnuhealth-client (Old)
and /work/SRC/openSUSE:Factory/.gnuhealth-client.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnuhealth-client"

Sat Apr 20 17:13:37 2019 rev:7 rq:696161 version:3.4.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnuhealth-client/gnuhealth-client.changes
2019-04-05 12:06:41.934574195 +0200
+++
/work/SRC/openSUSE:Factory/.gnuhealth-client.new.5536/gnuhealth-client.changes
2019-04-20 17:13:39.942968862 +0200
@@ -1,0 +2,5 @@
+Sat Apr 20 07:25:40 UTC 2019 - Axel Braun <axel.braun@xxxxxx>
+
+- version 3.4.4 - Security fix boo#1131707
+
+-------------------------------------------------------------------

Old:
----
gnuhealth-client-3.4.3.tar.gz

New:
----
gnuhealth-client-3.4.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnuhealth-client.spec ++++++
--- /var/tmp/diff_new_pack.OWHlPN/_old 2019-04-20 17:13:40.754970089 +0200
+++ /var/tmp/diff_new_pack.OWHlPN/_new 2019-04-20 17:13:40.758970094 +0200
@@ -19,7 +19,7 @@

%define majorver 3.4
Name: gnuhealth-client
-Version: %{majorver}.3
+Version: %{majorver}.4
Release: 0
Summary: The client of the GNU Health Hospital system
License: GPL-3.0-only
@@ -43,7 +43,6 @@
#Requires: librsvg
#for the plugins:
Requires: opencv
-Requires: python2-GooCalendar < 0.5
Requires: python-cdecimal
Requires: python-chardet
Requires: python-dateutil
@@ -54,6 +53,7 @@
Requires: python-setuptools
Requires: python-simplejson
Requires: python-xml
+Requires: python2-GooCalendar < 0.5
#install Tryton or GNU Health Client
Conflicts: tryton
BuildArch: noarch

++++++ gnuhealth-client-3.4.3.tar.gz -> gnuhealth-client-3.4.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/Changelog
new/gnuhealth-client-3.4.4/Changelog
--- old/gnuhealth-client-3.4.3/Changelog 2019-01-24 20:25:23.000000000
+0100
+++ new/gnuhealth-client-3.4.4/Changelog 2019-04-19 17:19:57.000000000
+0200
@@ -1,3 +1,58 @@
+changeset: 3308:1d22c3ad3303
+branch: stable
+tag: tip
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 14:52:33 2019 +0100
+summary: gnuhealth client : use black as the text color in the GNU Health
command line
+
+changeset: 3307:ff8521d939f1
+branch: stable
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 13:10:48 2019 +0100
+summary: gnuhealth client: Apply Tryton changeset 4516: Do not override
exception variable in 'except as'
+
+changeset: 3306:15d4997faa4f
+branch: stable
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 13:06:56 2019 +0100
+summary: gnuhealth client: Apply Tryton changeset 4514: Allow to click
button on readonly record in tree view
+
+changeset: 3305:a4ccfe557104
+branch: stable
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 13:05:59 2019 +0100
+summary: gnuhealth client: Apply Tryton changeset 4510: Use string from
node attribute
+
+changeset: 3304:d6b6ae8ebb80
+branch: stable
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 13:04:49 2019 +0100
+summary: gnuhealth client: Apply Tryton changeset 4509: Use idle_add to
set active on combobox from match selected of dropdown
+
+changeset: 3303:6c5836c9cf2f
+branch: stable
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 13:03:33 2019 +0100
+summary: gnuhealth client: Apply Tryton changeset 4508: Do not use
set_text of Many2One and Reference when setting only string
+
+changeset: 3302:fc69cc78f43f
+branch: stable
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 13:02:11 2019 +0100
+summary: gnuhealth client: Apply Tryton changeset 4507: Clean active_*
keys from context when executing an action
+
+changeset: 3301:d3c1b46768ca
+branch: stable
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 13:01:07 2019 +0100
+summary: gnuhealth client: Apply Tryton changeset 4506: Delay execution of
CellRendererBinary callbacks
+
+changeset: 3300:a70ccc5f6bdd
+branch: stable
+user: Luis Falcon <falcon@xxxxxxx>
+date: Fri Apr 19 12:59:58 2019 +0100
+summary: gnuhealth client: Apply Tryton changeset 4502: Ensure sort key
always return an integer
+
changeset: 3179:c30614e0d942
branch: stable
user: Luis Falcon <falcon@xxxxxxx>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/PKG-INFO
new/gnuhealth-client-3.4.4/PKG-INFO
--- old/gnuhealth-client-3.4.3/PKG-INFO 2019-01-24 20:39:48.000000000 +0100
+++ new/gnuhealth-client-3.4.4/PKG-INFO 2019-04-19 17:33:43.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: gnuhealth-client
-Version: 3.4.3
+Version: 3.4.4
Summary: The GNU Health GTK client
Home-page: http://health.gnu.org
Author: GNU Solidario
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/gnuhealth_client.egg-info/PKG-INFO
new/gnuhealth-client-3.4.4/gnuhealth_client.egg-info/PKG-INFO
--- old/gnuhealth-client-3.4.3/gnuhealth_client.egg-info/PKG-INFO
2019-01-24 20:39:48.000000000 +0100
+++ new/gnuhealth-client-3.4.4/gnuhealth_client.egg-info/PKG-INFO
2019-04-19 17:33:43.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: gnuhealth-client
-Version: 3.4.3
+Version: 3.4.4
Summary: The GNU Health GTK client
Home-page: http://health.gnu.org
Author: GNU Solidario
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/tryton/__init__.py
new/gnuhealth-client-3.4.4/tryton/__init__.py
--- old/gnuhealth-client-3.4.3/tryton/__init__.py 2019-01-24
20:25:41.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/__init__.py 2019-04-19
17:17:40.000000000 +0200
@@ -1,4 +1,4 @@
# This file is part of the GNU Health GTK Client. The COPYRIGHT file at the
top level of
# this repository contains the full copyright notices and license terms.
-__version__ = "3.4.3"
+__version__ = "3.4.4"
SERVER_VERSION = "4.6.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/tryton/action/main.py
new/gnuhealth-client-3.4.4/tryton/action/main.py
--- old/gnuhealth-client-3.4.3/tryton/action/main.py 2018-11-27
00:07:32.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/action/main.py 2019-04-19
17:13:31.000000000 +0200
@@ -77,6 +77,8 @@
def _exec_action(action, data=None, context=None):
if context is None:
context = {}
+ else:
+ context = context.copy()
if data is None:
data = {}
else:
@@ -84,6 +86,10 @@
if 'type' not in (action or {}):
return

+ context.pop('active_id', None)
+ context.pop('active_ids', None)
+ context.pop('active_model', None)
+
def add_name_suffix(name):
if not data.get('ids') or not data.get('model'):
return name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/tryton/common/__init__.py
new/gnuhealth-client-3.4.4/tryton/common/__init__.py
--- old/gnuhealth-client-3.4.3/tryton/common/__init__.py 2018-11-27
00:07:32.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/common/__init__.py 2019-04-19
17:09:39.000000000 +0200
@@ -2,7 +2,8 @@
# this repository contains the full copyright notices and license terms.
from common import *
from datetime_strftime import *
-from domain_inversion import domain_inversion, eval_domain, localize_domain, \
- merge, inverse_leaf, filter_leaf, concat, simplify, unique_value
+from .domain_inversion import domain_inversion, eval_domain, localize_domain, \
+ merge, inverse_leaf, filter_leaf, prepare_reference_domain, \
+ extract_reference_models, concat, simplify, unique_value
from environment import EvalEnvironment
import timedelta
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/common/domain_inversion.py
new/gnuhealth-client-3.4.4/tryton/common/domain_inversion.py
--- old/gnuhealth-client-3.4.3/tryton/common/domain_inversion.py
2018-12-28 14:48:31.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/common/domain_inversion.py
2019-04-19 17:09:39.000000000 +0200
@@ -127,6 +127,36 @@
return [filter_leaf(d, field, model) for d in domain]


+def prepare_reference_domain(domain, reference):
+ "convert domain to replace reference fields by their local part"
+ if domain in ('AND', 'OR'):
+ return domain
+ elif is_leaf(domain):
+ # When a Reference field is using the dotted notation the model
+ # specified must be removed from the clause
+ if domain[0].count('.') and len(domain) > 3:
+ local_name, target_name = domain[0].split('.', 1)
+ if local_name == reference:
+ return [target_name] + list(domain[1:3] + domain[4:])
+ return domain
+ else:
+ return [prepare_reference_domain(d, reference) for d in domain]
+
+
+def extract_reference_models(domain, field_name):
+ "returns the set of the models available for field_name"
+ if domain in ('AND', 'OR'):
+ return set()
+ elif is_leaf(domain):
+ local_part = domain[0].split('.', 1)[0]
+ if local_part == field_name and len(domain) > 3:
+ return {domain[3]}
+ return set()
+ else:
+ return reduce(operator.or_,
+ (extract_reference_models(d, field_name) for d in domain))
+
+
def eval_domain(domain, context, boolop=operator.and_):
"compute domain boolean value according to the context"
if is_leaf(domain):
@@ -150,6 +180,9 @@
return domain
elif is_leaf(domain):
if 'child_of' in domain[1]:
+ if domain[0].count('.'):
+ _, target_part = domain[0].split('.', 1)
+ return [target_part] + list(domain[1:])
if len(domain) == 3:
return domain
else:
@@ -628,6 +661,13 @@
domain = [['x', 'child_of', [1], 'y']]
assert localize_domain(domain, 'x') == [['y', 'child_of', [1]]]

+ domain = [['x.y', 'child_of', [1], 'parent']]
+ assert localize_domain(domain, 'x') == [['y', 'child_of', [1], 'parent']]
+
+ domain = [['x.y.z', 'child_of', [1], 'parent', 'model']]
+ assert localize_domain(domain, 'x') == \
+ [['y.z', 'child_of', [1], 'parent', 'model']]
+
domain = [['x.id', '=', 1, 'y']]
assert localize_domain(domain, 'x', False) == [['id', '=', 1, 'y']]
assert localize_domain(domain, 'x', True) == [['id', '=', 1]]
@@ -636,6 +676,35 @@
assert localize_domain(domain, 'x', False) == [['b.c', '=', 1, 'y', 'z']]
assert localize_domain(domain, 'x', True) == [['b.c', '=', 1, 'z']]

+
+def test_prepare_reference_domain():
+ domain = [['x', 'like', 'A%']]
+ assert prepare_reference_domain(domain, 'x') == [['x', 'like', 'A%']]
+
+ domain = [['x.y', 'like', 'A%', 'model']]
+ assert prepare_reference_domain(domain, 'x') == [['y', 'like', 'A%']]
+
+ domain = [['x.y', 'child_of', [1], 'model', 'parent']]
+ assert prepare_reference_domain(domain, 'x') == \
+ [['y', 'child_of', [1], 'parent']]
+
+
+def test_extract_models():
+ domain = [['x', 'like', 'A%']]
+ assert extract_reference_models(domain, 'x') == set()
+ assert extract_reference_models(domain, 'y') == set()
+
+ domain = [['x', 'like', 'A%', 'model']]
+ assert extract_reference_models(domain, 'x') == {'model'}
+ assert extract_reference_models(domain, 'y') == set()
+
+ domain = ['OR',
+ ['x.y', 'like', 'A%', 'model_A'],
+ ['x.z', 'like', 'B%', 'model_B']]
+ assert extract_reference_models(domain, 'x') == {'model_A', 'model_B'}
+ assert extract_reference_models(domain, 'y') == set()
+
+
if __name__ == '__main__':
test_simple_inversion()
test_and_inversion()
@@ -648,3 +717,5 @@
test_simplify()
test_evaldomain()
test_localize()
+ test_prepare_reference_domain()
+ test_extract_models()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/tryton/common/selection.py
new/gnuhealth-client-3.4.4/tryton/common/selection.py
--- old/gnuhealth-client-3.4.3/tryton/common/selection.py 2018-11-27
00:07:32.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/common/selection.py 2019-04-19
17:13:59.000000000 +0200
@@ -50,10 +50,6 @@
return

domain = field.domain_get(record)
- if field.attrs['type'] == 'reference':
- # The domain on reference field is not only based on the selection
- # so the selection can not be filtered.
- domain = []
if 'relation' not in self.attrs:
change_with = self.attrs.get('selection_change_with') or []
value = record._get_on_change_args(change_with)
@@ -90,10 +86,23 @@
def filter_selection(self, domain, record, field):
if not domain:
return
- test = lambda value: eval_domain(domain, {
- self.field_name: value[0],
- })
- self.selection = filter(test, self.selection)
+
+ def _value_evaluator(value):
+ return eval_domain(domain, {
+ self.field_name: value[0],
+ })
+
+ def _model_evaluator(allowed_models):
+ def test(value):
+ return value[0] in allowed_models
+ return test
+
+ if field.attrs['type'] == 'reference':
+ allowed_models = field.get_models(record)
+ evaluator = _model_evaluator(allowed_models)
+ else:
+ evaluator = _value_evaluator
+ self.selection = list(filter(evaluator, self.selection))

def get_inactive_selection(self, value):
if 'relation' not in self.attrs:
@@ -177,7 +186,7 @@
model = entry.get_model()
for i, values in enumerate(model):
if values[1] == value:
- entry.set_active(i)
+ gobject.idle_add(entry.set_active, i)
break

def get_popdown_value(self, entry, index=1):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/tryton/gui/main.py
new/gnuhealth-client-3.4.4/tryton/gui/main.py
--- old/gnuhealth-client-3.4.3/tryton/gui/main.py 2019-01-12
13:57:14.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/gui/main.py 2019-04-19
17:15:17.000000000 +0200
@@ -1470,7 +1470,7 @@

#CLI colors
self.cli.modify_base(gtk.STATE_NORMAL, gtk.gdk.color_parse("#03656B"))
- self.cli.modify_text(gtk.STATE_NORMAL, gtk.gdk.color_parse("#FFFFFF"))
+ self.cli.modify_text(gtk.STATE_NORMAL, gtk.gdk.color_parse("#000000"))

# Init the GNU Health Status Bar
self.statusbar = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/tryton/gui/window/dblogin.py
new/gnuhealth-client-3.4.4/tryton/gui/window/dblogin.py
--- old/gnuhealth-client-3.4.3/tryton/gui/window/dblogin.py 2018-11-27
00:07:32.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/gui/window/dblogin.py 2019-04-19
17:11:31.000000000 +0200
@@ -182,6 +182,7 @@
column = self.profile_tree.get_column(0)
self.profile_tree.set_cursor(len(model) - 1, column,
start_editing=True)
+ self.db_cache = None

def profile_delete(self, button):
self.clear_entries()
@@ -224,14 +225,18 @@
def edit_profilename(self, editable, event, renderer, path):
newtext = editable.get_text()
model = self.profile_tree.get_model()
- oldname = model[path][0]
+ try:
+ oldname = model[path][0]
+ except IndexError:
+ return
if oldname == newtext == '':
del model[path]
return
elif oldname == newtext or newtext == '':
return
- if newtext in self.profiles.sections():
- del model[path]
+ elif newtext in self.profiles.sections():
+ if not oldname:
+ del model[path]
return
elif oldname in self.profiles.sections():
self.profiles.add_section(newtext)
@@ -534,15 +539,18 @@
host = common.get_hostname(netloc)
port = common.get_port(netloc)
database = self.entry_database.get_text().strip()
+ login = self.entry_login.get_text()
for idx, profile_info in enumerate(self.profile_store):
if not profile_info[1]:
continue
profile = profile_info[0]
profile_host = self.profiles.get(profile, 'host')
profile_db = self.profiles.get(profile, 'database')
+ profile_login = self.profiles.get(profile, 'username')
if (host == common.get_hostname(profile_host)
and port == common.get_port(profile_host)
- and database == profile_db):
+ and database == profile_db
+ and (not login or login == profile_login)):
break
else:
idx = -1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/tryton/gui/window/nomodal.py
new/gnuhealth-client-3.4.4/tryton/gui/window/nomodal.py
--- old/gnuhealth-client-3.4.3/tryton/gui/window/nomodal.py 2018-11-27
00:07:32.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/gui/window/nomodal.py 2019-04-19
17:12:19.000000000 +0200
@@ -1,7 +1,5 @@
# This file is part of the GNU Health GTK Client. The COPYRIGHT file at the
top level of
# this repository contains the full copyright notices and license terms.
-import gtk
-
import tryton.common as common


@@ -28,9 +26,6 @@

def destroy(self):
self.page.dialogs.remove(self)
- # Test if the parent is not already destroyed
- if self.parent not in gtk.window_list_toplevels():
- return
self.parent.present()
self.sensible_widget.props.sensitive = True
for focus in self.parent_focus:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/model/field.py
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/model/field.py
--- old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/model/field.py
2018-11-27 00:07:32.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/model/field.py
2019-04-19 17:09:39.000000000 +0200
@@ -6,7 +6,8 @@
import locale
from tryton.common import \
domain_inversion, eval_domain, localize_domain, \
- merge, inverse_leaf, filter_leaf, concat, simplify, unique_value, \
+ merge, inverse_leaf, filter_leaf, prepare_reference_domain, \
+ extract_reference_models, concat, simplify, unique_value, \
EvalEnvironment
import tryton.common as common
import datetime
@@ -869,10 +870,16 @@
else:
model = None
screen_domain, attr_domain = self.domains_get(record)
+ screen_domain = prepare_reference_domain(screen_domain, self.name)
return concat(localize_domain(
filter_leaf(screen_domain, self.name, model),
strip_target=True), attr_domain)

+ def get_models(self, record):
+ screen_domain, attr_domain = self.domains_get(record)
+ return extract_reference_models(
+ concat(screen_domain, attr_domain), self.name)
+

class _FileCache(object):
def __init__(self, path):
@@ -950,8 +957,7 @@

def domain_get(self, record):
screen_domain, attr_domain = self.domains_get(record)
- return concat(localize_domain(inverse_leaf(screen_domain)),
- attr_domain)
+ return concat(localize_domain(screen_domain), attr_domain)

def date_format(self, record):
context = self.get_context(record)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/model/record.py
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/model/record.py
--- old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/model/record.py
2018-12-28 14:48:31.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/model/record.py
2019-04-19 17:14:51.000000000 +0200
@@ -112,20 +112,20 @@
ctx.update(dict(('%s.%s' % (self.model_name, fname), 'size')
for fname, field in self.group.fields.iteritems()
if field.attrs['type'] == 'binary' and fname in fnames))
- exception = None
+ exception = False
try:
values = RPCExecute('model', self.model_name, 'read',
id2record.keys(), fnames, context=ctx)
- except RPCException, exception:
+ except RPCException:
values = [{'id': x} for x in id2record]
default_values = dict((f, None) for f in fnames)
for value in values:
value.update(default_values)
- self.exception = True
+ self.exception = exception = True
id2value = dict((value['id'], value) for value in values)
for id, record in id2record.iteritems():
if not record.exception:
- record.exception = bool(exception)
+ record.exception = exception
value = id2value.get(id)
if record and not record.destroyed and value:
for key in record.modified_fields:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form.py
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form.py
--- old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form.py
2018-11-27 00:07:33.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form.py
2019-04-19 17:12:04.000000000 +0200
@@ -202,11 +202,7 @@
if 'states' not in attributes and 'states' in field.attrs:
attributes['states'] = field.attrs['states']
if 'string' not in attributes:
- if gtk.widget_get_default_direction() == \
- gtk.TEXT_DIR_RTL:
- attributes['string'] = _(':') + field.attrs['string']
- else:
- attributes['string'] = field.attrs['string'] + _(':')
+ attributes['string'] = field.attrs['string'] + _(':')
if CONFIG['client.modepda']:
attributes['xalign'] = 0.0

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/char.py
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/char.py
---
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/char.py
2019-01-24 20:24:50.000000000 +0100
+++
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/char.py
2019-04-19 17:10:10.000000000 +0200
@@ -58,7 +58,7 @@

@staticmethod
def translate_widget_set(widget, value):
- widget.set_text(value or '')
+ widget.set_text(value)
reset_position(widget)

@staticmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/checkbox.py

new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/checkbox.py
---
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/checkbox.py
2018-11-27 00:07:33.000000000 +0100
+++
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/checkbox.py
2019-04-19 17:11:49.000000000 +0200
@@ -28,4 +28,8 @@
if not field:
self.widget.set_active(False)
return False
- self.widget.set_active(bool(field.get(record)))
+ self.widget.handler_block_by_func(self.sig_activate)
+ try:
+ self.widget.set_active(bool(field.get(record)))
+ finally:
+ self.widget.handler_unblock_by_func(self.sig_activate)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/dictionary.py

new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/dictionary.py
---
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/dictionary.py
2019-01-24 20:24:50.000000000 +0100
+++
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/dictionary.py
2019-04-19 17:12:04.000000000 +0200
@@ -40,6 +40,8 @@
widget.connect('key-press-event', self.parent_widget.send_modified)
widget.connect('focus-out-event',
lambda w, e: self.parent_widget._focus_out())
+ widget.props.activates_default = True
+ widget.connect('activate', self.parent_widget.sig_activate)
return widget

def modified(self, value):
@@ -61,7 +63,7 @@

def create_widget(self):
widget = gtk.CheckButton()
- widget.connect('toggled', self.parent_widget.send_modified)
+ widget.connect('toggled', self.parent_widget.sig_activate)
widget.connect('focus-out-event', lambda w, e:
self.parent_widget._focus_out())
return widget
@@ -70,7 +72,12 @@
return self.widget.props.active

def set_value(self, value):
- self.widget.props.active = bool(value)
+ self.widget.handler_block_by_func(self.parent_widget.sig_activate)
+ try:
+ self.widget.props.active = bool(value)
+ finally:
+ self.widget.handler_unblock_by_func(
+ self.parent_widget.sig_activate)

def set_readonly(self, readonly):
self.widget.set_sensitive(not readonly)
@@ -475,10 +482,7 @@
alignment.add(hbox)
n_rows = self.table.props.n_rows
self.table.resize(n_rows + 1, 3)
- if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
- text = _(':') + self.keys[key]['string']
- else:
- text = self.keys[key]['string'] + _(':')
+ text = self.keys[key]['string'] + _(':')
label = gtk.Label(text)
label.set_alignment(1., .5)
self.table.attach(label, 0, 1, n_rows - 1, n_rows,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/many2one.py

new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/many2one.py
---
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/many2one.py
2018-11-27 00:07:33.000000000 +0100
+++
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/many2one.py
2019-04-19 17:13:45.000000000 +0200
@@ -129,7 +129,7 @@
self.field.set_client(self.record,
self.value_from_id(*result[0]), force_change=True)
else:
- self.set_text('')
+ self.wid_text.set_text('')
self.focus_out = True
self.changed = True

@@ -251,7 +251,7 @@
and editable
and event.keyval in (gtk.keysyms.Delete,
gtk.keysyms.BackSpace)):
- self.set_text('')
+ self.wid_text.set_text('')
return False

def sig_changed(self, *args):
@@ -270,7 +270,7 @@
# in such case, the original text should not be restored
if not self.wid_text.get_text():
# Restore text and position after display
- self.set_text(text)
+ self.wid_text.set_text(text)
self.wid_text.set_position(position)
gobject.idle_add(clean)
return False
@@ -281,7 +281,7 @@
def set_value(self, record, field):
if field.get_client(record) != self.wid_text.get_text():
field.set_client(record, self.value_from_id(None, ''))
- self.set_text('')
+ self.wid_text.set_text('')

def set_text(self, value):
if not value:
@@ -297,7 +297,7 @@
self._set_completion()

if not field:
- self.set_text('')
+ self.set_text(None)
self.changed = True
return False
self.set_text(field.get_client(record))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/one2many.py

new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/one2many.py
---
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/one2many.py
2019-01-24 20:24:50.000000000 +0100
+++
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/one2many.py
2019-04-19 17:10:35.000000000 +0200
@@ -395,18 +395,14 @@
win_search.screen.search_filter()
win_search.show()

- def make_product(first=first):
+ def make_product():
+ self.screen.group.remove(first, remove=True)
if not product:
- self.screen.group.remove(first, remove=True)
return

fields = product.keys()
for values in itertools.product(*product.values()):
- if first:
- record = first
- first = None
- else:
- record = self.screen.new(default=False)
+ record = self.screen.new(default=False)
default_value = default.copy()
for field, value in zip(fields, values):
id_, rec_name = value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/reference.py

new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/reference.py
---
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/reference.py
2019-01-24 20:24:50.000000000 +0100
+++
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/reference.py
2019-04-19 17:13:45.000000000 +0200
@@ -121,7 +121,7 @@
if (model != self.get_model()
or name != self.wid_text.get_text()):
field.set_client(record, None)
- self.set_text('')
+ self.set_text(None)

def set_text(self, value):
if value:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/widget.py
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/widget.py
---
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/form_gtk/widget.py
2018-12-28 14:48:31.000000000 +0100
+++
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/form_gtk/widget.py
2019-04-19 17:12:04.000000000 +0200
@@ -146,10 +146,7 @@
table.set_row_spacings(2)
table.set_border_width(1)
for i, language in enumerate(languages):
- if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
- label = _(':') + language['name']
- else:
- label = language['name'] + _(':')
+ label = language['name'] + _(':')
label = gtk.Label(label)
label.set_alignment(1.0, 0.0 if self.widget.expand else 0.5)
table.attach(label, 0, 1, i, i + 1, xoptions=gtk.FILL)
@@ -173,6 +170,8 @@
context=context)[0][self.widget.field_name]
except RPCException:
return
+ if fuzzy_value is None:
+ fuzzy_value = ''
widget = self.widget.translate_widget()
label.set_mnemonic_widget(widget)
self.widget.translate_widget_set(widget, fuzzy_value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/list.py
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/list.py
--- old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/list.py
2018-12-28 14:48:31.000000000 +0100
+++ new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/list.py
2019-04-19 17:14:12.000000000 +0200
@@ -144,7 +144,8 @@
def sort(self, ids):
old_idx = {record.id: i for i, record in enumerate(self.group)}
new_idx = {id_: i for i, id_ in enumerate(ids)}
- self.group.sort(key=lambda r: new_idx.get(r.id))
+ size = len(self.group)
+ self.group.sort(key=lambda r: new_idx.get(r.id, size))
new_order = []
prev = None
for record in self.group:
@@ -341,7 +342,7 @@
widget = Widget(self, node_attrs)
self.widgets[name].append(widget)

- column = gtk.TreeViewColumn(field.attrs['string'])
+ column = gtk.TreeViewColumn(node_attrs['string'])
column._type = 'field'
column.name = name

@@ -517,10 +518,7 @@
def add_sum(self, attributes):
if 'sum' not in attributes:
return
- if gtk.widget_get_default_direction() == gtk.TEXT_DIR_RTL:
- text = _(':') + attributes['sum']
- else:
- text = attributes['sum'] + _(':')
+ text = attributes['sum'] + _(':')
label, sum_ = gtk.Label(text), gtk.Label()

hbox = gtk.HBox()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/list_gtk/widget.py
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/list_gtk/widget.py
---
old/gnuhealth-client-3.4.3/tryton/gui/window/view_form/view/list_gtk/widget.py
2018-12-28 14:48:31.000000000 +0100
+++
new/gnuhealth-client-3.4.4/tryton/gui/window/view_form/view/list_gtk/widget.py
2019-04-19 17:14:31.000000000 +0200
@@ -9,6 +9,8 @@

from functools import wraps, partial

+import gobject
+
from tryton.gui.window.win_search import WinSearch
from tryton.gui.window.win_form import WinForm
from tryton.gui.window.view_form.screen import Screen
@@ -424,9 +426,15 @@
if renderer is None:
renderer = partial(CellRendererBinary, bool(self.filename))
super(Binary, self).__init__(view, attrs, renderer=renderer)
- self.renderer.connect('select', self.select_binary)
- self.renderer.connect('open', self.open_binary)
- self.renderer.connect('save', self.save_binary)
+ self.renderer.connect(
+ 'select',
+ lambda *args: gobject.idle_add(self.select_binary, *args))
+ self.renderer.connect(
+ 'open',
+ lambda *args: gobject.idle_add(self.open_binary, *args))
+ self.renderer.connect(
+ 'save',
+ lambda *args: gobject.idle_add(self.save_binary, *args))
self.renderer.connect('clear', self.clear_binary)

def get_textual_value(self, record):
@@ -902,8 +910,6 @@
def setter(self, column, cell, store, iter):
record = store.get_value(iter, 0)
states = record.expr_eval(self.attrs.get('states', {}))
- if record.group.readonly or record.readonly:
- states['readonly'] = True
invisible = states.get('invisible', False)
cell.set_property('visible', not invisible)
readonly = states.get('readonly', False)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gnuhealth-client-3.4.3/version
new/gnuhealth-client-3.4.4/version
--- old/gnuhealth-client-3.4.3/version 2019-01-24 20:25:41.000000000 +0100
+++ new/gnuhealth-client-3.4.4/version 2019-04-19 17:17:10.000000000 +0200
@@ -1 +1 @@
-3.4.3
+3.4.4


< Previous Next >
This Thread