Save FileBrowser root folders if it is visible.
When loading a session file (from menu or via the command line),
launch a FileBrowser from scratch and add folders from the file to it.
When loading an auto-saved session, ignore saved FileBrowser folders.
Store roots and selected item of FileBrowser in a Session class.
Add "FileBrowser" node to session XML.
It containts "latestSelectedItem" attribute and "root" child nodes.
This structure corresponds to the one from "config.xml".
Current save session behavior for Folder as Workspace (FaW) is like this:
1. FaW isn't opened, checkbox is greyed-out -> FaW info is not saved in session
2. FaW is opened, checkbox isn't checked -> FaW info isn't saved in session
3. FaW is opened, checkbox is checked -> FaW info is saved in session
Load session behavior:
1. FaW isn't open, session without FaW info -> FaW isn't shown after loading
2. FaW isn't open, session with FaW info -> FaW is shown after loading
3. FaW is open, session without FaW info -> FaW is kept as is without changes
4. FaW is open, session with FaW info -> FaW is shown with new directories from session
Fix#9165, close#9286
1. Added xml syntax check via python script just for the win32 debug build because there already the functionlist check happens.
2. Fixed an issue found for perl.
Fix#9330, close#9339
Follow-up for these commits:
* Make UI text consistent regarding search results (f5dcfc196a)
Note: Diff of this PR is smaller than the commit above, but it's OK. Japanese translation was already translated correctly.
* Add ellipsis to Rename and Print on tab bar context menu (1961f708c1)
* Add tooltips for Folderas Workspace 3 commands (070630a243)
* Prevent names of untitled tabs from duplication (f75f8b8d40)
* Update English file with missing strings (a7f866b89e)
* Add context menu with "Copy link" ability (d155f0326a)
* Add GUI in preferences dialog for adding URI customized schemes (4b29971168)
* Create new Margin/Border/Edge sub-page in Preferences (053266c706)
* Add an option for displying constant line number width (c9c2d1e376)
* Make "Line" preceding each line number on Search Results translatable (e3455a0f7e)
* Make "total documents number" feature in Window dialog translatable (0546f75a71)
Close#9111
Enhance ghost typing command line argument feature by changing its format:
With it's new format -qX="string contains white space" (where X is 't', 'n' or 'f'), the white spaces can be contained between double quote, so no need to use %20 anymore for substituting white spacees.
Currently the settings directory could be:
1. Notepad++ installation dir if doLocalConf.xml is present.
2. %APPDATA%\Notepad++ if doLocalConf.xml is absent.
3. The path defined in \cloud\choice in Notepad++ installation or in %APPDATA%\Notepad++, it depends on the existence of doLocalConf.xml.
In this PR "-settingsDir" argument is added for overriding above settings paths:
4. Overrided by command line argument -settingsDir="E:\my NppSettings\" : All the above configurations will be ignored, Notepad++ will load (and write) config.xml and the other configuration xml files from (into) "E:\my NppSettings\". Note that double quotes is not necessary if there's no white space in the given path.
The priorities are: 1. -settingsDir 2. Cloud 3. %APPDATA%\Notepad++ or Notepad++ installation dir.
If the given path "E:\my NppSettings\" is not a valid directory (it doesn't exist or it's a file), this argument is ignored and the settings dir will fall back to Cloud (or to %APPDATA%\Notepad++ or Notepad++ installation dir, if settings on Cloud is not defined).
Close#4696, close#9287
1. Add an option for displying constant line number width in Preferences dialog.
This option set the line number constant width according the total line number in the document (minimun 4 digits).
It ensures no unexpected visual effect while scrolling content vertically.
If the document content is modified and the total number of lines is increased or decreased, more digits will be added or removed according the number of digits in total number of lines.
2. Add new plugin messages NPPM_GETLINENUMBERWIDTHMODE & NPPM_SETLINENUMBERWIDTHMODE for getting or setting LINENUMWIDTH_DYNAMIC / LINENUMWIDTH_CONSTANT.
So plugins may send NPPM_SETLINENUMBERWIDTHMODE message with LINENUMWIDTH_CONSTANT to Notepad++ for avoiding some unexpected visual effect (while scrolling).
Fix#5670
Folder images are changed in FileBrowser::notified() when TVN_ITEMEXPANDED
is recieved. This works fine when e.g. expand/collapse using "+" button.
However, when foldAll() or expandAll() are called on a TreeView,
the TVN_ITEMEXPANDED is not sent. The reason is that TVIS_EXPANDEDONCE flag
is set. To reset that flag, it would be needed to pass TVE_COLLAPSERESET
to TreeView_Expand that also removes all child items which is unwanted.
Resolve the problem by notifying TreeView parent manually when recieve
TVM_EXPAND and TVIS_EXPANDEDONCE is set.
Fix#8912
The new behaviour of loading function list will be:
1. For the installer package:
Try to load from %APPDATA%\Notepad++\functionList\, if it failed, then load from %PROGRAMFILES%\Notepad++\functionList\.
In this way, users can override function list in %APPDATA%\Notepad++\functionList\ manually. Otherwise, function list won't be empty.
2. For the portable package:
- with doLocalConf.xml : Load always from <Notepad++ Dir>\functionList\
- without doLocalConf.xml : Try to load from %APPDATA%\Notepad++\functionList\, if it failed, then load from <Notepad++ Dir>\functionList\
Fix#9134
#define NPPM_GETSETTINGSONCLOUDPATH (NPPMSG + 98)
// INT NPPM_GETSETTINGSCLOUDPATH(size_t strLen, TCHAR *settingsOnCloudPath)
// Get settings on cloud path. It's useful if plugins want to store its settings on Cloud, if this path is set.
// Returns the number of TCHAR copied/to copy. If the return value is 0, then this path is not set, or the "strLen" is not enough to copy the path.
// Users should call it with settingsCloudPath be NULL to get the required number of TCHAR (not including the terminating nul character),
// allocate settingsCloudPath buffer with the return value + 1, then call it again to get the path.
Close#9168