Tracker-Layout has landed!

Blog post by waddlesplash on Tue, 2015-01-27 22:00
tracker_layout — the (semi)famous branch that rewrites Tracker to use the Layout Kit — has been merged. This means that Tracker is no longer using the old B_FOLLOW_*-based system for resizing views, which makes for much cleaner code that's easier to read and understand. Alexandre Deckner initially did this in 2012, but due to refactors and other changes to Tracker since then, as well as some compatibility issues with his method, it wasn't possible to merge his code. After realizing this in mid-December, I started the work to move Tracker to layouts that was just merged today.

Moving Tracker to layouts is primarily an under-the-hood change that end-users shouldn't notice, but it means a lot for Tracker. The old system relied on various snippets of code spread across the various Tracker windows (the desktop, the main file browsing window, the "Open with..." window, the file panel...) to place all the views on the screen with the expected dimensions and positions. Some of these snippers were really hacks, such as modifying the resizing mode of some views every time the window was resized, child views rearranging siblings so that they all fit, and intercepting hide/show events for other views to keep the scrollbars in the right places. So as of hrev48734, all the windows and views in Tracker that display a file listing of any kind are moved over to the Layout Kit (with the exception of the file panel & the desktop, which can't be migrated to layouts without breaking BeOS compatibility. That's okay for now, though, as moving all the other windows to layouts allows simplifying these two a lot.) There are still some very minor spacing issues to be cleaned up, but nothing that's really noticeable unless you really look closely.

But moving Tracker to layouts did provide one big benefit: the navigation toolbar could be moved off of the old BeOS bitmap-icon-based toolbar onto the new vector-icon-based toolbar that ShowImage and WebPositive use:
beforeafter


Try out the improved Tracker, report any bugs you find, and let me know what you think in the comments!

Comments

Re: Tracker-Layout has landed!

Did the grab icon at the right of the menu go missing? (it seems to be in the screenshot). That's an important feature, please get it back :) Thanks for working on this in any case, it sure helps with future improvements.

Re: Tracker-Layout has landed!

in hrev48739 the icon is there. I have never tested that before. did it have any menus or only drag?

Re: Tracker-Layout has landed!

Odd, it doesn't appear in that screenshot, but it appears here for me. I must've had some setting disabled when I took that screenshot.

Re: Tracker-Layout has landed!

Good work! Eager to test it now!
Hopefully the navigator-preferences will be stored now!?
For what was the grab-icon suposed to be? Find the target folder?

Re: Tracker-Layout has landed!

This icon can be dragged onto other applications. For example you can drag it onto a BFilePanel to quickly browse to that folder, or you can drag it to MediaPlayer to play all the files from the folder (especially useful with queries). This can also be used with ShowImage (also with queries), and so on.

Re: Tracker-Layout has landed!

Or make a copy of all the files in that directory :) oh and if you like to update your system.. use this :) https://www.haiku-os.org/guides/daily-tasks/updating-system

Re: Tracker-Layout has landed!

Where I click to send to you a huge ***THANK YOU FOR ALL*?

This is the feature that I'm expecting a lot.

Re: Tracker-Layout has landed!

Waddlesplash, thank you for your hard work!

Are you planing too look into the Tracker icon view mode? The sorting and positioning algorithm is a horrible misconception (from my viewpoint). Can you maybe check that too? I would like to see a nice sorting algorithm, what positioning the icons in a standard grid, and don't do any calculation with the file name. Oh, and it would be cool to have an auto-order option too. My icons just flying away...
Look here, the Application windows is a nice example: http://toastytech.com/guis/hka1tracker.png

Bye!
Z.

Re: Tracker-Layout has landed!

You can sort the icons alphabetically with Alt+Shift+K, and align the icons with Alt+K.

Re: Tracker-Layout has landed!

Waddlesplash, great work! Hope that you'll receive the commit access soon, you deserve it :).

Re: Tracker-Layout has landed!

Hey waddlesplash! Nice work! I hope some of the actual refactorings can be merged over at some later point. I think Tracker is great, but it is really missing some important features (like automatic foto thumbnails). These seem hard to implement without some more radical refactoring. Would be nice...

Re: Tracker-Layout has landed!

Thanks, stippi! I'm not sure if the refactorings will be able to be merged, and I don't really understand his goals / ideas anyway. But automatic photo thumbnails is something John has in WIP (I've seen screenshots anyway), I hear he just hadn't decided where the thumbnail-creating-logic should go (he was undecided between a new daemon, some old daemon, and Tracker itself).

Re: Tracker-Layout has landed!

Lookin' good! You might want to check the orange up arrow. I think it used to move the user up one directory level after another, all the way to the root if they wanted. Now, it seems more like a history button, and in my testing, I wasn't able to keep "cd'ing" all the way up the directory structure.

Re: Tracker-Layout has landed!

If you were in a subfolder of Desktop, then yes, you would not be able to get all the way up the directory structure. That's a known bug.