Add Tab Pinning Feature
ClosedPublic

Authored by martinkostolny on Feb 4 2018, 8:14 PM.

Details

Reviewers
nmel
asensi
Group Reviewers
Krusader
Summary

Pinned tab is a locked tab with temporarily changeable address. It resets to pinned address on tab reactivation.

This feature is inspired by Total Commander's Lock tab with changeable address.

Requested by several users. See krusader-users mailing list: https://groups.google.com/forum/#!topic/krusader-devel/wp05sopv1SU

I've simplified occasional parts of code and also added "lock" and "pin" icons to the tab context menu actions.

Test Plan
  • pin a tab, browse in it, activate another tab in the same panel, reactivate pinned tab -> it should return to the pinned address
  • pin a tab, restart Krusader -> pinning should still be active, same for saved profiles
  • pin a tab, change directory in it, duplicate it -> check that original tab stays pinned and its title is not changed, check that duplicated tab is not pinned and its path is correct (meaning - not the pinned one)

Diff Detail

Repository
R167 Krusader
Branch
pinned-tabs-arc
Lint
No Linters Available
Unit
No Unit Test Coverage
martinkostolny requested review of this revision.Feb 4 2018, 8:14 PM
martinkostolny created this revision.
martinkostolny retitled this revision from Add Tabs Pinning Feature to Add Tab Pinning Feature.Feb 4 2018, 8:18 PM
martinkostolny edited the summary of this revision. (Show Details)
martinkostolny edited the test plan for this revision. (Show Details)
martinkostolny edited the summary of this revision. (Show Details)
martinkostolny planned changes to this revision.Feb 5 2018, 2:28 PM

During today I've found an issue: duplicating pinned tab (when its address is already temporarily changed) will result in a new tab with pinned address of the source tab instead of the current address. On top of that source tab gets changed title to its current address - this should never happen. I'll fix that and update the diff. Please wait :).

martinkostolny updated this revision to Diff 27461.EditedFeb 18 2018, 11:58 AM

Add Tab Pinning Feature - fix tab duplication. I have also removed a few commented lines of code from panelmanager. The diff update is rebased to current master.

martinkostolny edited the test plan for this revision. (Show Details)Feb 18 2018, 12:04 PM
martinkostolny added a project: Krusader.
nmel requested changes to this revision.Feb 27 2018, 6:25 AM
nmel added a subscriber: nmel.

Very solid code, Martin - thanks for your work!
I only reviewed the code. Planning to test the feature this week. IMO, it should be definitely included into the upcoming release.

krusader/Panel/listpanel.h
263

Please move value initialization to constructor.

krusader/actionsbase.cpp
49

It would be nice if you add () around new like on line 47.

krusader/paneltabbar.cpp
145

I think this comment actually belongs to setPanelTextToTab in a modified form. At least, it's not relevant here - no direct logic related to pinned tabs.

This revision now requires changes to proceed.Feb 27 2018, 6:25 AM

Thanks for code review, Nikita :). I'm updating the diff - worked in your suggestions and rebased to master.

martinkostolny marked 3 inline comments as done.Feb 28 2018, 12:17 AM
nmel accepted this revision.Mar 4 2018, 4:19 AM

Thanks Martin! I just tested the feature - it works without a glitch. I'm happy that it will be a part of v2.7! Keep up a good work.

This revision is now accepted and ready to land.Mar 4 2018, 4:19 AM
asensi accepted this revision.Mar 10 2018, 6:58 PM
asensi added a subscriber: asensi.

Thank you, Martin! (and Nikita :-)! For my part, my performed tests (using Kubuntu 17.10) went alright, including those already mentioned tests:

  • pin a tab, browse in it, activate another tab in the same panel, reactivate pinned tab -> it should return to the pinned address
  • pin a tab, restart Krusader -> pinning should still be active, same for saved profiles
  • pin a tab, change directory in it, duplicate it -> check that original tab stays pinned and its title is not changed, check that duplicated tab is not pinned and its path is correct (meaning - not the pinned one)

Other people can do their checks :-)

Nikita, Toni, thanks a lot for checking and testing! :)

I'm closing this manually since it was not triggered automatically by push.