#1378: Error when clicking 'Set Font' dialog in wxGUI settings
---------------------------------------------+------------------------------
Reporter: epatton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: wxgui, font, set font, settings | Platform: Linux
Cpu: x86-32 |
---------------------------------------------+------------------------------
Using Grass 6.5.svn, r46473:
Start Grass in the nc_basic_spm, then open the GUI settings dialog, next,
go to the Appearance tab and click 'Set Font', which should give the
following error:
{{{
Traceback (most recent call last):
File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/pr
eferences.py", line 2011, in OnSetOutputFont
type = 'outputfont')
File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/pr
eferences.py", line 2151, in __init__
self.spin.SetValue(self.fontsize)
File "/usr/lib/python2.7/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2302, in
SetValue
return _controls_.SpinCtrl_SetValue(*args, **kwargs)
TypeError
:
in method 'SpinCtrl_SetValue', expected argument 2 of type
'int'
I am unable to reproduce this error. Anyway this functionality is broken.
Before going on, I wonder
* why to use custom dialog `preferences.DefaultFontDialog` instead of
`wx.FontDialog` (custom dialog make sense for map display, but not for
command output)
* do we need customization of command output font?
#1378: Error when clicking 'Set Font' dialog in wxGUI settings
--------------------------------------+-------------------------------------
Reporter: epatton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: font, set font, settings | Platform: Linux
Cpu: x86-32 |
--------------------------------------+-------------------------------------
Comment(by epatton):
Thanks for looking into this; it's strange you can't reproduce, though.
Does this the labelling of features using the text select dialog work in
the other Grass versions (6.4, 7.0)?
#1378: Error when clicking 'Set Font' dialog in wxGUI settings
--------------------------------------+-------------------------------------
Reporter: epatton | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-develbranch6
Keywords: font, set font, settings | Platform: Linux
Cpu: x86-32 |
--------------------------------------+-------------------------------------
Comment(by cmbarton):
I looked at this in 6.5 svn. As soon as I added a debug statement, the
font dialog popped up and saved OK. From then on it has been fine. I think
that perhaps this is caused by 1) a changed in the wxgrass settings file
(from "display" to "appearance" in the settings dictionary and 2) a lack
of error trap for the first time font setting is called with the new
format for .wxgrass. This can easily be fixed.
BUT...
I also found that the standard wxPython font dialog now works for the Mac
with wxPython stable 2.8.12. I left wxPython font dialog code in
preferences.py, commented out, when the standard font dialog broke. This
now works. So here is a question for you all. Do we: 1) simply add an
error trap to fix the custom font dialog that is being used right now (but
is partly broken), 2) replace the custom font dialog with the wxPython
standard one (i.e., uncomment out the code; this brings up a platform
specific font dialog), or 3) fix the custom dialog for the 6.x series
(thinking that not everyone with a Mac who compiles will have the newest
wxPython) and go back to the standard font dialog for GRASS 7.x?