geany-plugins icon indicating copy to clipboard operation
geany-plugins copied to clipboard

[Tree Browser ] Refresh is not working

Open zhaolinlau opened this issue 3 years ago • 18 comments

OS: Windows 11 Geany Version: 1.38.0 Plugin: Tree Browser

Problem: After I deleted a file from outside the Geany, the list of tree browser not being refreshed even I click refresh.

image

zhaolinlau avatar Sep 08 '22 00:09 zhaolinlau

The TreeBrowser plugin does not monitor file changes and so does no automatic reload.

With manual refresh using the toolbar button it works as expected, also on Windows.

How exactly did you trigger the reload? Your screenshot shows you do not use the toolbar.

eht16 avatar Sep 11 '22 12:09 eht16

The TreeBrowser plugin does not monitor file changes and so does no automatic reload.

With manual refresh using the toolbar button it works as expected, also on Windows.

How exactly did you trigger the reload? Your screenshot shows you do not use the toolbar.

What I am going to mean is the result still the same even I click the refresh as below. Which means the refresh function of the plugin itself is not functioning.

image

zhaolinlau avatar Sep 11 '22 12:09 zhaolinlau

And now I use Project Organizer instead, it works pretty good.

zhaolinlau avatar Sep 11 '22 12:09 zhaolinlau

The TreeBrowser plugin does not monitor file changes and so does no automatic reload. With manual refresh using the toolbar button it works as expected, also on Windows. How exactly did you trigger the reload? Your screenshot shows you do not use the toolbar.

What I am going to mean is the result still the same even I click the refresh as below. Which means the refresh function of the plugin itself is not functioning.

image

And the open terminal function is not working too.

zhaolinlau avatar Sep 11 '22 12:09 zhaolinlau

The TreeBrowser plugin is such fun...

The "Open Terminal" problem is already reported in #556 and a fix is in #973.

For the refresh: I noticed the toolbar button behaves completely different from the menu refresh item. The toolbar button rebuilds the tree completely and resets some of its state. The menu item however works only when used on a directory and then only this directory is refreshed. If used on a file, nothing happens (as you noticed).

I'll have a look if there is an easy way to fix this.

For the curious, this behavior exists since 2010.

eht16 avatar Sep 11 '22 14:09 eht16

I'll have a look if there is an easy way to fix this.

Just start the systems default file manager and get a proper one ;-)

elextr avatar Sep 11 '22 14:09 elextr

The "Open Terminal" problem is already reported in #556 and a fix is in #973.

So the PR of the "Open Terminal" has not being merged yet right?

zhaolinlau avatar Sep 11 '22 14:09 zhaolinlau

I'll have a look if there is an easy way to fix this.

Or just add the "Open Terminal" as new feature for the Project Organizer plugin instead of fixing the refresh of the Tree Browser plugin? lmao

zhaolinlau avatar Sep 11 '22 14:09 zhaolinlau

So the PR of the "Open Terminal" has not being merged yet right?

Probably because the plugin in reality is abandoned, the maintainer hasn't contributed since 2018 AFAICT.

Or just add the "Open Terminal" as new feature for the Project Organizer plugin

Better create a separate issue for that, remember each plugin has its own maintainer.

elextr avatar Sep 11 '22 14:09 elextr

Probably because the plugin in reality is abandoned, the maintainer hasn't contributed since 2018 AFAICT.

I see

Better create a separate issue for that, remember each plugin has its own maintainer.

Alright

zhaolinlau avatar Sep 11 '22 14:09 zhaolinlau

#1195 might fix it well enough for the next 10 years, I hope. For testers, this is not Windows specific, we have the same weird behavior on Linux.

Ideally, anyone will rewrite the plugin before from scratch.

@zhaolinlau if you are curious, you could test the attached treebrowser.dll by copying it into your Geany installation (usually c:\program files\geany\lib\geany, there should be already a file treebrowser.dll which you need to replace but save the old one elsewhere). Then restart Geany.

I'm not completely sure whether the file will work, it might produce an error on startup. My Windows build environment changed since the 1.38 release a bit, so it might not be compatible anymore. issue1194_treebrowser.zip

If it works, this .dll has also the "Open Terminal" fix from #973 and it would great if you could test it as well.

eht16 avatar Sep 11 '22 15:09 eht16

I'm not completely sure whether the file will work, it might produce an error on startup. My Windows build environment changed since the 1.38 release a bit, so it might not be compatible anymore. issue1194_treebrowser.zip

So I downloaded the zip u gave and tested it, the result is the Tree Browser plugin straight disappear from the plugin manager hmm...

zhaolinlau avatar Sep 11 '22 15:09 zhaolinlau

Ah, too bad. Then it is not compatible anymore. Maybe I'll manage to create a full build in a few days.

eht16 avatar Sep 11 '22 15:09 eht16

Ah, too bad. Then it is not compatible anymore. Maybe I'll manage to create a full build in a few days.

Sah bruh

zhaolinlau avatar Sep 11 '22 15:09 zhaolinlau

It way longer than expected but finally here we are: https://download.geany.org/snapshots/geany-1.39pr973%2B1195_setup.exe https://download.geany.org/snapshots/geany-plugins-1.39pr973%2B1195_setup.exe

@zhaolinlau would you mind installing these two (they will replace your previous Geany installation) and give it a try? As above, the plugins installer contains the TreeBrowser fixes for #973 and #1195.

One more note: the installers contain the current GIT master code (except for the mentioned PRs) and so the new version will move some settings of your Geany configuration file into a new session.conf. You should not notice this but in case you want to switch back to the old version, everything stored in the session.conf will be ignored by the old version. Maybe just make a backup of your current configuration (should be in C:\Users\<username>\AppData\Roaming\geany).

eht16 avatar Oct 16 '22 14:10 eht16

It way longer than expected but finally here we are: https://download.geany.org/snapshots/geany-1.39pr973%2B1195_setup.exe https://download.geany.org/snapshots/geany-plugins-1.39pr973%2B1195_setup.exe

@zhaolinlau would you mind installing these two (they will replace your previous Geany installation) and give it a try? As above, the plugins installer contains the TreeBrowser fixes for #973 and #1195.

One more note: the installers contain the current GIT master code (except for the mentioned PRs) and so the new version will move some settings of your Geany configuration file into a new session.conf. You should not notice this but in case you want to switch back to the old version, everything stored in the session.conf will be ignored by the old version. Maybe just make a backup of your current configuration (should be in C:\Users\<username>\AppData\Roaming\geany).

alright I'll try

zhaolinlau avatar Oct 16 '22 15:10 zhaolinlau

@eht16 it works now, but maybe it's abit not that convenient if compare with project organizer because have to manually click to refresh

zhaolinlau avatar Oct 16 '22 16:10 zhaolinlau

@eht16 it works now,

Great, thanks for testing.

but maybe it's abit not that convenient if compare with project organizer because have to manually click to refresh

That's a whole another story :). The TreeBrowser plugin is rather old and not really maintained (while I worked on this and the other issue, I won't implement new features or change its behavior, I don't even use the plugin). So, either just use the ProjectOrganizer plugin or open a new issue for the change in behavior.

eht16 avatar Oct 16 '22 16:10 eht16