diff --git a/libtool b/libtool index 9f3223e..f136f3b 100755 --- a/libtool +++ b/libtool @@ -2,7 +2,7 @@ # libtool - Provide generalized library-building support services. # Generated automatically by config.status (xmlcopyeditor) 1.2.0.4 -# Libtool was configured on host geralds-laptop: +# Libtool was configured on host antux: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, @@ -231,7 +231,7 @@ finish_eval="" hardcode_into_libs=yes # Compile-time system search path for libraries. -sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.3.2 /usr/lib /lib" +sys_lib_search_path_spec="/usr/lib/gcc/i486-linux-gnu/4.3.3 /usr/lib /lib" # Run-time system search path for libraries. sys_lib_dlsearch_path_spec="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/lib/alsa-lib /usr/local/lib " @@ -8511,17 +8511,17 @@ file_list_spec="" hardcode_action=immediate # The directories searched by this compiler when creating a shared library. -compiler_lib_search_dirs="/usr/lib/gcc/i486-linux-gnu/4.3.2 /usr/lib/gcc/i486-linux-gnu/4.3.2 /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib /lib/../lib /usr/lib/../lib /usr/lib/gcc/i486-linux-gnu/4.3.2/../../.." +compiler_lib_search_dirs="/usr/lib/gcc/i486-linux-gnu/4.3.3 /usr/lib/gcc/i486-linux-gnu/4.3.3 /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib /lib/../lib /usr/lib/../lib /usr/lib/gcc/i486-linux-gnu/4.3.3/../../.." # Dependencies to place before and after the objects being linked to # create a shared library. -predep_objects="/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.3.2/crtbeginS.o" -postdep_objects="/usr/lib/gcc/i486-linux-gnu/4.3.2/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/crtn.o" +predep_objects="/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.3.3/crtbeginS.o" +postdep_objects="/usr/lib/gcc/i486-linux-gnu/4.3.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/crtn.o" predeps="" postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path="-L/usr/lib/gcc/i486-linux-gnu/4.3.2 -L/usr/lib/gcc/i486-linux-gnu/4.3.2 -L/usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.3.2/../../.." +compiler_lib_search_path="-L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3 -L/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.3.3/../../.." # ### END LIBTOOL TAG CONFIG: CXX diff --git a/src/myhtmlpane.cpp b/src/myhtmlpane.cpp index 53971f0..93b313c 100755 --- a/src/myhtmlpane.cpp +++ b/src/myhtmlpane.cpp @@ -20,6 +20,11 @@ #include "myhtmlpane.h" #include "xmlcopyeditor.h" +#include +#include +#include + + BEGIN_EVENT_TABLE ( MyHtmlPane, wxHtmlWindow ) EVT_LEFT_DCLICK ( MyHtmlPane::OnLeftDoubleClick ) END_EVENT_TABLE() @@ -52,4 +57,32 @@ void MyHtmlPane::OnCellClicked( */ void MyHtmlPane::OnLeftDoubleClick ( wxMouseEvent& WXUNUSED ( event ) ) -{ } +{ + +} + +bool MyHtmlPane::OnCellClicked(wxHtmlCell *cell, wxCoord x, wxCoord y, const wxMouseEvent& event) +{ + //since the error description was hardcoded, make use of this error string + //parse the get the line number, then jump to that line + if(error_message.find("Validation stopped at line") != -1 || + error_message.find("Error at line")!= -1){ + string substring = error_message.substr(error_message.find("at line ")+8); + string number = substring.substr(0,substring.find(", ")); + istringstream iss(substring); + int line ; + iss >> line; + if (--line >= 0 && (doc)) + { + doc->GotoLine ( ( int ) line ); + doc->SetFocus(); + } + return true; + } + return false; +} + +void MyHtmlPane::SetCurrentDocument(XmlDoc *xdoc) +{ + doc = xdoc; +} diff --git a/src/myhtmlpane.h b/src/myhtmlpane.h index 50a6537..d206387 100755 --- a/src/myhtmlpane.h +++ b/src/myhtmlpane.h @@ -19,18 +19,23 @@ #ifndef MY_HTML_PANE_H #define MY_HTML_PANE_H - +#include "xmldoc.h" #include #include class MyHtmlPane : public wxHtmlWindow { public: + std::string error_message; + MyHtmlPane ( wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint& position = wxDefaultPosition, const wxSize& size = wxDefaultSize ); + + void SetCurrentDocument(XmlDoc *xdoc); + private: /* void OnCellClicked( @@ -39,7 +44,9 @@ class MyHtmlPane : public wxHtmlWindow wxCoord y, const wxMouseEvent& event); */ + XmlDoc *doc; void OnLeftDoubleClick ( wxMouseEvent& event ); + bool OnCellClicked(wxHtmlCell *cell, wxCoord x, wxCoord y, const wxMouseEvent& event); DECLARE_EVENT_TABLE() }; diff --git a/src/xmlcopyeditor.cpp b/src/xmlcopyeditor.cpp index 23b5600..874a823 100755 --- a/src/xmlcopyeditor.cpp +++ b/src/xmlcopyeditor.cpp @@ -5452,14 +5452,14 @@ void MyFrame::messagePane ( const wxString& s, int iconType, bool forcePane ) switch ( iconType ) { case ( CONST_INFO ) : - /* - if ( !forcePane && s.Length() < 50 ) // magic no. necessary? - { - statusProgress ( s ); - return; - } - */ - paneTitle = _ ( "Information" ); + /* + if ( !forcePane && s.Length() < 50 ) // magic no. necessary? + { + statusProgress ( s ); + return; + } + */ + paneTitle = _ ( "Information" ); break; case ( CONST_WARNING ) : paneTitle = _ ( "Warning" ); @@ -5477,7 +5477,7 @@ void MyFrame::messagePane ( const wxString& s, int iconType, bool forcePane ) wxAuiPaneInfo info = manager.GetPane ( htmlReport ); if ( !info.IsShown() ) -{ + { manager.GetPane ( htmlReport ).Show ( true ); manager.Update(); } @@ -5494,19 +5494,19 @@ void MyFrame::messagePane ( const wxString& s, int iconType, bool forcePane ) switch ( iconType ) { case ( CONST_INFO ) : - htmlBuffer += pngDir; + htmlBuffer += pngDir; htmlBuffer += _T ( "stock_dialog-info-32.png" ); break; case ( CONST_WARNING ) : - htmlBuffer += pngDir; + htmlBuffer += pngDir; htmlBuffer += _T ( "stock_dialog-warning-32.png" ); break; case ( CONST_STOP ) : - htmlBuffer += pngDir; + htmlBuffer += pngDir; htmlBuffer += _T ( "stock_dialog-stop-32.png" ); break; case ( CONST_QUESTION ) : - htmlBuffer += pngDir; + htmlBuffer += pngDir; htmlBuffer += _T ( "stock_dialog-question-32.png" ); break; default: @@ -5517,7 +5517,8 @@ void MyFrame::messagePane ( const wxString& s, int iconType, bool forcePane ) htmlBuffer += _T ( "" ); htmlReport->SetPage ( htmlBuffer ); - + htmlReport->error_message = htmlString.mb_str(wxConvUTF8); + htmlReport->SetCurrentDocument(getActiveDocument()); manager.Update(); }