#7051: Deskbar doesn't remember your expanded items when you switch modes ------------------------------------+---------------------------- Reporter: jscipione | Owner: axeld Type: enhancement | Status: new Priority: normal | Milestone: R1 Component: Applications/Deskbar | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 1 | Platform: All ------------------------------------+---------------------------- Comment (by jscipione): Replying to [comment:7 axeld]: > Replying to [comment:5 jscipione]: > > Replying to [comment:4 axeld]: > > > Is there any reason I don't see that the expanded list is static? > > I assume that you mean in my patch. sExpandedItems is declared static in BarView.h > > What else could I possibly mean, anyway? Do you also have an answer for me? :-) I don't know what else you could mean but I did answer your question I thought. sExpandedItems is declared static in BarView.h. Is that not good enough? Do I have to declare it static in BarView.cpp as well? > I don't really like the solution for #4830, it looks like a hack (directly accessing TBarView members), and seems out of place. I would rather like a callback like TBarView::TeamAdded() or something to that effect. I guess it is kind of a hack to directly access the sExpendedItems from BarApp.cpp but I figured that a callback function would be overkill. Let me make another iteration of the patch that fixes this issue. I can make sExpandedItems private to BarView again if I use a callback method. Accessing the sExpandedItems member variable directly aside I am happy with the solution to #4830. It doesn't require any special functions to be written, just a simple check for the flag when BarView is created and add Tracker's signature to the list so that it gets expanded. Thanks for looking at my patch and for your input axeld. -- Ticket URL: <http://dev.haiku-os.org/ticket/7051#comment:8> Haiku <http://dev.haiku-os.org> Haiku - the operating system.