Skip to content

Commit

Permalink
Fix ubuntu build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
LiMinggang committed Dec 21, 2015
1 parent 575a38a commit 1cee3ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/MadEditFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ wxFileOffset g_MPythonCaretPos = -1;
wxFileOffset g_MPythonSelBegPos = -1;
wxFileOffset g_MPythonSelEndPos = -1;

extern inline bool IsMacroRecording()
extern bool IsMacroRecording()
{
return ( ( g_MainFrame != NULL ) && ( g_MainFrame->IsMacroRecording() ) && ( g_ActiveMadEdit ) );
}
Expand Down
20 changes: 10 additions & 10 deletions src/MadSearchReplaceDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extern int MadMessageBox(const wxString& message,
extern wxStatusBar *g_StatusBar; // add: gogo, 19.09.2009
extern MadRecentList * g_RecentFindText;
MadSearchReplaceDialog *g_SearchReplaceDialog=NULL;
//extern bool IsMacroRecording();
extern bool IsMacroRecording();
extern void RecordAsMadMacro(MadEdit *, const wxString&, bool=false);
extern MadEdit *g_ActiveMadEdit;
wxProgressDialog *g_SearchProgressDialog=NULL;
Expand Down Expand Up @@ -461,7 +461,7 @@ void MadSearchReplaceDialog::WxButtonFindNextClick(wxCommandEvent& event)
sr=g_ActiveMadEdit->FindHexNext(text, rangeFrom, rangeTo);
if(sr != SR_EXPR_ERROR)
{
if( g_MainFrame->IsMacroRecording() )
if( IsMacroRecording() )
RecordAsMadMacro(g_ActiveMadEdit, wxString::Format(wxT("FindHexNext(\"%s\", %s, %s)"), text.c_str(),
(wxLongLong(rangeFrom).ToString()).c_str(), (wxLongLong(rangeTo).ToString()).c_str()));
}
Expand All @@ -479,7 +479,7 @@ void MadSearchReplaceDialog::WxButtonFindNextClick(wxCommandEvent& event)
rangeFrom, rangeTo);
if(sr != SR_EXPR_ERROR)
{
if( g_MainFrame->IsMacroRecording() )
if( IsMacroRecording() )
{
expr = text;
if(!bRegex)
Expand Down Expand Up @@ -615,7 +615,7 @@ void MadSearchReplaceDialog::WxButtonFindPrevClick(wxCommandEvent& event)
if(WxCheckBoxFindHex->GetValue())
{
sr=g_ActiveMadEdit->FindHexPrevious(text, rangeTo, rangeFrom);
if( g_MainFrame->IsMacroRecording() )
if( IsMacroRecording() )
RecordAsMadMacro(g_ActiveMadEdit, wxString::Format(wxT("FindHexPrevious(\"%s\", %s, %s)"), text.c_str(), (wxLongLong(rangeFrom).ToString()).c_str(), (wxLongLong(rangeTo).ToString()).c_str()));
}
else
Expand All @@ -631,7 +631,7 @@ void MadSearchReplaceDialog::WxButtonFindPrevClick(wxCommandEvent& event)
bDotMatchNewline,
rangeTo, rangeFrom);

if( g_MainFrame->IsMacroRecording() )
if( IsMacroRecording() )
{
expr = text;
if(!bRegex)
Expand Down Expand Up @@ -997,7 +997,7 @@ void MadSearchReplaceDialog::WxButtonReplaceClick(wxCommandEvent& event)
{
ret=g_ActiveMadEdit->ReplaceHex(text, reptext, rangeFrom, rangeTo);

if((ret == RR_REP_NEXT || ret == RR_NREP_NEXT) && ( g_MainFrame->IsMacroRecording() ))
if((ret == RR_REP_NEXT || ret == RR_NREP_NEXT) && ( IsMacroRecording() ))
{
RecordAsMadMacro(g_ActiveMadEdit, wxString::Format(wxT("ReplaceHex(\"%s\", \"%s\", %s, %s)"), text.c_str(), reptext.c_str(), (wxLongLong(rangeFrom).ToString()).c_str(), (wxLongLong(rangeTo).ToString()).c_str()));
}
Expand All @@ -1013,7 +1013,7 @@ void MadSearchReplaceDialog::WxButtonReplaceClick(wxCommandEvent& event)
bWholeWord,
bDotMatchNewline,
rangeFrom, rangeTo);
if((ret == RR_REP_NEXT || ret == RR_NREP_NEXT) && ( g_MainFrame->IsMacroRecording() ))
if((ret == RR_REP_NEXT || ret == RR_NREP_NEXT) && ( IsMacroRecording() ))
{
expr = text;
if(!bRegex)
Expand Down Expand Up @@ -1476,7 +1476,7 @@ void MadSearchReplaceDialog::SearchAll(MadEdit * madedit, bool needRec/*=true*/)
false,
&begpos, &endpos, rangeFrom, rangeTo);

if(needRec && ( g_MainFrame->IsMacroRecording() ))
if(needRec && ( IsMacroRecording() ))
{
if(!bRegex)
{
Expand Down Expand Up @@ -1591,7 +1591,7 @@ void MadSearchReplaceDialog::ReplaceAll(MadEdit * madedit, bool needRec/*=true*/
if(WxCheckBoxFindHex->GetValue())
{
count=madedit->ReplaceHexAll(text, reptext, NULL, NULL, rangeFrom, rangeTo);
if(needRec && ( g_MainFrame->IsMacroRecording() ))
if(needRec && ( IsMacroRecording() ))
RecordAsMadMacro(madedit, wxString::Format(wxT("ReplaceHexAll(\"%s\", \"%s\", %s, %s)"), text.c_str(), reptext.c_str(), (wxLongLong(rangeFrom).ToString()).c_str(), (wxLongLong(rangeTo).ToString()).c_str()));
}
else
Expand All @@ -1605,7 +1605,7 @@ void MadSearchReplaceDialog::ReplaceAll(MadEdit * madedit, bool needRec/*=true*/
bWholeWord,
bDotMatchNewline,
NULL, NULL, rangeFrom, rangeTo);
if(needRec && ( g_MainFrame->IsMacroRecording() ))
if(needRec && ( IsMacroRecording() ))
{
if(!bRegex)
{
Expand Down

0 comments on commit 1cee3ef

Please sign in to comment.