When upgrading from v5.19.108.1602x64 (latest release) to v5.19.527.1731x64 (current release candidate) I expect to only update the Notepad3.exe, and keep existing configuration in the ini-file.
The newer version of Notepad3 correctly updates the [Settings]SettingsVersion from 1 to 2, and takes the existing configuration, storing it into the new [Settings2] section. However, it doesn't correctly handle the old configuration in the [Toolbar Images] section.
I have never touched that section, nor did I have any idea of what it does, didn't even know that it exists. It was not my choice or conscious decision to have setting in there be this way:
BitmapDefault=Toolbar.bmp
BitmapHot=ToolbarHot.bmp
BitmapDisabled=ToolbarDisabled.bmp
Those settings were probably there from an older version of Notepad3, since I always carry on my settings ini-file, having no desire to go through the settings after every installation.
I have always relied on the Notepad3 UI to make configuration changes, and so when I want it to display a HiDPI toolbar, that's what I use - the GUI menu. This leads to me experiencing issues like described here: https://github.com/rizonesoft/Notepad3/issues/1137#issuecomment-496171636
The proposed solution is to comment out or delete the [Toolbar Images] section.
However, in my opinion Notepad3 could have done that automatically, if all the users are going to have this problem. I propose to detect whether the mentioned section has exactly the contents I quoted. If so, that would strongly suggest that the user didn't mess with it in any way at all, so it can be commented out during the ini-file upgrade from version 1 to version 2.
Hello @AlexIljin
Please, check the "Pristine" Notepad3.ini, I've provided you : https://github.com/rizonesoft/Notepad3/issues/1137#issuecomment-486825039 ,
These settings are correctly commented ! 馃
[Toolbar Images]
;BitmapDefault=Toolbar.bmp
;BitmapHot=ToolbarHot.bmp
;BitmapDisabled=ToolbarDisabled.bmp
Please, "be indulgent to us", all the people here are volunteers and Notepad3 is not our livelihood. 馃槈
We try hard to preserve and transform old (Notepad3) configuration/settings.
This is the reason why we introduced a versioning (SettingsVersion=2 has nothing to do with [Settings2]), so Notepad3 knows how to interpret values of certain keys, which have a meaning change for newer versions (e.g. Zoom Factor).
[Toolbar Images] settings have been in the configuration since the beginning of Notepad3 and the default are commented out.
For a long time, this was a "read-only" setting, which has to be changed manually.
A new feature is to "Load Toolbar images" via Toolbar Menu.
Once loaded, the setting (paths to new images) is written to this section. And so they are preferred on next restart of Notepad3.
The bug is, switching to build-in toolbars (HighDPI or Small) does not delete the Settings of this section, so they are reloaded the next time. I will fix this ...
Please, "be indulgent to us", all the people here are volunteers and Notepad3 is not our livelihood.
Of course, I'm not trying to be pushy, or anything. In fact, I consider creating good quality issue reports to be my voluntary contribution to the project. It's up to you if you act on them or not, of course: what you consider to be the actual issue, and whether you have the energy to fix all the nitpickings I produce.
That's why it took me about a month to return to this topic: too much stuff at work. But I still try to do my part and not leave it and forget about it. For the benefit of the users who'll try to go my way and upgrade their installation with such an ini-file present.
You are doing a great job, guys, keep it up!
We try hard to preserve and transform old (Notepad3) configuration/settings.
This is the reason why we introduced a versioning (SettingsVersion=2has nothing to do with[Settings2]), so Notepad3 knows how to interpret values of certain keys, which have a meaning change for newer versions (e.g. Zoom Factor).
It's a cool idea either way. I may want to use it for the project I'm currently working on. It also has configuration based on ini-files, and their structure sometimes has to be adapted to the structural extensions of the application. I'm kinda surprised it hasn't been invented at my workplace.
[Toolbar Images]settings have been in the configuration since the beginning of Notepad3 and the default are commented out.
Sorry, I didn't know that. Maybe I did mess with it at some point. Or maybe I started with an empty ini-file one day, and then Notepad3 wrote that section without the comments. I can't remember, because I've been using this app for years and years.
For a long time, this was a "read-only" setting, which has to be changed manually.
A new feature is to "Load Toolbar images" via Toolbar Menu.
Once loaded, the setting (paths to new images) is written to this section. And so they are preferred on next restart of Notepad3.
The bug is, switching to build-in toolbars (HighDPI or Small) does not delete the Settings of this section, so they are reloaded the next time. I will fix this ...
Cool!
Please test beta version _5.19.527.1733_RC (see beta-channel access #1129).
Once an external Toolbar bitmap has been loaded, you can cycle through all three Toolbars using the toggle menu entry. The correct last setting should be saved and restored on startup.
Tested Notepad3 (64-bit) v5.19.527.1733 RC
If the keys values in [Toolbar Images] are un-commented on, the "Toolbar" switches correctly between 3 sets of Toolbar icons instead of 2 sets.
Load Toolbar Theme... also allows you to correctly choose the location of custom Toolbar icons. 馃憤
Edit :
@RaiKoHoff
Load Toolbar Theme... uses them and add parameters (path..)Load Toolbar Theme... add 3 new keys with parameters (path..) and the 3 commented keys remain in the section. Question: Is this behavior "As Designed"?
@hpwamr : Notepad3 does not know about comments in the .ini-file, so it does not touch them.
Maybe it is better to deliver a "default" .ini-file with "non-commented" keys= having no value instead of the commented ones. :thinking:
Maybe it is better to deliver a "default" .ini-file with "non-commented"
keys=having no value instead of the commented ones. 馃
It's certainly an idea to develop and test. 馃
But from another point of view, the commented keys give a very good indication of the type of information expected and the defaul value of these keys, which is also very interesting (a kind of mini help) ! 馃槂
Here an example of "Settings.ini" file with less commented lines: Notepad2e.ini
Sorry, I only think of the section [Toolbar Images]:
[Toolbar Images]
BitmapDefault=
BitmapHot=
BitmapDisabled=
Currently the commented defaults for this section are wrong:
the defaults are "empty" values for all the Bitmap-Keys!
This issue is no longer reproduced in Notepad3 (64-bit) v5.19.815.2595.
Thank you for the fix!
Most helpful comment
Sorry, I only think of the section [Toolbar Images]:
Currently the commented defaults for this section are wrong:
the defaults are "empty" values for all the Bitmap-Keys!