Save/Restore Tool Views order
ClosedPublic

Authored by antonanikin on Oct 10 2016, 10:59 AM.

Details

Summary

The patch provides save/restore mechanism for Tool Views panels. Current version produce random order at each start of KDevelop which seems to be "not right" behavior. New version provide save/restore mechanism, which uses Tool Views factory ids to store order - now it independent from current UI language. Also the patch adds new actions to Tool View context menu which provides simple way to change order.

Test Plan

Tested on master branch.

Diff Detail

Repository
R33 KDevPlatform
Branch
Save/Restore_Tool_Views_order_(D3002)
Lint
No Linters Available
Unit
No Unit Test Coverage
antonanikin retitled this revision from to save/restore Tool Views order.
antonanikin updated this object.
antonanikin edited the test plan for this revision. (Show Details)
antonanikin added a reviewer: mwolff.
antonanikin set the repository for this revision to R33 KDevPlatform.
antonanikin added a subscriber: kdevelop-devel.
antonanikin planned changes to this revision.Nov 1 2016, 10:25 AM
antonanikin retitled this revision from save/restore Tool Views order to Save/restore Tool Views order.Nov 2 2016, 4:56 AM
antonanikin retitled this revision from Save/restore Tool Views order to Save/Restore Tool Views order.
antonanikin updated this revision to Diff 7809.Nov 2 2016, 5:00 AM

Update to master

antonanikin planned changes to this revision.Nov 2 2016, 5:05 AM
antonanikin updated this revision to Diff 7810.Nov 2 2016, 5:17 AM
  • Update to master
antonanikin updated this revision to Diff 7811.Nov 2 2016, 7:09 AM
  • Use factory id instead translated button name during save/restore order
antonanikin planned changes to this revision.Nov 8 2016, 3:15 AM
antonanikin updated this revision to Diff 8001.Nov 8 2016, 6:10 AM

-code cleanup
-add context menu items to change buttons order

antonanikin updated this object.Nov 8 2016, 6:19 AM
antonanikin edited the test plan for this revision. (Show Details)
antonanikin added a reviewer: KDevelop.
antonanikin edited the test plan for this revision. (Show Details)Nov 8 2016, 6:48 AM
antonanikin updated this revision to Diff 8002.Nov 8 2016, 7:05 AM

small codestyle fixes

apol added a subscriber: apol.Nov 8 2016, 11:21 AM

Wouldn't it be better to have some kind of drag&drop?

Wouldn't it be better to have some kind of drag&drop?

Yes, but I don't have good "drag&drop skills" :) Milian Wolff's answer (in mail list, 07.10.16):

If you think reordering is required, I'd implement it using drag'n'drop of the toolviews.

But Millian not react on this revision, maybe it has no free time for this :(

brauch added a subscriber: brauch.Nov 15 2016, 7:34 AM

+1 on the save/restore order part, that makes sense.

But I agree with Milian, if we want re-ordering (which I'm actually not sure about, I never felt the need for it), context menu actions are not the way to go. They are clunky to use and make the menu crowded.

remove context menu items

brauch accepted this revision.Nov 17 2016, 6:58 PM
brauch added a reviewer: brauch.

Nitpicks:

  • some things could be const auto&, esp. in loops
  • in my (and other people around kdev) preference, always write { } even for one line

Otherwise, +1, thanks!

This revision is now accepted and ready to land.Nov 17 2016, 6:58 PM
antonanikin updated this revision to Diff 8591.Nov 29 2016, 4:30 AM
antonanikin edited edge metadata.

small codestyle fixes

  • some things could be const auto&, esp. in loops
  • in my (and other people around kdev) preference, always write { } even for one line

Ok, fixed. I prefer {} for one-line loops, but in first revisions I tied to follow current style from source file.

This revision was automatically updated to reflect the committed changes.