| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Notepad++
Revision: 297
Author: donho
Date: 19 Jul 2008 20:00:03
Changes:[BUG_FIXED] Fix a bug that file detection options set are not saved.
Files:| ... | ...@@ -1,5 +1,5 @@ | |
| 1 | 1 | //this file is part of notepad++ |
| 2 | //Copyright (C)2003 Don HO ( donho@altern.org ) | |
| 2 | //Copyright (C)2003 Don HO < donho@altern.org > | |
| 3 | 3 | // |
| 4 | 4 | //This program is free software; you can redistribute it and/or |
| 5 | 5 | //modify it under the terms of the GNU General Public License |
| ... | ...@@ -531,7 +531,7 @@ | |
| 531 | 531 | { |
| 532 | 532 | NppGUI() : _toolBarStatus(TB_LARGE), _toolbarShow(true), _statusBarShow(true), _menuBarShow(true),\ |
| 533 | 533 | _tabStatus(TAB_DRAWTOPBAR | TAB_DRAWINACTIVETAB | TAB_DRAGNDROP), _splitterPos(POS_HORIZOTAL),\ |
| 534 | _userDefineDlgStatus(UDD_DOCKED), _tabSize(8), _tabReplacedBySpace(false), _fileAutoDetection(cdEnabled),\ | |
| 534 | _userDefineDlgStatus(UDD_DOCKED), _tabSize(8), _tabReplacedBySpace(false), _fileAutoDetection(cdEnabled), _fileAutoDetectionOriginalValue(_fileAutoDetection),\ | |
| 535 | 535 | _checkHistoryFiles(true) ,_enableSmartHilite(true), _enableTagsMatchHilite(true), _enableTagAttrsHilite(true),\ |
| 536 | 536 | _isMaximized(false), _isMinimizedToTray(false), _rememberLastSession(true), _backup(bak_none), _useDir(false),\ |
| 537 | 537 | _doTaskList(true), _maitainIndent(true), _saveOpenKeepInSameDir(false), _styleMRU(true), _styleURL(0),\ |
| ... | ...@@ -566,6 +566,7 @@ | |
| 566 | 566 | bool _tabReplacedBySpace; |
| 567 | 567 | |
| 568 | 568 | ChangeDetect _fileAutoDetection; |
| 569 | ChangeDetect _fileAutoDetectionOriginalValue; | |
| 569 | 570 | bool _checkHistoryFiles; |
| 570 | 571 | |
| 571 | 572 | RECT _appPos; |
| ... | ...@@ -7166,7 +7166,9 @@ | |
| 7166 | 7166 | |
| 7167 | 7167 | case NPPM_SETCHECKDOCOPT : |
| 7168 | 7168 | { |
| 7169 | ((NppGUI &)(pNppParam->getNppGUI()))._fileAutoDetection = (ChangeDetect)wParam; | |
| 7169 | // If nothing is changed by user, then we allow to set this value | |
| 7170 | if (((NppGUI &)(pNppParam->getNppGUI()))._fileAutoDetection == ((NppGUI &)(pNppParam->getNppGUI()))._fileAutoDetectionOriginalValue) | |
| 7171 | ((NppGUI &)(pNppParam->getNppGUI()))._fileAutoDetection = (ChangeDetect)wParam; | |
| 7170 | 7172 | return TRUE; |
| 7171 | 7173 | } |
| 7172 | 7174 |
| ... | ...@@ -2344,6 +2344,8 @@ | |
| 2344 | 2344 | _nppGUI._fileAutoDetection = cdAutoUpdateGo2end; |
| 2345 | 2345 | else //(!strcmp(val, "no")) |
| 2346 | 2346 | _nppGUI._fileAutoDetection = cdDisabled; |
| 2347 | ||
| 2348 | _nppGUI._fileAutoDetectionOriginalValue = _nppGUI._fileAutoDetection; | |
| 2347 | 2349 | } |
| 2348 | 2350 | } |
| 2349 | 2351 | } |