Author Topic: Looking for Refresh file list "Icons" command  (Read 15706 times)

hlhp

  • Junior Member
  • **
  • Posts: 24
    • View Profile
Looking for Refresh file list "Icons" command
« on: January 06, 2019, 15:42:50 »
When changing Folder icon to different ones.

The refresh would not update the icons,
but when I open and close "file type setup" window, then it will update.

If I want to create a script to do the "refresh", what command should I use? :)

AlanJB

  • VIP Member
  • *****
  • Posts: 436
  • VERY old Programmer
    • View Profile
Re: Looking for Refresh file list "Icons" command
« Reply #1 on: January 06, 2019, 17:30:08 »
After your updates, try hitting Shift+F2 (force refresh).

hlhp

  • Junior Member
  • **
  • Posts: 24
    • View Profile
Re: Looking for Refresh file list "Icons" command
« Reply #2 on: January 06, 2019, 17:54:56 »
It does not show the updated result either.

Also tried following custom commands in using Button-Editor, none of them work.

MC.Explorer.Refresh
MC.Explorer.Refresh AUTO
MC.Explorer.Refresh FORCEREBUILD
MC.Explorer.Refresh FORCEUPDATE
MC.Explorer.Refresh REDRAWUI
MC.Explorer.Refresh UPDATEUICACHE

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: Looking for Refresh file list "Icons" command
« Reply #3 on: January 07, 2019, 22:02:37 »
Icons are a slow process to fetch, so they are cached because they almost never change.

Type ":cic" in the command line field to clear the icon cache.


hlhp

  • Junior Member
  • **
  • Posts: 24
    • View Profile
Re: Looking for Refresh file list "Icons" command
« Reply #4 on: January 08, 2019, 05:05:01 »
Icons are a slow process to fetch, so they are cached because they almost never change.

Type ":cic" in the command line field to clear the icon cache.

Thank you ;D
:cic works smoothly.

It seems need to be refresh for redraw the icons.
But the refresh function only refresh the current Active panel's active tab.

I end up this long script if I need to refresh all the tabs.
Is there a way to simplify the code?

Code: [Select]
//Clear Icon Cache
MC.CmdLineRun CMD=:cic;

//Refresh tabs for active Panel
@var $numTabs = TabCount("active");
@var $n;
for( $n = 0; $n < $numTabs; $n++ )
{
  MC.Explorer.Refresh;
  MC.SetActiveTab PANEL=ACTIVE TAB=NEXT;
}

//Go to inactive panel refresh tabs and come back
MC.SetActivePanel PANEL=TOGGLE;
$numTabs = TabCount("active");
for( $n = 0; $n < $numTabs; $n++ )
{
  MC.Explorer.Refresh;
  MC.SetActiveTab PANEL=ACTIVE TAB=NEXT;
}
MC.SetActivePanel PANEL=TOGGLE;