From fb67ac3bc3943e06a7b8a8597e0a43c1bab2db83 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Tue, 21 May 2013 23:31:50 +0000 Subject: [PATCH] [ENHANCEMENT] Better flash window while search not found. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1049 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 4 +++- .../src/ScitillaComponent/FindReplaceDlg.cpp | 21 +++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index aa6b33e0f..d12d72a24 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -5142,7 +5142,7 @@ struct Quote{ const char *_quote; }; -const int nbQuote = 128; +const int nbQuote = 130; Quote quotes[nbQuote] = { {"Notepad++", "Good programmers use Notepad++ to code.\nExtreme programmers use MS Word to code, in Comic Sans, center aligned."}, {"Martin Golding", "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."}, @@ -5263,6 +5263,8 @@ Quote quotes[nbQuote] = { {"Anonymous #87", "I promised I would never kill someone who had my blood.\nBut that mosquito made me break my word."}, {"Anonymous #88", "Frigide, ton cul doit etre jaloux de la merde qui sort de ta bouche."}, {"Anonymous #89", "I'm drunk and you're still ugly."}, +{"Anonymous #90", "Clapping:\n(verb)\nRepeatedly high-fiving yourself for someone else's accomplishments."}, +{"Anonymous #91", "CV: ctrl-C, ctrl-V"}, {"Gandhi", "Earth provides enough to satisfy every man's need, but not every man's greed."}, {"R. D. Laing", "Life is a sexually transmitted disease and the mortality rate is one hundred percent."}, {"Apple fan boy", "I'll buy a second iPhone 5 and buy a lot of iOS applications so that Apple will be able to buy Samsung (this shitty company) to shut it down and all the Apple haters will be forced to have an iPhone. Muhahaha..."}, diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index f1ed30206..d3e1f79b8 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -1971,13 +1971,26 @@ void FindReplaceDlg::setStatusbarMessage(const generic_string & msg, FindStatus if (staus == FSNotFound) { ::MessageBeep(0xFFFFFFFF); - HWND hwnd2Flash = isVisible()?_hSelf:GetParent(_hSelf); - FlashWindow(hwnd2Flash, TRUE); + + FLASHWINFO flashInfo; + flashInfo.cbSize = sizeof(FLASHWINFO); + flashInfo.hwnd = isVisible()?_hSelf:GetParent(_hSelf); + flashInfo.uCount = 3; + flashInfo.dwTimeout = 100; + flashInfo.dwFlags = FLASHW_ALL; + FlashWindowEx(&flashInfo); } else if (staus == FSTopReached || staus == FSEndReached) { - if (!isVisible()) - FlashWindow(::GetParent(_hSelf), TRUE); + if (!isVisible()) { + FLASHWINFO flashInfo; + flashInfo.cbSize = sizeof(FLASHWINFO); + flashInfo.hwnd = GetParent(_hSelf); + flashInfo.uCount = 2; + flashInfo.dwTimeout = 100; + flashInfo.dwFlags = FLASHW_ALL; + FlashWindowEx(&flashInfo); + } } if (isVisible())