Win32 Library update for 1.1.0.3
This commit is contained in:
parent
9a5e1b16ec
commit
be97fa595e
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
|
<filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="filter.xsd">
|
||||||
<title>WordML</title>
|
<title>WordML</title>
|
||||||
<element>urn:schemas-microsoft-com:office:office:DocumentProperties</element>
|
<element>urn:schemas-microsoft-com:office:office:DocumentProperties</element>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE ( MyNotebook, wxAuiNotebook )
|
BEGIN_EVENT_TABLE ( MyNotebook, wxAuiNotebook )
|
||||||
EVT_LEFT_DOWN ( MyNotebook::OnLeftDown )
|
EVT_LEFT_DOWN ( MyNotebook::OnLeftDown )
|
||||||
//EVT_MIDDLE_DOWN(MyNotebook::OnMiddleDown)
|
EVT_MIDDLE_DOWN(MyNotebook::OnMiddleDown)
|
||||||
EVT_RIGHT_DOWN ( MyNotebook::OnRightDown )
|
EVT_RIGHT_DOWN ( MyNotebook::OnRightDown )
|
||||||
EVT_MENU ( ID_MENU_CLOSE, MyNotebook::OnMenuClose )
|
EVT_MENU ( ID_MENU_CLOSE, MyNotebook::OnMenuClose )
|
||||||
EVT_MENU ( ID_MENU_CLOSE_ALL, MyNotebook::OnMenuCloseAll )
|
EVT_MENU ( ID_MENU_CLOSE_ALL, MyNotebook::OnMenuCloseAll )
|
||||||
|
|
|
@ -62,8 +62,8 @@
|
||||||
#include "findreplacepanel.h"
|
#include "findreplacepanel.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
|
||||||
#include "wrapxerces.h"
|
#include "wrapxerces.h"
|
||||||
|
#ifndef __WXMSW__
|
||||||
#include "xpm/appicon.xpm"
|
#include "xpm/appicon.xpm"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -142,6 +142,10 @@ EVT_MENU_RANGE (
|
||||||
ID_COLOR_SCHEME_DEFAULT,
|
ID_COLOR_SCHEME_DEFAULT,
|
||||||
ID_COLOR_SCHEME_NONE,
|
ID_COLOR_SCHEME_NONE,
|
||||||
MyFrame::OnColorScheme )
|
MyFrame::OnColorScheme )
|
||||||
|
EVT_MENU_RANGE (
|
||||||
|
ID_SPLIT_TAB_TOP,
|
||||||
|
ID_SPLIT_TAB_LEFT,
|
||||||
|
MyFrame::OnSplitTab )
|
||||||
EVT_UPDATE_UI_RANGE ( ID_REPLACE, ID_GLOBAL_REPLACE, MyFrame::OnUpdateReplaceRange )
|
EVT_UPDATE_UI_RANGE ( ID_REPLACE, ID_GLOBAL_REPLACE, MyFrame::OnUpdateReplaceRange )
|
||||||
EVT_FIND ( wxID_ANY, MyFrame::OnDialogFind )
|
EVT_FIND ( wxID_ANY, MyFrame::OnDialogFind )
|
||||||
EVT_FIND_NEXT ( wxID_ANY, MyFrame::OnDialogFind )
|
EVT_FIND_NEXT ( wxID_ANY, MyFrame::OnDialogFind )
|
||||||
|
@ -152,6 +156,7 @@ EVT_UPDATE_UI ( ID_LOCATION_PANE_VISIBLE, MyFrame::OnUpdateLocationPaneVisible )
|
||||||
EVT_UPDATE_UI ( wxID_CLOSE, MyFrame::OnUpdateDocRange )
|
EVT_UPDATE_UI ( wxID_CLOSE, MyFrame::OnUpdateDocRange )
|
||||||
EVT_UPDATE_UI ( wxID_SAVEAS, MyFrame::OnUpdateDocRange )
|
EVT_UPDATE_UI ( wxID_SAVEAS, MyFrame::OnUpdateDocRange )
|
||||||
EVT_UPDATE_UI ( wxID_CLOSE_ALL, MyFrame::OnUpdateCloseAll )
|
EVT_UPDATE_UI ( wxID_CLOSE_ALL, MyFrame::OnUpdateCloseAll )
|
||||||
|
// EVT_UPDATE_UI_RANGE ( ID_SPLIT_TAB_TOP, ID_SPLIT_TAB_LEFT, MyFrame::OnUpdateCloseAll )
|
||||||
EVT_UPDATE_UI ( wxID_REVERT, MyFrame::OnUpdateSaveUndo )
|
EVT_UPDATE_UI ( wxID_REVERT, MyFrame::OnUpdateSaveUndo )
|
||||||
EVT_UPDATE_UI ( wxID_SAVE, MyFrame::OnUpdateDocRange ) // always allow save if doc present
|
EVT_UPDATE_UI ( wxID_SAVE, MyFrame::OnUpdateDocRange ) // always allow save if doc present
|
||||||
EVT_UPDATE_UI ( wxID_UNDO, MyFrame::OnUpdateSaveUndo )
|
EVT_UPDATE_UI ( wxID_UNDO, MyFrame::OnUpdateSaveUndo )
|
||||||
|
@ -2223,6 +2228,57 @@ void MyFrame::OnHelp ( wxCommandEvent& event )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnSplitTab ( wxCommandEvent& event )
|
||||||
|
{
|
||||||
|
int id = event.GetId();
|
||||||
|
XmlDoc *doc = getActiveDocument();
|
||||||
|
if ( !doc )
|
||||||
|
return;
|
||||||
|
wxString fileName = doc->getFullFileName();
|
||||||
|
|
||||||
|
// mainBook->GetSelection() is currently unreliable, so fetch by title
|
||||||
|
|
||||||
|
/*
|
||||||
|
int pageCount = mainBook->GetPageCount();
|
||||||
|
XmlDoc *currentDoc;
|
||||||
|
int currentSelection = -1;
|
||||||
|
for ( int i = 0; i < pageCount; ++i )
|
||||||
|
{
|
||||||
|
currentDoc = ( XmlDoc * ) mainBook->GetPage ( i );
|
||||||
|
if ( !currentDoc )
|
||||||
|
break;
|
||||||
|
if ( currentDoc->getFullFileName() == fileName )
|
||||||
|
{
|
||||||
|
currentSelection = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( currentSelection == -1 )
|
||||||
|
return;
|
||||||
|
*/
|
||||||
|
int currentSelection, direction;
|
||||||
|
currentSelection = mainBook->GetSelection();
|
||||||
|
direction = wxAUI_NB_RIGHT;
|
||||||
|
switch ( id )
|
||||||
|
{
|
||||||
|
ID_SPLIT_TAB_TOP:
|
||||||
|
direction = wxAUI_NB_TOP;
|
||||||
|
break;
|
||||||
|
ID_SPLIT_TAB_RIGHT:
|
||||||
|
direction = wxAUI_NB_RIGHT;
|
||||||
|
break;
|
||||||
|
ID_SPLIT_TAB_BOTTOM:
|
||||||
|
direction = wxAUI_NB_BOTTOM;
|
||||||
|
break;
|
||||||
|
ID_SPLIT_TAB_LEFT:
|
||||||
|
direction = wxAUI_NB_LEFT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
direction = wxAUI_NB_RIGHT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
mainBook->Split(currentSelection, direction);
|
||||||
|
}
|
||||||
|
|
||||||
void MyFrame::OnColorScheme ( wxCommandEvent& event )
|
void MyFrame::OnColorScheme ( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
int id = event.GetId();
|
||||||
|
@ -3747,6 +3803,7 @@ void MyFrame::OnValidateSchema ( wxCommandEvent& event )
|
||||||
|
|
||||||
std::string error;
|
std::string error;
|
||||||
wxString wideError;
|
wxString wideError;
|
||||||
|
/*
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// separate WrapTempFileName for output log
|
// separate WrapTempFileName for output log
|
||||||
WrapTempFileName tempFileName ( _T ( "" ) );
|
WrapTempFileName tempFileName ( _T ( "" ) );
|
||||||
|
@ -3784,6 +3841,7 @@ void MyFrame::OnValidateSchema ( wxCommandEvent& event )
|
||||||
doc->SetFocus();
|
doc->SetFocus();
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
|
*/
|
||||||
std::auto_ptr<WrapXerces> validator ( new WrapXerces() );
|
std::auto_ptr<WrapXerces> validator ( new WrapXerces() );
|
||||||
std::string fileNameLocal = ( const char * ) fileName.mb_str ( wxConvLocal );
|
std::string fileNameLocal = ( const char * ) fileName.mb_str ( wxConvLocal );
|
||||||
if ( !validator->validate ( fileNameLocal ) )
|
if ( !validator->validate ( fileNameLocal ) )
|
||||||
|
@ -3830,8 +3888,8 @@ void MyFrame::OnValidateSchema ( wxCommandEvent& event )
|
||||||
|
|
||||||
statusProgress(wxEmptyString);
|
statusProgress(wxEmptyString);
|
||||||
documentOk(_("valid"));
|
documentOk(_("valid"));
|
||||||
*/
|
*/
|
||||||
#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnXPath ( wxCommandEvent& event )
|
void MyFrame::OnXPath ( wxCommandEvent& event )
|
||||||
|
@ -4218,11 +4276,7 @@ void MyFrame::OnWrapWords ( wxCommandEvent& event )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool wrapWords;
|
bool wrapWords;
|
||||||
#ifdef __WXMSW__
|
|
||||||
wrapWords = ( viewMenu->IsChecked ( ID_WRAP_WORDS ) ) ? false : true;
|
|
||||||
#else
|
|
||||||
wrapWords = ( properties.wrap ) ? false : true;
|
wrapWords = ( properties.wrap ) ? false : true;
|
||||||
#endif
|
|
||||||
|
|
||||||
viewMenu->Check ( ID_WRAP_WORDS, wrapWords );
|
viewMenu->Check ( ID_WRAP_WORDS, wrapWords );
|
||||||
properties.wrap = wrapWords;
|
properties.wrap = wrapWords;
|
||||||
|
@ -4447,6 +4501,7 @@ bool MyFrame::closeActiveDocument()
|
||||||
insertChildPanel->update ( NULL, wxEmptyString );
|
insertChildPanel->update ( NULL, wxEmptyString );
|
||||||
insertSiblingPanel->update ( NULL, wxEmptyString );
|
insertSiblingPanel->update ( NULL, wxEmptyString );
|
||||||
|
|
||||||
|
/*
|
||||||
// workaround -- wxAuiNotebook: send virtual close event? DeletePage doesn't generate one
|
// workaround -- wxAuiNotebook: send virtual close event? DeletePage doesn't generate one
|
||||||
wxAuiNotebookEvent e;
|
wxAuiNotebookEvent e;
|
||||||
e.SetSelection ( selection );
|
e.SetSelection ( selection );
|
||||||
|
@ -4456,10 +4511,10 @@ bool MyFrame::closeActiveDocument()
|
||||||
|
|
||||||
mainBook->DeletePage ( selection );
|
mainBook->DeletePage ( selection );
|
||||||
return true;
|
return true;
|
||||||
|
*/
|
||||||
// was:
|
// fixed betw. 2.8.0 and 2.8.6, so from v. 1.1.0.3, this is once more:
|
||||||
// mainBook->DeletePage(selection);
|
mainBook->DeletePage(selection);
|
||||||
// return (!deletePageVetoed);
|
return (!deletePageVetoed);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MyFrame::saveFile ( XmlDoc *doc, wxString& fileName, bool checkLastModified )
|
bool MyFrame::saveFile ( XmlDoc *doc, wxString& fileName, bool checkLastModified )
|
||||||
|
@ -4964,9 +5019,20 @@ wxMenuBar *MyFrame::getMenuBar()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* WAIT FOR AUI LIBRARY TO SUPPORT THIS - currently always splits left
|
||||||
|
wxMenu *splitTabMenu = new wxMenu;
|
||||||
|
splitTabMenu->Append ( ID_SPLIT_TAB_TOP, _ ( "&Top" ), _ ( "Top" ));
|
||||||
|
splitTabMenu->Append ( ID_SPLIT_TAB_RIGHT, _ ( "&Right" ), _ ( "Right" ));
|
||||||
|
splitTabMenu->Append ( ID_SPLIT_TAB_BOTTOM, _ ( "&Bottom" ), _ ( "Bottom" ));
|
||||||
|
splitTabMenu->Append ( ID_SPLIT_TAB_LEFT, _ ( "&Left" ), _ ( "Left" ));
|
||||||
|
*/
|
||||||
|
|
||||||
viewMenu = new wxMenu; // use class-wide data member
|
viewMenu = new wxMenu; // use class-wide data member
|
||||||
viewMenu->Append ( ID_PREVIOUS_DOCUMENT, _ ( "&Previous Document\tCtrl+PgUp" ), _ ( "Previous Document" ) );
|
viewMenu->Append ( ID_PREVIOUS_DOCUMENT, _ ( "&Previous Document\tCtrl+PgUp" ), _ ( "Previous Document" ) );
|
||||||
viewMenu->Append ( ID_NEXT_DOCUMENT, _ ( "&Next Document\tCtrl+PgDn" ), _ ( "Next Document" ) );
|
viewMenu->Append ( ID_NEXT_DOCUMENT, _ ( "&Next Document\tCtrl+PgDn" ), _ ( "Next Document" ) );
|
||||||
|
|
||||||
|
//viewMenu->Append ( wxID_ANY, _ ( "&Split Tab" ), splitTabMenu );
|
||||||
|
|
||||||
viewMenu->Append ( ID_BROWSER, _ ( "&Browser\tCtrl+B" ), _ ( "Browser" ) );
|
viewMenu->Append ( ID_BROWSER, _ ( "&Browser\tCtrl+B" ), _ ( "Browser" ) );
|
||||||
viewMenu->AppendSeparator();
|
viewMenu->AppendSeparator();
|
||||||
viewMenu->AppendRadioItem (
|
viewMenu->AppendRadioItem (
|
||||||
|
@ -5405,13 +5471,13 @@ void MyFrame::statusProgress ( const wxString& s )
|
||||||
status->SetStatusText ( s, 0 );
|
status->SetStatusText ( s, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::messagePane ( const wxString& s, int iconType )
|
void MyFrame::messagePane ( const wxString& s, int iconType, bool forcePane )
|
||||||
{
|
{
|
||||||
wxString paneTitle;
|
wxString paneTitle;
|
||||||
switch ( iconType )
|
switch ( iconType )
|
||||||
{
|
{
|
||||||
case ( CONST_INFO ) :
|
case ( CONST_INFO ) :
|
||||||
if ( s.Length() < 50 ) // magic no. necessary?
|
if ( !forcePane && s.Length() < 50 ) // magic no. necessary?
|
||||||
{
|
{
|
||||||
statusProgress ( s );
|
statusProgress ( s );
|
||||||
return;
|
return;
|
||||||
|
@ -5845,7 +5911,7 @@ void MyFrame::OnWordCount ( wxCommandEvent& event )
|
||||||
ngettext ( L"%s contains %i word", L"%s contains %i words", count ),
|
ngettext ( L"%s contains %i word", L"%s contains %i words", count ),
|
||||||
doc->getShortFileName().c_str(), count );
|
doc->getShortFileName().c_str(), count );
|
||||||
|
|
||||||
messagePane ( msg, CONST_INFO );
|
messagePane ( msg, CONST_INFO, true );
|
||||||
doc->SetFocus();
|
doc->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,10 @@ enum
|
||||||
ID_RELOAD,
|
ID_RELOAD,
|
||||||
ID_WRAP_WORDS,
|
ID_WRAP_WORDS,
|
||||||
// IDs to be activated only if a document is open
|
// IDs to be activated only if a document is open
|
||||||
|
ID_SPLIT_TAB_TOP,
|
||||||
|
ID_SPLIT_TAB_RIGHT,
|
||||||
|
ID_SPLIT_TAB_BOTTOM,
|
||||||
|
ID_SPLIT_TAB_LEFT,
|
||||||
ID_FIND,
|
ID_FIND,
|
||||||
ID_FIND_AGAIN,
|
ID_FIND_AGAIN,
|
||||||
ID_GOTO,
|
ID_GOTO,
|
||||||
|
@ -223,6 +227,7 @@ public:
|
||||||
void OnGlobalReplace ( wxCommandEvent& event );
|
void OnGlobalReplace ( wxCommandEvent& event );
|
||||||
void OnWordCount ( wxCommandEvent& event );
|
void OnWordCount ( wxCommandEvent& event );
|
||||||
void OnFeedback ( wxCommandEvent& event );
|
void OnFeedback ( wxCommandEvent& event );
|
||||||
|
void OnSplitTab ( wxCommandEvent& event );
|
||||||
void OnFontSmaller ( wxCommandEvent& event );
|
void OnFontSmaller ( wxCommandEvent& event );
|
||||||
void OnFontMedium ( wxCommandEvent& event );
|
void OnFontMedium ( wxCommandEvent& event );
|
||||||
void OnFontLarger ( wxCommandEvent& event );
|
void OnFontLarger ( wxCommandEvent& event );
|
||||||
|
@ -321,7 +326,9 @@ public:
|
||||||
void statusProgress ( const wxString& s );
|
void statusProgress ( const wxString& s );
|
||||||
|
|
||||||
// public to allow InsertPanel access
|
// public to allow InsertPanel access
|
||||||
void messagePane ( const wxString& s, int iconType = CONST_INFO );
|
void messagePane ( const wxString& s,
|
||||||
|
int iconType = CONST_INFO,
|
||||||
|
bool forcePane = false );
|
||||||
|
|
||||||
// public to allow IPC access
|
// public to allow IPC access
|
||||||
bool openFile ( wxString& fileName, bool largeFile = false );
|
bool openFile ( wxString& fileName, bool largeFile = false );
|
||||||
|
|
Loading…
Reference in New Issue