TC7rc5 - Wrong icon displayed in button bar

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

TC7rc5 - Wrong icon displayed in button bar

Post by *white »

  • Right click an icon on the button bar and select "Change" to open the change single button dialog.
  • Change icon file into "" (empty) and press Enter.
  • Now the icons of C:\WINDOWS\explorer.exe are displayed.
    (When the dialog change button bar is used, no icon file is used and no icons can be chosen so a separator is shown.)
  • Select an icon number other than 0 and click on the OK button.
  • Icon number 0 is used.
    (In TC 6.56 icon number other than 0 is displayed correctly, but icon number 0 is displayed as a separator.)
My OS: Windows 98
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

white wrote:Now the icons of C:\WINDOWS\explorer.exe are displayed.
Cannot confirm on WinXP SP2. The empty list is displayed here.

<ADDED>
In the meantime, I'll try to install Win98 on a virtual machine and check there...
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Cannot confirm either, I tested on Windows 98 and Windows 98 SE, and also on Windows 2000.

How did you change the file into ""? I tried
- to pres DEL (empty line)
- to type "" (two double quotes)

In both cases, I got an empty Icon list after pressing ENTER. I also tried pressing TAB instead of ENTER, and also closing the dialog box with a click on OK, but I never got the icons from Explorer.

What did you have in the "Command" field? I tried with
- notepad.exe
- c:\windows\notepad.exe
- an internal command
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote: How did you change the file into ""? I tried
- to pres DEL (empty line)
- to type "" (two double quotes)
Both will do.
ghisler(Author) wrote: In both cases, I got an empty Icon list after pressing ENTER. I also tried pressing TAB instead of ENTER, and also closing the dialog box with a click on OK, but I never got the icons from Explorer.
Tab or Enter will do. See this screen shot.
ghisler(Author) wrote: What did you have in the "Command" field? I tried with
- notepad.exe
- c:\windows\notepad.exe
- an internal command
All will do.


Windows version: Microsoft Windows 98 4.10.1998A (Security Version)
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Well, I've checked on Windows 98 4.10.2222 - and, again, the explorer.exe icons are not shown when the field is empty...
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Did you check the change single button dialog or the change button bar dialog?
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

white wrote:Did you check the change single button dialog or the change button bar dialog?
The "single button".
Just in case I checked the "change button bar" dialog too - behaviour is the same.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Flint wrote:
white wrote:Did you check the change single button dialog or the change button bar dialog?
The "single button".
Just in case I checked the "change button bar" dialog too - behaviour is the same.
OK, you checked the right one.
I discovered some more.

When I enter the icon file name "explorer" (with or without quotes) the same problem occurs.

If I enter "explorer" or "" (quotes) in the change single button dialog and then open the change button bar dialog "explorer" or "" is automatically replaced by "C:\WINDOWS\explorer.exe". Icons to choose from are displayed. If I then click on OK the full file name is saved and the correct icon is displayed.

If I enter nothing (no quotes) in the change single button dialog and then open the change button bar dialog the nothing is NOT automatically replaced by "C:\WINDOWS\explorer.exe". The icon file name still lists nothing. No icons to choose from are displayed. If I then click on OK you would expect the separator to be displayed in the bar. But nothing is changed. When I had chosen an icon number > 0 in the change single button dialog, TC7rc5 shows the first icon of explorer and TC 6.56 shows the correct icon number.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

white,
Now the icons of C:\WINDOWS\explorer.exe are displayed.
Cannot reproduce on XP SP2.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

white wrote: If I enter "explorer" or "" (quotes) in the change single button dialog and then open the change button bar dialog "explorer" or "" is automatically replaced by "C:\WINDOWS\explorer.exe".
If I enter "explorer" or "" (quotes) directly in the change button bar dialog and press Enter or Tab, "explorer" or "" is also automatically replaced by "C:\WINDOWS\explorer.exe".
Hacker wrote: Cannot reproduce on XP SP2.
Apparently my Windows 98 system is more advanced ;-)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Very strange - so either ExtractIcon returns the icons of Explorer when passing it an empty string, or FindExecutable returns the name of Explorer for an empty string.

I will check for an empty string and just clear the dialog box. This will not fix the problem if the user manually enters two double quotes "", but I think that it's only a minor problem in this case.

Btw, do you get the same problem in the "change button bar" dialog?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:Very strange - so either ExtractIcon returns the icons of Explorer when passing it an empty string, or FindExecutable returns the name of Explorer for an empty string.
I have created a little test program in Delphi 2. Results:
* ExtractIcon does NOT return the icons of Explorer when passing it an empty string
* FindExecutable DOES return the name of Explorer for an empty string

It seems I have an updated version of shell32.dll
My version: 4.72.3812.600
ghisler(Author) wrote: Btw, do you get the same problem in the "change button bar" dialog?
In the "change button bar" dialog, if I enter an empty string NO icons of explorer are shown. If I enter an empty string between quotes or if I enter "explorer" it is replaced by the full file name of explorer and further works as can be expected.
So in the "change button bar" dialog I have no problem. If the "change single button" dialog would work the same way as the "change button bar" dialog, the problem is solved.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for your research! I will add some code to work around the FindExecutable bug.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5784
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote: I will check for an empty string and just clear the dialog box. This will not fix the problem if the user manually enters two double quotes "", but I think that it's only a minor problem in this case.
Tested in TC 7.0 Final. Fixed.

Still a minor issue when the user manually enters two double quotes "" or when the user enters "explorer". It would be nice if this was handled the same way it is handled in the "change button bar" dialog where the double quotes "" or "explorer" are replaced by "C:\WINDOWS\Explorer.exe".
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, as I wrote, I did not change the case of "".
Author of Total Commander
https://www.ghisler.com
Post Reply