Browse Source

[BUGFIXED_NEWFEATURE] Change the behaviour : When file is deleted from outside and switch back to Notepad++, user will be asked if he want to keep this file. If he answer yes, he will not be asked in the next time.

Change Window title from Notepad++ - file path to file path - notepad++.exe


git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@67 f5eea248-9336-0410-98b8-ebc06183d4e3
pull/343/head^2
donho 17 years ago
parent
commit
8e2d9c744a
  1. 2
      PowerEditor/src/MISC/RegExt/regExtDlg.cpp
  2. 27
      PowerEditor/src/Notepad_plus.cpp
  3. 6
      PowerEditor/src/ScitillaComponent/Buffer.h
  4. 2
      PowerEditor/src/ScitillaComponent/UserDefineDialog.rc

2
PowerEditor/src/MISC/RegExt/regExtDlg.cpp

@ -34,7 +34,7 @@ char defExtArray[nbSupportedLang][nbExtMax][extNameMax] = {
{"java, c#, pascal", ".java", ".cs", ".pas", ".inc"}, {"java, c#, pascal", ".java", ".cs", ".pas", ".inc"},
{"web(html) script", ".html", ".htm", ".php", ".phtml", ".js", ".jsp", ".asp", ".css", ".xml"}, {"web(html) script", ".html", ".htm", ".php", ".phtml", ".js", ".jsp", ".asp", ".css", ".xml"},
{"public script", ".sh", ".bsh", ".nsi", ".nsh", ".lua", ".pl", ".pm", ".py"}, {"public script", ".sh", ".bsh", ".nsi", ".nsh", ".lua", ".pl", ".pm", ".py"},
{"property script", ".rc", ".as", ".mx", ".vb", ".vbs", ".bat", ".cmd", ".nt"}, {"property script", ".rc", ".as", ".mx", ".vb", ".vbs"},
{"fortran, TeX, SQL", ".f", ".for", ".f90", ".f95", ".f2k", ".tex", ".sql"}, {"fortran, TeX, SQL", ".f", ".for", ".f90", ".f95", ".f2k", ".tex", ".sql"},
{"misc", ".nfo", ".mak"}, {"misc", ".nfo", ".mak"},
{"customize"} {"customize"}

27
PowerEditor/src/Notepad_plus.cpp

@ -3805,9 +3805,10 @@ void Notepad_plus::setTitleWith(const char *filePath)
if (!filePath || !strcmp(filePath, "")) if (!filePath || !strcmp(filePath, ""))
return; return;
char str2concat[MAX_PATH]; const size_t str2concatLen = MAX_PATH + 32;
strcat(strcpy(str2concat, _className), " - "); char str2concat[str2concatLen];
strcat(str2concat, filePath); strcat(strcpy(str2concat, filePath), " - ");
strcat(str2concat, _className);
::SetWindowText(_hSelf, str2concat); ::SetWindowText(_hSelf, str2concat);
} }
@ -3978,18 +3979,18 @@ void Notepad_plus::checkModifiedDocument()
if (pScintillaArray[j]->isCurrentBufReadOnly()) if (pScintillaArray[j]->isCurrentBufReadOnly())
pScintillaArray[j]->execute(SCI_SETREADONLY, TRUE); pScintillaArray[j]->execute(SCI_SETREADONLY, TRUE);
}
if (_activeAppInf._isActivated)
{ if (_activeAppInf._isActivated)
int curPos = _pEditView->execute(SCI_GETCURRENTPOS); {
::PostMessage(_pEditView->getHSelf(), WM_LBUTTONUP, 0, 0); int curPos = _pEditView->execute(SCI_GETCURRENTPOS);
::PostMessage(_pEditView->getHSelf(), SCI_SETSEL, curPos, curPos); ::PostMessage(_pEditView->getHSelf(), WM_LBUTTONUP, 0, 0);
_activeAppInf._isActivated = false; ::PostMessage(_pEditView->getHSelf(), SCI_SETSEL, curPos, curPos);
} _activeAppInf._isActivated = false;
} }
docBuf.updatTimeStamp(); docBuf.updatTimeStamp();
} }
else if (fStatus == FILE_DELETED) else if (fStatus == FILE_DELETED && !docBuf._dontBotherMeAnymore)
{ {
if (::IsIconic(_hSelf)) if (::IsIconic(_hSelf))
::ShowWindow(_hSelf, SW_SHOWNORMAL); ::ShowWindow(_hSelf, SW_SHOWNORMAL);
@ -4005,6 +4006,8 @@ void Notepad_plus::checkModifiedDocument()
else else
pDocTabArray[j]->closeCurrentDoc(); pDocTabArray[j]->closeCurrentDoc();
} }
else
docBuf._dontBotherMeAnymore = true;
if (_activeAppInf._isActivated) if (_activeAppInf._isActivated)
{ {

6
PowerEditor/src/ScitillaComponent/Buffer.h

@ -105,8 +105,9 @@ public :
}; };
Buffer(const Buffer & buf) : _isDirty(buf._isDirty), _doc(buf._doc), _lang(buf._lang), Buffer(const Buffer & buf) : _isDirty(buf._isDirty), _doc(buf._doc), _lang(buf._lang),
_timeStamp(buf._timeStamp), _isReadOnly(buf._isReadOnly), _isSetReadOnly(buf._isSetReadOnly), _pos(buf._pos), _timeStamp(buf._timeStamp), _isReadOnly(buf._isReadOnly), _isSetReadOnly(buf._isSetReadOnly), _pos(buf._pos),
_format(buf._format),_unicodeMode(buf._unicodeMode), _foldState(buf._foldState), _recentTag(buf._recentTag)/*, _isBinary(false)*/ _format(buf._format),_unicodeMode(buf._unicodeMode), _foldState(buf._foldState), _recentTag(buf._recentTag),
_dontBotherMeAnymore(false)
{ {
strcpy(_fullPathName, buf._fullPathName); strcpy(_fullPathName, buf._fullPathName);
strcpy(_userLangExt, buf._userLangExt); strcpy(_userLangExt, buf._userLangExt);
@ -337,6 +338,7 @@ private :
long _recentTag; long _recentTag;
static long _recentTagCtr; static long _recentTagCtr;
//bool _isBinary; //bool _isBinary;
bool _dontBotherMeAnymore;
Lang * getCurrentLang() const { Lang * getCurrentLang() const {
int i = 0 ; int i = 0 ;

2
PowerEditor/src/ScitillaComponent/UserDefineDialog.rc

@ -105,7 +105,7 @@ BEGIN
LTEXT "Font Name :",IDC_KEYWORD3_FONTNAME_STATIC,136,251,44,8,0,WS_EX_RIGHT LTEXT "Font Name :",IDC_KEYWORD3_FONTNAME_STATIC,136,251,44,8,0,WS_EX_RIGHT
LTEXT "Font size :",IDC_KEYWORD3_FONTSIZE_STATIC,212,268,34,8,0,WS_EX_RIGHT LTEXT "Font size :",IDC_KEYWORD3_FONTSIZE_STATIC,212,268,34,8,0,WS_EX_RIGHT
EDITTEXT IDC_KEYWORD3_EDIT,14,303,282,28,ES_MULTILINE | WS_VSCROLL EDITTEXT IDC_KEYWORD3_EDIT,14,303,282,28,ES_MULTILINE | WS_VSCROLL
GROUPBOX "3th Group",IDC_KEYWORD3_DESCGROUP_STATIC,4,227,300,110,BS_CENTER | BS_FLAT GROUPBOX "3rd Group",IDC_KEYWORD3_DESCGROUP_STATIC,4,227,300,110,BS_CENTER | BS_FLAT
LTEXT "Foreground color",IDC_KEYWORD4_FG_STATIC,26,362,57,8,0,WS_EX_RIGHT LTEXT "Foreground color",IDC_KEYWORD4_FG_STATIC,26,362,57,8,0,WS_EX_RIGHT
LTEXT "Background color",IDC_KEYWORD4_BG_STATIC,26,383,57,8,0,WS_EX_RIGHT LTEXT "Background color",IDC_KEYWORD4_BG_STATIC,26,383,57,8,0,WS_EX_RIGHT
COMBOBOX IDC_KEYWORD4_FONT_COMBO,184,363,104,78,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_KEYWORD4_FONT_COMBO,184,363,104,78,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP

Loading…
Cancel
Save