461_uppsrc_fix.diff

The diff file to apply for uppsrc directory - Sender Ghost, 08/17/2013 07:39 AM

Download (3.03 KB)

View differences:

uppsrc/CodeEditor/CodeEditor.h 2013-08-17 08:44:49 +0400
432 432
	const HlStyle& GetHlStyle(int i);
433 433
	void           SetHlStyle(int i, Color c, bool bold = false, bool italic = false, bool underline = false);
434 434

  
435
	void   CloseFindReplace();
435
	void   CloseFindReplace(bool force = false);
436 436
	void   FindReplace(bool pick_selection, bool pick_text, bool replace);
437 437
	bool   Find(bool back, const wchar *text, bool wholeword, bool ignorecase, bool wildcards,
438 438
	            bool block);
uppsrc/CodeEditor/FindReplace.cpp 2013-08-17 08:54:41 +0400
436 436
	findreplace.findback.Show();
437 437
	findreplace.ok.SetLabel("Find Next");
438 438
	findreplace.ok <<= THISBACK(DoFind);
439
	findreplace.cancel <<= findreplace.WhenClose = callback(&findreplace, &TopWindow::Close);
439
	findreplace.cancel <<= findreplace.WhenClose = THISBACK1(CloseFindReplace, true);
440 440
	findreplace.Open();
441 441
}
442 442

  
443 443
void CodeEditor::FindReplace(bool pick_selection, bool pick_text, bool replace)
444 444
{
445
	CloseFindReplace();
445
	CloseFindReplace(true);
446 446
	replacei = 0;
447 447
	findreplace.CenterOwner();
448 448
	WString find_text;
......
595 595
	}
596 596
}
597 597

  
598
void CodeEditor::CloseFindReplace()
598
void CodeEditor::CloseFindReplace(bool force)
599 599
{
600
	if(!persistent_find_replace && findreplace.IsOpen())
600
	if(findreplace.IsOpen() && (force || !persistent_find_replace))
601 601
		findreplace.Close();
602 602
}
603 603

  
uppsrc/RichEdit/Editor.cpp 2013-08-17 09:02:17 +0400
693 693
	paintcarect = false;
694 694

  
695 695
	CtrlLayoutOKCancel(findreplace, t_("Find / Replace"));
696
	findreplace.cancel <<= callback(&findreplace, &TopWindow::Close);
696
	findreplace.cancel <<= THISBACK1(CloseFindReplace, true);
697 697
	findreplace.ok <<= THISBACK(Find);
698 698
	findreplace.amend <<= THISBACK(Replace);
699 699
	notfoundfw = found = false;
uppsrc/RichEdit/Find.cpp 2013-08-17 09:00:16 +0400
9 9
		findreplace.replace.AddHistory();
10 10
}
11 11

  
12
void RichEdit::CloseFindReplace()
12
void RichEdit::CloseFindReplace(bool force)
13 13
{
14
	if(!persistent_findreplace && findreplace.IsOpen())
14
	if(findreplace.IsOpen() && (force || !persistent_findreplace))
15 15
		findreplace.Close();
16 16
}
17 17

  
uppsrc/RichEdit/RichEdit.h 2013-08-17 08:59:36 +0400
583 583
	void     CellProperties();
584 584

  
585 585
	void     OpenFindReplace();
586
	void     CloseFindReplace();
586
	void     CloseFindReplace(bool force = false);
587 587
	int      FindPos();
588 588
	RichText ReplaceText();
589 589
	void     Find();