Opened 13 years ago
Closed 8 years ago
#1378 closed defect (fixed)
Error when clicking 'Set Font' dialog in wxGUI settings
Reported by: | epatton | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.1 |
Component: | wxGUI | Version: | svn-develbranch6 |
Keywords: | font, set font, settings | Cc: | martinl |
CPU: | x86-32 | Platform: | Linux |
Description
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'
~ Eric.
Change History (7)
comment:1 by , 13 years ago
Cc: | added |
---|---|
Keywords: | wxgui removed |
Milestone: | 6.5.0 → 6.4.2 |
comment:2 by , 13 years ago
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)?
~ Eric.
comment:3 by , 13 years ago
I can confirm this. To answer your questions Martin:
1) The custom dialog is needed because wx.FontDialog is broken on the Mac--or at least it was up through wxPython 2.8.11.
2) It is indeed needed because the default is very tiny on the Mac--almost unreadable.
Michael
comment:4 by , 13 years ago
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?
Michael
comment:5 by , 12 years ago
comment:6 by , 9 years ago
Milestone: | 6.4.2 → 6.4.6 |
---|
comment:7 by , 8 years ago
Milestone: | 6.4.6 → 7.2.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
There was several changes recently and libraries changed as well since the original report. I consider this as mostly working and I'm closing this as fixed. Please, open new specific tickets for the new problems if you encounter some.
I am unable to reproduce this error. Anyway this functionality is broken. Before going on, I wonder
preferences.DefaultFontDialog
instead ofwx.FontDialog
(custom dialog make sense for map display, but not for command output)Martin