On Sun, 12 Jun 2005, J. Graham wrote:
Without looking at the code, you don't actually need the dict because, by
default, QSettings will only call .sync() when the object is destroyed but
the internal state will be kept up to date. So if you remove sync() from
writeSetting and ensure it is called on shutdown (python makes no promises
that __del__ will ever be called...), it should have the same effect.
OTOH I rather prefer the idea of writing as the app runs. Can we not
implement some form of manual locking?
Okay. It's probably more efficient not to have all the evals each time a
default is read, however.
I've had to put in another fix, as some of the settings have slashes at
the start of setting name. This stuffs up when it goes into Qt, and means
these settings don't work (you don't get the slash back). My kludge is to
replace / characters by an unlikely sequence of characters... not nice,
but it works. One solution is to change the formatting of the name, but
old settings will be lost.
It may also be an issue if the key length goes over 255. This probably
won't matter unless people use very long names for their widgets.
I ought to test the new stuff with Windows.
Jamie: how easy is it to install on windows at the moment??
Does the following patch improve the size of the plot on windows?
--- setting/setting.py.~1.16.~ 2005-06-12 18:12:45.000000000 +0100
+++ setting/setting.py 2005-06-12 21:01:38.738297720 +0100
@@ -362,7 +362,7 @@
This is stored in the variable veusz_pixperpt."""
dm = qt.QPaintDeviceMetrics(painter.device())
- painter.veusz_pixperpt = dm.logicalDpiY() / 72.
+ painter.veusz_pixperpt = 75.
def _distPhys(match, painter, mult):
"""Convert a physical unit measure in multiples of points."""
Jeremy
--
Jeremy Sanders <[EMAIL PROTECTED]>
http://www.jeremysanders.net/ Cambridge, UK
Public Key Server PGP Key ID: E1AAE053