Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9362 - WPS Editor: Add linenumbers and highline line with error

Attached to Project: Rockbox
Opened by Dominik Wenger (Domonoky) - Wednesday, 03 September 2008, 23:13 GMT+1
Last edited by Dominik Wenger (Domonoky) - Wednesday, 10 September 2008, 21:41 GMT+1
Task Type Patches
Category Themes
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch changes the WPS code view of the WPS Editor.

I used Code from KDE Libs and simplified it for use with this.
Now the WPS Editor shows Line numbers for the WPS, and it highlights the line where it finds an error.

   wpseditor-linenumber.patch (16.5 KiB)
 utils/wpseditor/gui/gui.pro                  |   12 +
 utils/wpseditor/gui/src/numberedtextview.cpp |  173 +++++++++++++++++++++++++++
 utils/wpseditor/gui/src/numberedtextview.h   |   85 +++++++++++++
 utils/wpseditor/gui/src/qwpseditorwindow.cpp |   37 ++++-
 utils/wpseditor/gui/ui/mainwindow.ui         |  104 +++-------------
 5 files changed, 318 insertions(+), 93 deletions(-)

This task depends upon

Closed by  Dominik Wenger (Domonoky)
Wednesday, 10 September 2008, 21:41 GMT+1
Reason for closing:  Accepted
Comment by Maurus Cuelenaere (mcuelenaere) - Thursday, 04 September 2008, 14:28 GMT+1
Very nice!

I was going to implement the line numbering myself, but couldn't find a good example implementation..

One thing though, perhaps the highlighted error should be in redish, so it's more visible.
And perhaps you can get the widget to scroll to the appropriate line number?

edit:
I've attached a patch
   wpseditor_linenumber2.diff (16.6 KiB)
 gui/gui.pro                  |   12 +-
 gui/src/numberedtextview.cpp |  181 +++++++++++++++++++++++++++++++++++++++++++
 gui/src/numberedtextview.h   |   87 ++++++++++++++++++++
 gui/src/qwpseditorwindow.cpp |   38 ++++++---
 gui/ui/mainwindow.ui         |  104 +++++-------------------
 5 files changed, 329 insertions(+), 93 deletions(-)

Comment by krz (krz) - Thursday, 04 September 2008, 22:06 GMT+1
Scrolling to line added.
Clear error line after wps-text was modified.
   wpseditor_linenumber3.diff (18.6 KiB)
 wpseditor/gui/gui.pro                  |   12 +-
 wpseditor/gui/src/numberedtextview.cpp |  181 +++++++++++++++++++++++++++++++++
 wpseditor/gui/src/numberedtextview.h   |   87 +++++++++++++++
 wpseditor/gui/src/qwpseditorwindow.cpp |   47 +++++---
 wpseditor/gui/src/qwpseditorwindow.h   |    6 -
 wpseditor/gui/ui/mainwindow.ui         |  104 ++++--------------
 wpseditor/libwps/src/proxy.h           |    5 
 7 files changed, 340 insertions(+), 102 deletions(-)

Loading...