[NEW_FEATURE] Automatic Backup System (in progress).

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1219 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-04-10 23:51:36 +00:00
parent b30c3246d4
commit 412b0c54e4
3 changed files with 15 additions and 2 deletions

View File

@ -5241,7 +5241,7 @@ struct Quote{
const char *_quote;
};
const int nbQuote = 197;
const int nbQuote = 198;
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."},
@ -5438,6 +5438,7 @@ Quote quotes[nbQuote] = {
{"Confucius", "It's good to meet girl in park.\nBut better to park meat in girl."},
{"Mark Twain", "Censorship is telling a man he can't have a steak just because a baby can't chew it."},
{"Friedrich Nietzsche", "There is not enough love and goodness in the world to permit giving any of it away to imaginary beings."},
{"Dhalsim", "Pain is a state of mind and I don't mind your pain."},
{"Elie Wiesel", "Human beings can be beautiful or more beautiful,\nthey can be fat or skinny, they can be right or wrong,\nbut illegal? How can a human being be illegal?"},
{"Chewbacca", "Uuuuuuuuuur Ahhhhrrrrrr\nUhrrrr Ahhhhrrrrrr\nAaaarhg..."}
};

View File

@ -3859,6 +3859,13 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
const TCHAR *pDir = element->Attribute(TEXT("dir"));
if (pDir)
_nppGUI._backupDir = pDir;
const TCHAR *isBackupMode = element->Attribute(TEXT("isBackupMode"));
_nppGUI._isBackupMode = (isBackupMode && !lstrcmp(isBackupMode, TEXT("yes")));
int timing;
if (element->Attribute(TEXT("backupTiming"), &timing))
_nppGUI._backupTiming = timing;
}
else if (!lstrcmp(nm, TEXT("DockingManager")))
@ -4711,6 +4718,9 @@ bool NppParameters::writeGUIParams()
element->SetAttribute(TEXT("action"), _nppGUI._backup);
element->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir?TEXT("yes"):TEXT("no"));
element->SetAttribute(TEXT("dir"), _nppGUI._backupDir.c_str());
element->SetAttribute(TEXT("isBackupMode"), _nppGUI._isBackupMode?TEXT("yes"):TEXT("no"));
element->SetAttribute(TEXT("backupTiming"), _nppGUI._backupTiming);
backExist = true;
}
else if (!lstrcmp(nm, TEXT("MRU")))
@ -4986,6 +4996,9 @@ bool NppParameters::writeGUIParams()
GUIConfigElement->SetAttribute(TEXT("action"), _nppGUI._backup);
GUIConfigElement->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir?TEXT("yes"):TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("dir"), _nppGUI._backupDir.c_str());
GUIConfigElement->SetAttribute(TEXT("isBackupMode"), _nppGUI._isBackupMode?TEXT("yes"):TEXT("no"));
GUIConfigElement->SetAttribute(TEXT("backupTiming"), _nppGUI._backupTiming);
}
if (!doTaskListExist)

View File

@ -814,7 +814,6 @@ struct NppGUI
generic_string _themeName;
MultiInstSetting _multiInstSetting;
bool _fileSwitcherWithoutExtColumn;
/*
bool isBackupMode() const {return _isBackupMode;};
void setBackupMode(bool doBackup) {_isBackupMode = doBackup;};