From 80da43da5c2c9ca5befc7578ccd6af7c14c659bf Mon Sep 17 00:00:00 2001 From: Don Ho Date: Mon, 1 Dec 2014 22:39:08 +0000 Subject: [PATCH] [NEW] Allow users to disable easter eggs in Notepad++ by adding noEasterEggs.xml in Notepad++ installed directory. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1300 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/NppCommands.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 6ab84840..f5d3f043 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2131,12 +2131,18 @@ void Notepad_plus::command(int id) } else if (iQuote == -2) { - showAllQuotes(); + generic_string noEasterEggsPath((NppParameters::getInstance())->getNppPath()); + noEasterEggsPath.append(TEXT("\\noEasterEggs.xml")); + if (!::PathFileExists(noEasterEggsPath.c_str())) + showAllQuotes(); return; } if (iQuote != -1) { - showQuoteFromIndex(iQuote); + generic_string noEasterEggsPath((NppParameters::getInstance())->getNppPath()); + noEasterEggsPath.append(TEXT("\\noEasterEggs.xml")); + if (!::PathFileExists(noEasterEggsPath.c_str())) + showQuoteFromIndex(iQuote); return; } }