[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:
parent
b30c3246d4
commit
412b0c54e4
|
@ -5241,7 +5241,7 @@ struct Quote{
|
||||||
const char *_quote;
|
const char *_quote;
|
||||||
};
|
};
|
||||||
|
|
||||||
const int nbQuote = 197;
|
const int nbQuote = 198;
|
||||||
Quote quotes[nbQuote] = {
|
Quote quotes[nbQuote] = {
|
||||||
{"Notepad++", "Good programmers use Notepad++ to code.\nExtreme programmers use MS Word to code, in Comic Sans, center aligned."},
|
{"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."},
|
{"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."},
|
{"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."},
|
{"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."},
|
{"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?"},
|
{"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..."}
|
{"Chewbacca", "Uuuuuuuuuur Ahhhhrrrrrr\nUhrrrr Ahhhhrrrrrr\nAaaarhg..."}
|
||||||
};
|
};
|
||||||
|
|
|
@ -3860,6 +3860,13 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
|
||||||
if (pDir)
|
if (pDir)
|
||||||
_nppGUI._backupDir = 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")))
|
else if (!lstrcmp(nm, TEXT("DockingManager")))
|
||||||
{
|
{
|
||||||
|
@ -4711,6 +4718,9 @@ bool NppParameters::writeGUIParams()
|
||||||
element->SetAttribute(TEXT("action"), _nppGUI._backup);
|
element->SetAttribute(TEXT("action"), _nppGUI._backup);
|
||||||
element->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir?TEXT("yes"):TEXT("no"));
|
element->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir?TEXT("yes"):TEXT("no"));
|
||||||
element->SetAttribute(TEXT("dir"), _nppGUI._backupDir.c_str());
|
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;
|
backExist = true;
|
||||||
}
|
}
|
||||||
else if (!lstrcmp(nm, TEXT("MRU")))
|
else if (!lstrcmp(nm, TEXT("MRU")))
|
||||||
|
@ -4986,6 +4996,9 @@ bool NppParameters::writeGUIParams()
|
||||||
GUIConfigElement->SetAttribute(TEXT("action"), _nppGUI._backup);
|
GUIConfigElement->SetAttribute(TEXT("action"), _nppGUI._backup);
|
||||||
GUIConfigElement->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir?TEXT("yes"):TEXT("no"));
|
GUIConfigElement->SetAttribute(TEXT("useCustumDir"), _nppGUI._useDir?TEXT("yes"):TEXT("no"));
|
||||||
GUIConfigElement->SetAttribute(TEXT("dir"), _nppGUI._backupDir.c_str());
|
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)
|
if (!doTaskListExist)
|
||||||
|
|
|
@ -814,7 +814,6 @@ struct NppGUI
|
||||||
generic_string _themeName;
|
generic_string _themeName;
|
||||||
MultiInstSetting _multiInstSetting;
|
MultiInstSetting _multiInstSetting;
|
||||||
bool _fileSwitcherWithoutExtColumn;
|
bool _fileSwitcherWithoutExtColumn;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bool isBackupMode() const {return _isBackupMode;};
|
bool isBackupMode() const {return _isBackupMode;};
|
||||||
void setBackupMode(bool doBackup) {_isBackupMode = doBackup;};
|
void setBackupMode(bool doBackup) {_isBackupMode = doBackup;};
|
||||||
|
|
Loading…
Reference in New Issue