Opened 15 years ago

Closed 15 years ago

#860 closed defect (fixed)

wxGUI: About Copyright missing its middle

Reported by: hamish Owned by: grass-dev@…
Priority: critical Milestone: 6.4.0
Component: wxGUI Version: svn-releasebranch64
Keywords: license Cc: martinl
CPU: x86-64 Platform: Linux

Description

Hi,

when I do help -> about in the 6.4/6.5 wx GUI menu and look in the Copyright tab I get the text from g.region -c, but only the very top and bottom lines. The middle is missing. It skips from the end of the second paragraph all the way to "BOSTON, MA ..." & past all the "don't sue us" stuff.

fwiw, gis.m and g.version -c are fine.

also I notice the "&" gets treated as a keyboard shortcut designator in some of the other tab text.

? Hamish

Change History (9)

in reply to:  description comment:1 by glynn, 15 years ago

Replying to hamish:

when I do help -> about in the 6.4/6.5 wx GUI menu and look in the Copyright tab I get the text from g.region -c, but only the very top and bottom lines. The middle is missing. It skips from the end of the second paragraph all the way to "BOSTON, MA ..." & past all the "don't sue us" stuff.

This appears to have been intentional; AboutWindow.PageCopyright at help.py:458:

            copytext = wordwrap(''.join(copyright[:11] + copyright[26:-3]),
                                575, wx.ClientDC(self))

Presumably this was to make it fit the window, but that's not necessary now that it's embedded in a ScrolledPanel.

I suggest:

--- gui/wxpython/gui_modules/help.py	(revision 40258)
+++ gui/wxpython/gui_modules/help.py	(working copy)
@@ -453,10 +453,7 @@
         copyfile = os.path.join(os.getenv("GISBASE"), "COPYING")
         if os.path.exists(copyfile):
             copyrightFile = open(copyfile, 'r')
-            copyrightOut = []
-            copyright = copyrightFile.readlines()
-            copytext = wordwrap(''.join(copyright[:11] + copyright[26:-3]),
-                                575, wx.ClientDC(self))
+            copytext = copyrightFile.read()
             copyrightFile.close()
         else:
             copytext = _('%s file missing') % 'COPYING'

comment:2 by hamish, 15 years ago

ok, thanks. tested & committed in 6.5, to be ported around as soon as I get the chance.

I notice that the Copyright, Contributers, and Translators tabs seem to start their display on line[1] instead of line[0] of the file. (content is there, it's just the scrollbar) ?

Hamish

in reply to:  2 comment:3 by glynn, 15 years ago

Replying to hamish:

I notice that the Copyright, Contributers, and Translators tabs seem to start their display on line[1] instead of line[0] of the file. (content is there, it's just the scrollbar)

Also, if you scroll to the top, switch tabs, then switch back, it reverts the scrollbar position. This suggests a bug in ScrolledPanel, possibly in its interactions with FlatNotebook. Both of those are wxPython extensions (i.e. not part of wxWidgets), which generally seem to have more rough edges than the core wxWidgets components.

comment:4 by neteler, 15 years ago

I just recompiled: help -> about in 6.4 does no longer open a Window. Confirmed on Linux and Windows (latest installer from today).

comment:5 by hamish, 15 years ago

works ok for me on debian/stable ..

in reply to:  4 comment:6 by hamish, 15 years ago

Replying to neteler:

I just recompiled: help -> about in 6.4 does no longer open a Window. Confirmed on Linux and Windows (latest installer from today).

presumably this has now been fixed by the str(authors) l10n commit.

comment:7 by hamish, 15 years ago

testing with the latest 6.4 wingrass installer (6.4.svn r40456) all Help->About content now displays.

the weirdness of the tabs starting their scrolling on the 2nd paragraph or so remains.

Hamish

comment:8 by martinl, 15 years ago

Cc: martinl added

It's seems to be wxPython bug. Could we close this ticket?

in reply to:  8 comment:9 by hamish, 15 years ago

Resolution: fixed
Status: newclosed

Replying to martinl:

It's seems to be wxPython bug.

(Just to note that it happens on both WinGrass and Linux.)

Could we close this ticket?

If that is your expert opinion, sure.

Perhaps the scroll-bug could be reported to the tab/form/widget class authors?

Hamish

Note: See TracTickets for help on using tickets.