diff --git a/PowerEditor/bin/npp.pdb b/PowerEditor/bin/npp.pdb index 9b4271e6..66762cff 100644 Binary files a/PowerEditor/bin/npp.pdb and b/PowerEditor/bin/npp.pdb differ diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index f8916441..52940a26 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -28,10 +28,10 @@ ; Define the application name !define APPNAME "Notepad++" -!define APPVERSION "6.6.4" +!define APPVERSION "6.6.6" !define APPNAMEANDVERSION "${APPNAME} v${APPVERSION}" !define VERSION_MAJOR 6 -!define VERSION_MINOR 64 +!define VERSION_MINOR 66 !define APPWEBSITE "http://notepad-plus-plus.org/" diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 404f13b3..8f894044 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -5243,7 +5243,7 @@ struct Quote{ const char *_quote; }; -const int nbQuote = 208; +const int nbQuote = 197; 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."}, @@ -5283,14 +5283,14 @@ Quote quotes[nbQuote] = { {"Anonymous #5", "\"SEX\" is not the answer.\nSex is the question, \"YES\" is the answer."}, {"Anonymous #6", "Going to Mc Donald's for a salad is like going to a whore for a hug."}, {"Anonymous #7", "I need a six month holiday, TWICE A YEAR!"}, -{"Anonymous #8", "A world without woman would be a pain in the ass!!!"}, +//{"Anonymous #8", ""}, {"Anonymous #9", "I just read a list of \"the 100 things to do before you die\". I'm pretty surprised \"yell for help\" wasn't one of them..."}, {"Anonymous #10", "Roses are red,\nViolets are red,\nTulips are red,\nBushes are red,\nTrees are red,\nHOLY SHIT MY\nGARDEN'S ON FIRE!!"}, {"Anonymous #11", "We stopped checking for monsters under our bed, when we realized they were inside us."}, {"Anonymous #12", "I would rather check my facebook than face my checkbook."}, {"Anonymous #13", "Whoever says Paper beats Rock is an idiot. Next time I see someone say that I will throw a rock at them while they hold up a sheet of paper."}, {"Anonymous #14", "A better world is where chickens can cross the road without having their motives questioned."}, -{"Anonymous #15", "Life is like a penis, simple, soft, straight, relaxed and hanging freely.\nThen women make it hard."}, +//{"Anonymous #15", ""}, {"Anonymous #16", "What you do after sex?\n A. Smoke a cigarette\n B. Kiss your partener\n C. Clear browser history\n"}, {"Anonymous #17", "All you need is love,\nall you want is sex,\nall you have is porn.\n"}, {"Anonymous #18", "Never get into fights with ugly people, they have nothing to lose."}, @@ -5306,7 +5306,7 @@ Quote quotes[nbQuote] = { {"Anonymous #28", "Why 6 afraid of 7?\nBecause 7 8 9 (seven ate nine) while 6 and 9 were flirting."}, {"Anonymous #29", "The reason women will never be the ones to propose is\nbecause as soon as she gets on her knees,\nhe will start unzipping."}, {"Anonymous #30", "Why do Java developers wear glasses?\nBecause they don't C#."}, -{"Anonymous #31", "Non alcoholic beer is like licking your sister.\nIt tastes right but it is wrong."}, +//{"Anonymous #31", ""}, {"Anonymous #32", "Two bytes meet. The first byte asks, \"You look terrible. Are you OK?\"\nThe second byte replies, \"No, just feeling a bit off.\""}, {"Anonymous #33", "Programmer - an organism that turns coffee into software."}, {"Anonymous #34", "It's not a bug - it's an undocumented feature."}, @@ -5321,7 +5321,7 @@ Quote quotes[nbQuote] = { {"Anonymous #43", "Afraid to die alone?\nBecome a bus driver."}, {"Anonymous #44", "The first 5 days after the weekend are always the hardest."}, {"Anonymous #45", "Rhinos are just fat unicorns."}, -{"Anonymous #46", "Pornography harms\nmy wrist."}, +//{"Anonymous #46", ""}, {"Anonymous #47", "Kids are like fart.\nYou can only stand yours."}, {"Anonymous #48", "If you were born in Israel, you'd probably be Jewish.\nIf you were born in Saudi Arabia, you'd probably be Muslim.\nIf you were born in India, you'd probably be Hindu.\nBut because you were born in North America, you're Christian.\nYour faith is not inspired by some divine, constant truth.\nIt's simply geography."}, {"Anonymous #49", "There are 2 types of people in this world:\nPeople who say they pee in the shower, and the dirty fucking liars."}, @@ -5334,7 +5334,7 @@ Quote quotes[nbQuote] = { {"Anonymous #56", "Religion is like circumcision.\nIf you wait until someone is 21 to tell them about it they probably won't be interested."}, {"Anonymous #57", "No, no, no, I'm not insulting you.\nI'm describing you."}, {"Anonymous #58", "I bought a dog once. Named him \"Stay\".\n\"Come here, Stay.\"\nHe's insane now."}, -{"Anonymous #59", "Steve Jobs\n1955-2011\nDied from PC (Pancreatic Cancer)."}, +//{"Anonymous #59", ""}, {"Anonymous #60", "Yesterday I named my Wifi network \"hack me if you can\"\nToday when I woke up it was changed to \"challenge accepted\"."}, {"Anonymous #61", "Your mother is so fat,\nthe recursive function computing her mass causes a stack overflow."}, {"Anonymous #62", "Oral sex makes my day, but anal sex makes my hole weak."}, @@ -5355,15 +5355,15 @@ Quote quotes[nbQuote] = { {"Anonymous #77", "Governments are like diapers.\nThey should be changed often, and for the same reason."}, {"Anonymous #78", "If you expect the world to be fair with you because you are fair, you're fooling yourself.\nThat's like expecting the lion not to eat you because you didn't eat him."}, {"Anonymous #79", "I'm a creationist.\nI believe man create God."}, -{"Anonymous #80", "If women ruled the world, there would be no wars.\nJust a bunch of jealous countries not talking to each other."}, +//{"Anonymous #80", ""}, {"Anonymous #81", "A male engineering student was crossing a road one day when a frog called out to him and said, \"If you kiss me, I'll turn into a beautiful princess.\" He bent over, picked up the frog, and put it in his pocket.\n\nThe frog spoke up again and said, \"If you kiss me and turn me back into a beautiful princess, I will stay with you for one week.\" The engineering student took the frog out of his pocket, smiled at it; and returned it to his pocket.\n\nThe frog then cried out, \"If you kiss me and turn me back into a princess, I'll stay with you and do ANYTHING you want.\" Again the boy took the frog out, smiled at it, and put it back into his pocket.\n\nFinally, the frog asked, \"What is the matter? I've told you I'm a beautiful princess, that I'll stay with you for a week and do anything you want. Why won't you kiss me?\" The boy said, \"Look I'm an engineer. I don't have time for a girlfriend, but a talking frog is cool.\"\n"}, -{"Anonymous #82", "Every guy thinks that every girl's dream is to find the perfect guy.\nBullshit!\nEvery girl's dream is to eat without getting fat!"}, +//{"Anonymous #82", ""}, {"Anonymous #83", "Copy from one, it's plagiarism.\nCopy from two, it's research."}, {"Anonymous #84", "If you love something, let it go. If it comes back to you, its yours forever.\nIf it doesn't, you hunt that bitch down and kill her."}, {"Anonymous #85", "Race, religion, ethnic pride and nationalism etc... does nothing but teach you how to hate people that you've never met."}, {"Anonymous #86", "Farts are just the ghosts of the things we eat."}, {"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 #88", ""}, {"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"}, @@ -5380,7 +5380,7 @@ Quote quotes[nbQuote] = { {"Anonymous #102", "If IE is brave enough to ask you to set it as your default browser,\ndon't tell me you dare not ask a girl out."}, {"Anonymous #103", "Turn on your brain, turn off TV."}, {"Anonymous #104", "The main idea of \"Inception\":\nif you run a VM inside a VM inside a VM inside a VM inside a VM,\neverything will be very slow."}, -{"Anonymous #105", "\"Kiss my ass fucker\" really needs a comma."}, +//{"Anonymous #105", ""}, {"Anonymous #106", "When I die, I want to go peacefully like my grandfather did, in his sleep\n- not screaming, like the passengers in his car."}, {"Anonymous #107", "Remember, YOUR God is real.\nAll those other Gods are ridiculous, made-up nonsense.\nBut not yours.\nYour God is real. Whichever one that is."}, {"Anonymous #108", "I hope Bruce Willis dies of a Viagra overdose,\nThe way you can see the headline:\nBruce Willis, Died Hard"}, @@ -5404,7 +5404,7 @@ Quote quotes[nbQuote] = { {"Anonymous #126", "Social media does not make people stupid.\nIt just makes stupid people more visible."}, {"Anonymous #127", "Don't give up your dreams.\nKeep sleeping."}, {"Anonymous #128", "I love sleep.\nNot because I'm lazy.\nBut because my dreams are better than my real life."}, -{"Anonymous #129", "Without nipples, tits are pointless."}, +//{"Anonymous #129", ""}, {"Anonymous #130", "Common sense is so rare, it's kinda like a superpower..."}, {"Anonymous #131", "The best thing about a boolean is even if you are wrong, you are only off by a bit."}, {"Anonymous #132", "Benchmarks don't lie, but liars do benchmarks."}, @@ -5422,7 +5422,7 @@ Quote quotes[nbQuote] = { {"Anonymous #144", "I don't want to sound like a badass but...\nI eject my USB drive without removing it safely."}, {"Anonymous #145", "feet (noun)\na device used for finding legos in the dark"}, {"Anonymous #146", "Buy a sheep\nName it \"Relation\"\nNow you have a Relationsheep\n"}, -{"Anonymous #147", "Just love programmers' \"your mom jokes\":\nIf your mom were a collection class, her insert method would be public."}, +//{"Anonymous #147", ""}, {"Anonymous #148", "UNIX command line Russian roulette:\n[ $[ $RANDOM % 6 ] == 0 ] && rm -rf /* || echo *Click*"}, {"Anonymous #149", "unzip, strip, top, less, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep.\n\nNo, it's not porn. It's Unix."}, {"Anonymous #150", "To understand what recursion is, you must first understand recursion."}, diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index 970b4dc0..dc99c1bd 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -869,8 +869,7 @@ FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1 BEGIN EDITTEXT IDC_BUILD_DATETIME,150,2,150,10, ES_READONLY | NOT WS_BORDER CONTROL "",IDI_CHAMELEON,"Static",SS_OWNERDRAW,20,5,64,64 - LTEXT NOTEPAD_PLUS_VERSION, IDC_STATIC,70,20,70,11 - LTEXT UNICODE_ANSI_MODE, IDC_STATIC,145,20,65,11 + LTEXT NOTEPAD_PLUS_VERSION, IDC_STATIC,70,20,140,11 LTEXT "Author :",IDC_STATIC,21,45,31,8 LTEXT "Notepad++ team",IDC_AUTHOR_NAME,78,45,70,8 LTEXT "Home Page :",IDC_STATIC,21,59,47,8 diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 014bfa95..9fc07a6a 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -36,6 +36,7 @@ #include "documentMap.h" #include "functionListPanel.h" + void Notepad_plus::macroPlayback(Macro macro) { _pEditView->execute(SCI_BEGINUNDOACTION); diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 71056f25..255579b9 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -33,6 +33,12 @@ #include "keys.h" #include "localization.h" #include "UserDefineDialog.h" +#include + +#ifndef json_included +#define json_included +#include "jsoncpp\include\json\json.h" +#endif struct WinMenuKeyDefinition { //more or less matches accelerator table definition, easy copy/paste //const TCHAR * name; //name retrieved from menu? @@ -798,29 +804,64 @@ bool NppParameters::reloadLang() return loadOkay; } + generic_string NppParameters::getCloudSettingsPath(const generic_string & cloudChoicePath) { - // check if dropbox is present generic_string cloudSettingsPath = TEXT(""); + + // check if dropbox is present + generic_string settingsPath4dropbox = TEXT(""); + ITEMIDLIST *pidl; - SHGetSpecialFolderLocation(NULL, CSIDL_PROFILE, &pidl); + SHGetSpecialFolderLocation(NULL, CSIDL_APPDATA, &pidl); TCHAR tmp[MAX_PATH]; SHGetPathFromIDList(pidl, tmp); - - cloudSettingsPath = tmp; - PathAppend(cloudSettingsPath, TEXT("Dropbox")); - if (PathFileExists(cloudSettingsPath.c_str())) - _nppGUI._availableClouds |= DROPBOX_AVAILABLE; - - if (!PathFileExists(cloudChoicePath.c_str())) - return TEXT(""); + generic_string dropboxInfoJson = tmp; - // Read cloud choice - std::string cloudChoice = getFileContent(cloudChoicePath.c_str()); + PathAppend(dropboxInfoJson, TEXT("Dropbox\\info.json")); - - if (cloudChoice == "dropbox" && _nppGUI._availableClouds & DROPBOX_AVAILABLE) + if (::PathFileExists(dropboxInfoJson.c_str())) { + std::ifstream ifs(dropboxInfoJson.c_str(), std::ifstream::binary); + + Json::Value root; + Json::Reader reader; + + bool parsingSuccessful = reader.parse(ifs, root); + + if (parsingSuccessful) + { + Json::Value personalRoot = root.get("personal", 0); + std::string pathVal = personalRoot.get("path", "").asString(); + + const size_t maxLen = 2048; + wchar_t dest[maxLen]; + mbstowcs(dest, pathVal.c_str(), maxLen); + if (::PathFileExists(dest)) + { + settingsPath4dropbox = dest; + _nppGUI._availableClouds |= DROPBOX_AVAILABLE; + } + } + } + + // TODO: check if google drive is present + generic_string settingsPath4GoogleDrive = TEXT(""); + + // TODO: check if one drive is present + generic_string settingsPath4OneDrive = TEXT(""); + + std::string cloudChoice = ""; + // cloudChoicePath doesn't exist, just quit + if (::PathFileExists(cloudChoicePath.c_str())) + { + // Read cloud choice + cloudChoice = getFileContent(cloudChoicePath.c_str()); + } + + if (cloudChoice == "dropbox" && (_nppGUI._availableClouds & DROPBOX_AVAILABLE)) + { + cloudSettingsPath = settingsPath4dropbox; PathAppend(cloudSettingsPath, TEXT("Notepad++")); // The folder %userprofile%\Dropbox\Notepad++ should exist. @@ -834,10 +875,14 @@ generic_string NppParameters::getCloudSettingsPath(const generic_string & cloudC else if (cloudChoice == "oneDrive") { _nppGUI._cloudChoice = oneDrive; + cloudSettingsPath = settingsPath4OneDrive; + PathAppend(cloudSettingsPath, TEXT("Notepad++")); } else if (cloudChoice == "googleDrive") { _nppGUI._cloudChoice = googleDrive; + cloudSettingsPath = settingsPath4GoogleDrive; + PathAppend(cloudSettingsPath, TEXT("Notepad++")); } return cloudSettingsPath; } diff --git a/PowerEditor/src/icons/chameleon.ico b/PowerEditor/src/icons/chameleon.ico index 636c56c5..9351f3d6 100644 Binary files a/PowerEditor/src/icons/chameleon.ico and b/PowerEditor/src/icons/chameleon.ico differ diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index 1e49ba8d..549182ba 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -29,18 +29,12 @@ #ifndef RESOURCE_H #define RESOURCE_H -#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v6.6.4") +#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v6.6.6 Friday the 13th Edition") // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 // ex : #define VERSION_VALUE TEXT("5.63\0") -#define VERSION_VALUE TEXT("6.64\0") -#define VERSION_DIGITALVALUE 6, 6, 4, 0 - -#ifdef UNICODE -#define UNICODE_ANSI_MODE TEXT("(UNICODE)") -#else -#define UNICODE_ANSI_MODE TEXT("(ANSI)") -#endif +#define VERSION_VALUE TEXT("6.66\0") +#define VERSION_DIGITALVALUE 6, 6, 6, 0 #ifndef IDC_STATIC #define IDC_STATIC -1 diff --git a/PowerEditor/visual.net/notepadPlus.vcproj b/PowerEditor/visual.net/notepadPlus.vcproj index f0e82031..cd5c67f4 100644 --- a/PowerEditor/visual.net/notepadPlus.vcproj +++ b/PowerEditor/visual.net/notepadPlus.vcproj @@ -68,7 +68,7 @@