History log of /haiku/src/apps/deskbar/BarView.cpp
Revision Date Author Comments
# df4074fb 24-Nov-2018 Augustin Cavalier <waddlesplash@gmail.com>

Remove a lot of unused constants.

Spotted by Clang. No functional change intended.


# 419bc0a2 03-Nov-2018 Axel Dörfler <axeld@pinc-software.de>

Deskbar: Made the leaf scale with the font size

* It's now a vector icon as well.
* Vertical mode doesn't look that good anymore with higher font sizes,
but I didn't understand how to do it properly.

Change-Id: I0eed0e2873b270c349dfd3af117cfcb751e590a1
Reviewed-on: https://review.haiku-os.org/671
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# efafab64 02-Nov-2018 Axel Dörfler <axeld@pinc-software.de>

Deskbar: Resizable tray

* Adds max width and height arguments to
instantiate_deskbar_(item|entry).
* Old applications just stay with a 16x16 scaled icon, though.
* All used apps within the repository are converted to the new call
besides the input_server input method icon (that will need further
API changes in the input_server).

Change-Id: I29cc439396917be2c24135888459d31364997dff
Reviewed-on: https://review.haiku-os.org/656
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 1dd1976f 03-Jan-2018 John Scipione <jscipione@gmail.com>

Deskbar: update time width based on Deskbar orientation.

Fixes #8641

To fix this bug first I had to fix a long-standing todo:
TODO: SetOrientation never gets called, fix that when in vertical mode,
we want to limit the width so that it can't overlap the bevels in the
parent view.

I made TBarView a friend class of TReplicantTray and called
fReplicantTray->fTime->SetOrientation() when switching between
horizontal and vertical mode. I could have added a setter method
instead but I didn't feel like it was worth it.

SetOrientation calls ResizedToPreferred which calls GetPreferredSize,
which resizes the text width, then it calls CalculateTextPlacement
which places the time string correctly.

Removed GetCurrentTime invocation from GetPreferredSize since that
happens in Update already. Was added in
573f748c5f8fb7ed75beb0ceb7eb097d3ab0c038 originally.

Also need to call SetOrientation in TReplicantTray::AttachedToWindow
just after creating the TTime object in order for it to resize the
time view correctly on startup in horizontal mode. It needs to know
that it is horizontal so that it will expand to fit longer than
default time string.


# 32b0035a 23-Oct-2017 John Scipione <jscipione@gmail.com>

Deskbar: Rename some methods, variables, and call method

Rename IconCount() method to ReplicantCount()

Rename fChild and child to fReplicantTray and replicantTray


# 3b8cb300 21-Oct-2017 John Scipione <jscipione@gmail.com>

Deskbar: Set app menu width to drag region width

...in vertical mode. This is a simplication that is possible because
I am confident that the drag region is the right size at this point
so we don't have to lookup the window width or app width setting.

This led to further code simplications to vertical frame sizing.
Use MenuBar frame for right dimension always because it is set even
if fTrayLocation were to be set to 0.


# c0dc265c 19-Oct-2017 John Scipione <jscipione@gmail.com>

Deskbar & PowerStatus: Realign Replicants

Added a new message constant to Deskbar kRealignReplicants which
is called to realign replicant icons. Add routing so that if you knock on
Deskbar's front door (Application) it will get routed to the right view, in
this case the repliant tray that knows how to realign replicants.

Send a message with this newly created constant in PowerStatus when
the width changes because you turned the label on or off. This makes
it so that when you show or hide the battery percentage it will not overrun
the clock.

Realign Replicants is a common case.

Fixes the rest of #8641


# 70ad5289 19-Oct-2017 John Scipione <jscipione@gmail.com>

Deskbar: Position clock & replicants better

This fixes some subtle layout issues. The replicant icon
positions and clock position has been made more consistent
in both vertical mode, and horizontal mode.

There is a fixed amount of space between the last replicant
and the clock before it wraps to next row. This now works
at different font sizes.

Use matching 3px of space between the clock and the dragger
on one side and and between the replicant and the dragger
on the other side.

Reparent ResizeControl from ReplicantTray onto DragRegion and
readjust everything.


# 6123d2dd 07-Oct-2017 John Scipione <jscipione@gmail.com>

Deskbar: Move tray past border in horizontal mode

Fixes #13711


# 1bb2e623 01-Mar-2013 John Scipione <jscipione@gmail.com>

Deskbar: variable width Deskbar in vertical mode

Feature to make Deskbar width variable via a dragger.

Resize Deskbar by clicking and dragging the mouse on the
horizontal side of Deskbar opposite the screen's edge.
(left side for default top right).

The resize dragger is hidden in horizontal mode.

Details below:
* ExpandoMenuBar is resized with rest of window.
* Rename where to whereScreen to make it clear that the variable
is in screen coordinates.
* Lock focus on window while resizing
* Resize via TResizeControl class which is based on TDragRegion
* Set default width to minimum so everything stays the same.
- don't set the width setting to 0 on quit, use the new setting.
* Set max tray width based on setting
* Make clock area a bit wider preventing replicant icons from
overrunning the clock area.
* Leave more room left of clock makes replicants wrap earlier,
leaving icon gap width between replicants and clock. Before it
would butt flush against the clock before moving down a row.
* Remove FrameMoved from TDragRegion, we are already doing this
in BarView -- no reason to do it twice.
* Need to redraw the drag region after moving or it will be half
drawn.
* Hide resize control in horizontal mode
* Add room for resize dragger when placing replicants
* Update width setting unless window is hidden
- This prevents Deskbar from being set to minimum width after it
is hidden.

Also, constrain width setting within limits but not width of the
BarView which we want to track the window width. In practice they
should be the same but it is possible for them to get out of sync
and that's okay. Obvious example of the setting and actual width
of the window being out of sync is in the hidden case.

unify dragger width and kDragWidth vars

Make drag regions pixel perfect:
* Vertical mode status tray reduced in height by 1px to match height
in horizontal mode exactly.
* move icons over by 2px in horizontal mode so that there is a bit more space
on the left and so that it matches pixel perfect with vertical mode.
- to see this quickly switch between bottom right vertical at the minimum width
and horizontal mode then notice how the icons don't move

Draw drag background then menu color when not active to get rid of drawing
glitches in horizontal mode on the top pixel.

Add some more room between last icon and clock in horizontal mode.


# b1967b10 09-Jan-2017 John Scipione <jscipione@gmail.com>

Revert "Deskbar: Scale cut-off leaf icon in horizontal mode"

This reverts commit 066137eb05fc965261d6e50f24e41b9dcf79a5a7.

Reverting while I figure out what is causing Deskbar to crash.


# 066137eb 07-Jan-2017 John Scipione <jscipione@gmail.com>

Deskbar: Scale cut-off leaf icon in horizontal mode

Fixes #8505 restoring the aesthetic integrity of the cut-off leaf.

Add vertically & horizontally centered, whole vector icon to rdef.

Reformat BarMenuTitle.h rename header guard from BARMENUTITLEH to
BAR_MENU_TITLE_H.

Created TDeskbarMenuTitle subclass which deals with Deskbar menu
item stuff like getting the icon from vector data and pushing the
leaf down a few pixels to cut off the leaf (maintaining its aesthetic
integrity).

Made TBarMenuTitle methods virtual. Remove unused expando constructor
parameter and private variable.

Add a TODO to scale the bitmap if we can't find any vector icon data.
With non-vector bitmap it behaves same as before this commit in
horizontal mode.

Adjust kMinimumTrayWidth to restore Deskbar's minimum width to its
classic value since days of yore, 143px. This, perhaps not coincidently,
is exactly the amount fit 7 replicant icons. Update constants in the
code to reflect this reality. Adjustable width coming soon.

replace dynamic_cast<TBarApp*>(be_app) with a static_cast in 1 place.


# 16c10517 09-Dec-2015 looncraz <looncraz@looncraz.net>

Deskbar: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0076 from looncraz, unmodified.


# 0fc30d89 09-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

Deskbar: Sanitize the usage of BMessage

... especially for SendMessage and SendReply.
* Delete the item's message if AddItem does not return successfully.
* Fixes #11934.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>


# b49e806d 30-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

Deskbar: minor style cleanup.


# 4f4cab95 23-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Move ExpandoMenuBar name to constructor

... instead of passing it in from BarView.


# deaae5fc 07-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Persist ExpandoMenuBar

Add private BMenu::_SetMenuLayout() method. Set TExpandoMenuBar
as a friend class in BMenu to call this method. A little hacky,
but, this keeps SetMenuLayout() from being exposed as part of
the public API.

Don't destroy and rebuild the ExpandoMenuBar when switching from
horizontal to vertical mode. Instead build the TExpandoMenuBar
when the application starts and then switch it from B_ITEMS_IN_ROW
to B_ITEMS_IN_COLUMNS by using the newly added _SetMenuLayout()
method.

When we resize from vertical to horizontal, recalc the max
menu item widths, this resizes the application menu items so
that they take up the right amount of space.

Since we no longer destroy the menu bar we no longer have to
save whether menu items are expanded or not in a separate list.
Instead we can store that information in directly in
TExpandoMenuBar. This removes a lot of code.

Fixes #9350


# a0310fc7 16-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Style fixes to TBarView::SendDragMessage


# 8afcac1b 06-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Compare signature case-insensitive


# 9f339a00 06-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Style fixes only


# 8f0935ac 13-Apr-2013 John Scipione <jscipione@gmail.com>

Whoops, hide if minimode


# 777fffe8 14-Apr-2013 John Scipione <jscipione@gmail.com>

Build the fBarMenu object in the BarView constructor

... then resize it and move it to the desired size and location on update.

* Create an fBarApp pointer and use it, this is easier than having to keep casting to TBarApp.


# 541decfa 14-Apr-2013 John Scipione <jscipione@gmail.com>

Remove this code from FullState. Use default sMinimumWindowWidth


# 4ae3e542 14-Apr-2013 John Scipione <jscipione@gmail.com>

Fix a bug where the Deskbar menu was incorrectly sized in horizontal mode

Actually, the Deskbar menu was sized correctly but the separator item was not,
so, I've replaced the separator item with a new TSeparatorItem class that is derived
from BSeparatorItem but does it's own drawing. This neatly avoids the bug since
the TSeperatorItem doesn't need to be resized explicitly.

Also, there were some instances of AddSeperatorItem (with an e) that I renamed to
AddSeparatorItem (with an a). I also eliminated includes in the header which means
I added them in some cpp files where they were needed.


# e83b2f0b 14-Apr-2013 John Scipione <jscipione@gmail.com>

Create a SetMaxItemWidth() method and set it in horizontal mode on update


# ee78e4de 13-Apr-2013 John Scipione <jscipione@gmail.com>

Convert state variable from a uint32 to an int32


# 2de4b046 13-Apr-2013 John Scipione <jscipione@gmail.com>

Remove unneeded includes from BarView


# fe624b39 13-Apr-2013 John Scipione <jscipione@gmail.com>

Style fixes only

Most indentation and newlines with a few comment updates


# b76cec7d 10-Apr-2013 John Scipione <jscipione@gmail.com>

Pass a pointer to the TBarView object into the ExpandoMenuBar constructor

I fear that perhaps the fBarView variable may be accessed before it has a
chance to be set in AttachedToWindow(). By setting it in the constructor there
is no chance of this. Might fix #9656


# 9f2cce2f 06-Apr-2013 John Scipione <jscipione@gmail.com>

Eliminate repeating CountItems() loop premature micro-optimization

Loop backwards if possible, if not, set a variable and use that instead.
There were a couple of instances where the loop style got changed from
for (int32 i = CountItems(); --i >= 0;)
to
for (int32 i = CountItems() - 1; i >= 0; i--) {
but should be functionally equivalent.


# 53ec5d1f 11-Mar-2013 John Scipione <jscipione@gmail.com>

Rebuild application menu bar less. Fixes #8539 (I hope)

Instead of destroying and rebuilding the application menu bar each time we
change state, create it at startup and then only update it from there on. This
means that bugs that rely on the app bar being constantly destroyed and rebuilt
will be much less likely to occur.

Unfortunatly, there is still one case where the application menu bar is being
destroyed and recreated and that is when you are switching between horizontal
and vertical mode, and that is because a menu bar cannot be altered from
B_ITEMS_IN_ROWS to B_ITEMS_IN_COLUMNS anywhere but in the constructor.

* Renamed fExpando to fExpandoMenuBar
* Updated TExpandoMenuBar to be more flexible after construction, the menu
items are built in the new BuildItems() method. Also, don't pass the BarView
object in at contruction, that can happen in AttachedToWindow(). Also, set
fDeskbarMenuWidth just once at constructor, no reason to keep setting it over and over again.


# 31c0024d 07-Nov-2012 John Scipione <jscipione@gmail.com>

Add Deskbar clock settings to Time Preferences

* Added a new Clock tab to the Time preflet. Added Clock related
controls there. They all function by communicating with Deskbar.
* Put controls in a BBox controlled by the Show clock checkbox.
This more clearly shows that all the clock settings are dependent
on the show clock setting since it doesn't matter what your clock
settings are if you don't show the clock.
* Make revert work.
* Split clock settings into it's own file and struct.
* Re-add the time zone setting.
* Remove the clock settings from the Deskbar preference window, they
are in Time now.
* Make Locale preferences accepts B_LOCALE_CHANGED message, although
not used.


# c6bc755d 15-Nov-2012 John Scipione <jscipione@gmail.com>

delete fBarMenuBar on destruction preventing memory leak


# 1a5df674 12-Nov-2012 John Scipione <jscipione@gmail.com>

Fix saving and re-expanding items.

Subtle bug #1 found, 11th hour change broke this feature, fixed
once again.


# d1e438ca 12-Nov-2012 John Scipione <jscipione@gmail.com>

Force app menu to auto-layout before recomputing scroll limits.

This makes Deskbar correctly calulate the scroll limits in the case
when scrollbars are attached but not due to an app being added or
removed for example because the icon sizes increased.


# 652a115c 12-Nov-2012 John Scipione <jscipione@gmail.com>

Use fDragRegion width not left, you can't depend on the screen position reliably


# 27a53c3c 12-Nov-2012 John Scipione <jscipione@gmail.com>

Fix build, forgot a {


# b4c92219 12-Nov-2012 John Scipione <jscipione@gmail.com>

Fix Deskbar crash when scroll arrows are removed.

fExpando is added and removed from InlineScrollView only and it is
created and destroyed in BarView only. Before this there was a
case where it was removed in both InlineScrollView and BarView
causing a crash from the double remove


# e4f9bfce 27-Oct-2012 John Scipione <jscipione@gmail.com>

Need to position window before checking for scrolling.

Otherwise when you switch from bottom mini mode to vertical expando mode
you'll get scroll arrows when you shouldn't because the bottom of the
window frame will be below the screen.


# dec421b1 26-Oct-2012 John Scipione <jscipione@gmail.com>

Make sure that you remove the separator item before adding the team menu in mini mode or it won't work all the time


# 0e100a37 26-Oct-2012 John Scipione <jscipione@gmail.com>

Cleanup


# c07e6ff2 26-Oct-2012 John Scipione <jscipione@gmail.com>

Make horizontal scrolling work in Deskbar

* Split the Leaf menu and seperator into their own menubar.
* I got rid of a lot of special cases for horizontal in the
ExpandoMenuBar class because now the menubar contains the same
items as in vertical mode. However, it also means that the dreaded
<none> bug also affects horizontal mode.
* Make the application menubar resize itself even in horizontal mode.
This means that the view background shows through so I'm going to have
to fix this up.
* Calculate when to add the scroll arrows and how much to allow the user
to scroll by for horizontal. CheckItemSizes() got a big refactoring.
* Rework the InlineScrollView class a bit. It no longer requires you to
specify the begin and end limits on construction because it can
calculate them instead. It also no longer depends on the screen at all,
this means this class can be extened to be used more generally and in
more places.


# e6d8c22a 26-Jul-2012 John Scipione <jscipione@gmail.com>

WIP: Add support for horizontal scrolling.


# 32f840b7 25-Jul-2012 John Scipione <jscipione@gmail.com>

Rename ScrollArrowView to InlineScrollView

InlineScrollView takes a BView instead of a BMenu as well, and it
no longer has flags to do drawing respond to frame changes since
this view does neither of those things.


# e06f13f9 25-Jul-2012 John Scipione <jscipione@gmail.com>

Replace a deleted comment, check parent is not NULL before using it.


# 9c5644aa 24-Jul-2012 John Scipione <jscipione@gmail.com>

Detach the scrollbars before deleting fExpando.
... when rebuilding the application bar.

This fixes a Deskbar crash on resolution change because the lower
scrollbar is a child of fExpando so it must be removed and deleted
before fExpando is. So the tear down is remote scroll arrows
(if attached) then remote fExpando, then remove the scroll arrow
container view. The application bar is then rebuilt in reverse.


# fcfe60b0 24-Jul-2012 John Scipione <jscipione@gmail.com>

Renamed BMenuScrollView to TScrollArrowView and moved it into Deskbar

Also gave the Up Arrow and Down Arrow a scroll arrow. The up arrow works
but the down arrow doesn't because the sibling menu is stealing the
MouseDown event."


# afa1c291 21-Jul-2012 John Scipione <jscipione@gmail.com>

Tweaks, remove dead code. Menu and Menubar are stock again.


# 7ee3b479 21-Jul-2012 John Scipione <jscipione@gmail.com>

Make the MenuScrollView a fixed size...

instead of trying to make it follow fExpando just make it a fixed
size on creation. It is invisible and extends to the bottom of the
screen. fExpando grows inside it, and the window follows fExpando.
When the window grows taller than the screenframe the arrows are
added. You can scroll with the mouse wheel, but I haven't yet gotten
scrolling to work from clicking. Deskbar still crashes when going
from Mini mode to vertical expando mode. I have no idea why.


# 49ff476d 19-Jul-2012 John Scipione <jscipione@gmail.com>

Make ScrollMenu not rely on Menu.cpp

Rename ScrollMenu.cpp to MenuScrollView.cpp

Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.


# cb55ef9f 27-Jun-2011 John Scipione <jscipione@gmail.com>

WIP: Created a BScrollMenu class that works like BMenuWindow but works on a view instead of a window. Use this to implement a scrollable BarMenuBar in Deskbar. The basics work but there are issues still with sizing and other issues.

Modify the ScrollMenu class to use the layout kit by adding a constructor that doesn't take a view.

Get the BScrollMenu class to follow the size of the BMenu it is a parent of. Adjust the scrollers to appear in the right places. This is a WIP but it works in Deskbar, next step is to integrate this directly into BMenu with the scrollers as children of the menu instead of as children of the BScroller class.

Rebase changes on top of master

Deskbar scrolling works for the most part, just need to fix the
bottom arrow and clean up a bit.


# 8cf6d28f 22-Jul-2012 John Scipione <jscipione@gmail.com>

It is okay to delete dragMessage even if it is NULL. Not worth the branch.


# 8f29b6e6 22-Jul-2012 John Scipione <jscipione@gmail.com>

indent break statements. Only delete dragMessage if not NULL.


# 47a394ec 22-Jul-2012 John Scipione <jscipione@gmail.com>

Replace calls to DragRegion() with fDragRegion avoiding a function call. Move variables in MouseMoved down to just before they are used.


# d7ed9414 22-Jul-2012 Rene Gollent <anevilyak@gmail.com>

Fix #8523.

- When the message filter would receive and process a mouse moved message,
if the message resulted in causing the deskbar to relocate or reorient
itself, it was possible for the expando view to become detached from
the looper. Consequently, if the intercepted mouse moved happened to have
come from the latter, when returning out of the filter the view would no
longer have a target looper, triggering a debugger condition in BLooper.
In order to prevent this situation, we now dispatch a message asking for
the layout change to occur asynchronously.


# 95aae4ae 06-May-2012 Rene Gollent <anevilyak@gmail.com>

Style fixes.


# ec3fd171 05-May-2012 Rene Gollent <anevilyak@gmail.com>

Fix regressions introduced by previous commit.

- Conditionally enable and disable event masks as needed when we detect
the mouse entering/exiting the deskbar area. This is necessary because
otherwise the app_server appears to eat mouse messages due to the ctrl+cmd+
resize shortcut. Also change some conditionals slightly to better deal with
differing combinations of autohide and/or autoraise.


# 22812ba2 05-May-2012 Rene Gollent <anevilyak@gmail.com>

Fix ticket #8497.

- Rework Deskbar's handling for the autoraise/autohide cases to not
need event masks. This prevents various problems that would occur
if one happened to be working in another window that overlapped part
of Deskbar, as reported in #8497. Instead, we now use a message filter
to redirect the messages as needed.


# 1cd61330 02-May-2012 John Scipione <jscipione@gmail.com>

Style fixes including reordering #include's in Deskbar

* Reorder includes according to the Style Guide.
* Whitespace changes, mostly making sure there are 2 newlines
between things and making sure there is 1 newline at the end of
each file.
* Make end of header files all in the style of
#endif\t/* _HEADER_GAURD_H_ */
* The one change that is not purely style is to #include <Path.h>
in DeskbarUtils.h instead of DeskbarUtils.cpp because it is used
to define entry_ref for the AddRefsToDeskbarMenu() prototype.


# 1f0c9f18 23-Apr-2012 John Scipione <jscipione@gmail.com>

Set a tooltip with the application name if hidden.

If Deskbar is set to hide application names show the application
name as a tooltip when you hover your mouse over the item.

* Style fixes.
* Save CountItems() into a variable outside the loop so that it only
gets called once (micro-optimization/best-practice).
* Convert a for loop to a while loop that wasn't really being used
used as a for loop anyway, the variables are declared and used
outside the loop.


# 9ac6fee1 18-Apr-2012 John Scipione <jscipione@gmail.com>

Rename "deskbar_rt_" back to "Status".

Siarzhuk Zharski informed me that KeymapSwitcher depends on this
view being named "Status" to work, so, renamed it back to that.

Instead of sending the message by name to the replicant tray view,
since the view name "Status" is not very unique and I fear that
there could be collisions, resend the message to BarView which
then passes the message on to the replicant tray which updates the
clock and reflows the icons.

This being said, KeymapSwitcher should probably not send a message
hardcoded to the name of the replicant tray view and instead send
the message to Deskbar and allow it to pass the message on to the
appropriate view.


# b932a5a4 15-Apr-2012 John Scipione <jscipione@gmail.com>

Fix bug #8004

Dragging the Deskbar with CTRL+ALT+mouse not possible with
Auto-raise and Auto-hide disabled.

The reason this only worked with auto-raise or auto-hide enabled
is because the EventMask on BarView was only set to received mouse
events when those were settings were enabled. Apparently someone
figured this out. So, to fix this bug I set BarView to always
accept mouse events. Doesn't appear to have any obvious negative
consequences. Auto-hide and auto-raise still work.

I also added a comment in BarWindow::MenusBeginning(). It is
setting the EventMask of BarView to 0 and then back again in
TBarWindow::MenusEnded() to get around a bug in BeOS (according
to the comment anyway). I took out those lines and didn't notice
anything different so I assume that whatever the bug was it is
fixed and now and we can take those lines out permenantly.


# 573f748c 09-Apr-2012 John Scipione <jscipione@gmail.com>

Add 12/24 hour and time formatting options to Deskbar.

* 12/24 hour settings come from and alter BLocale
* Time formats are short, medium, long. Short is default. Come from
Locale kit.
* Don't delete fClock (now fTime) when hiding, just hide and show
the view.
* BarView now has nothing to do with setting or keeping track of
time settings. This is all handled in TTimeView. TReplicantTray
is responsible for updating the replicant tray and doing showing
and hiding. TTimeView is responsible for drawing according to the
clock settings.
* Remove fShowInterval and fShowSeconds from BarView
* Remove ampmMode setting and replace it with timeFormat.
* Reset targets in DeskbarMenu.

Originally I was trying to solve a bug where the TTimeView
was relying on the Deskbar settings too much. The settings
should only by set on quit and accessed on startup or a crash can
cause Deskbar to be in an unusual state.

I realize that the timezone is not very helpful. I'd like to provide
the day of week in a short format instead, i.e. Wed for Wednesday or
similar based on your locale. Blame the Locale Kit for now allowing
me to be able to use a custom TimeFormat. Once a custom TimeFormats
becomes possible from the Locale Kit Deskbar can be updated to use
them.


# d0a49328 07-Apr-2012 John Scipione <jscipione@gmail.com>

Fix a few more bugs in Deskbar, find a new one too.

Hiding in horizontal mode was leaving behind a white bar because the
window was getting hidden but the view not resized. Now fixed.

Moved simple state and member access function implementations from
BarView.cpp to BarView.h. Always use the local variable in BarView.cpp
to avoid a function call.

Rename Expando() to ExpandoState() and add FullState() and MiniState()
methods to BarView.h.

Call just PlaceApplicationBar() in vertical expando mode when resizing
icons. Call the full UpdatePlacement() in horizontal mode because I need
to update the height of the status tray when icons resize. Do not call
any method in MiniState because the icons will get resized when the
menu gets opened later.

The new bug I found is a little subtle. If you hide the clock by right
clicking on the clock and selecting Hide clock then quit deskbar with
'hey Deskbar QUIT' and restart Deskbar with 'Deskbar' the Show seconds
checkbox in the preference is disabled correctly, however, right clicking
Show Clock doesn't undisable the checkbox so you can no longer hide
seconds anymore. I'll fix this in a bit.


# 363a49a6 07-Apr-2012 John Scipione <jscipione@gmail.com>

Fix memory leak and an optimization in Deskbar

When resizing Deskbar icons, delete the icon bitmap before rebuilding
it with a new icon, was leaking the bitmap.

For several actions including:
- Sorting running apps
- Setting Tracker first
- Showing/hiding application expander
- Expanding new applications
- Resizing icons
- Hiding and showing application names

It is not necessary to rebuild all of Deskbar, just rebuild the
application bar. Should also help but not complete fix Ticket #532.


# 2ce9bab8 27-Jun-2011 John Scipione <jscipione@gmail.com>

Fisher Price Deskbar icon support

Implements the feature described in #7132
Also fixes #2387 (menu items too big in horizontal mode when font size > 12)

Adds a slider to Deskbar preferences which allows you to resize your Deskbar
team icons from 16x16 to 96x96. The default is 16x16. This works both in vertical
and horizontal mode.

In vertical mode when icon sizes are greater than 32x32 the label moves
underneath the icon where there is more room. In horizontal mode the width of
the menu item increases to make room for the icon while keeping room for the
label the same. As many applications are added the labels are truncated as usual.

This patch also adds a checkbox to the Deskbar preferences to hide application
names to make more room for icons if you wish. It doesn't make a lot of sense
at 16x16 but does >32x32.

If the kResizeTeamIcons message gets dropped, don't resize to current value,
just do nothing. This fixes a bug where sometimes the slider wouldn't trigger
a resize. Fix a spelling error in a comment. Take out a redundant paren pair.


# 4bbb27e3 12-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

More 'GCC4.6 variable set but not used' fixes.


# 323b6546 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 001f3799 01-Nov-2011 John Scipione <jscipione@gmail.com>

This commit fixes a bug described in ticket #7051 where Deskbar forgets expanded
items when you switch away from expando mode. It does this by keeping a list of
expanded item signatures in a fExpandedItems BList on the BarView class. I
can't use team_id because there can be more than one team per application.

If you have checked the 'Expand new applications' option in the Deskbar
preferences then the signatures of new applications will be added to the
fExpandedItems list expanding the item. If you open a new application while
not in expando mode then the app will be expanded upon returning to expando
mode.

Since 'Expand new applications' automatically adds any new item's signature
to the fExpandedItems list Tracker is expanded on startup since it is 'new'.
Also if Deskbar is restarted all applications will be considered 'new' so they
are expanded. This fixes ticket #4830

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3e6ff860 30-Oct-2011 Rene Gollent <anevilyak@gmail.com>

Rework Deskbar's tray replicant support a bit. Instead of relying on a live query
for be:deskbar_item_status in order to determine which replicants are supposed to
be living in the tray, a list of entry refs is now stored. While the former approach
was cool, it doesn't really work in either a multiuser or a package-aware world, where
executables are generally read-only. Note this means you'll lose your existing replicants
the first time you run this new revision, and need to re-add them.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3dfd9cb9 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# e2700599 06-Jul-2011 Axel Dörfler <axeld@pinc-software.de>

* Applied a patch of x-ist that implements auto hide functionality with minor
coding style changes by myself.
* Thanks, and sorry for the long delay!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42383 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ec67d2b 05-Mar-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Patches from John Scipione as part of bug 7052.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ceb49c1 31-Jan-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

As pointed out by korli use the PostMessage function that takes a code directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40333 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38bda653 30-Jan-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Patch by John Scipione:
"Show Application Expander" and "Expand New Applications" in the Deskbar preferences only work in Expando mode, however, this is not communicated to the user. This ticket contains a patch which disables these options in the preference window when not in expando mode and re-enables them in expando mode.
This fixes ticket #7177.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40326 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0dd68c86 21-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Moved child creation to the constructor; it doesn't seem to have any negative
effect, and DetachedFromWindow() was not symmetrical to AttachedToWindow(),
and would have leaked the children if called without destroying inbetween.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36888 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 71bd3ba5 30-Sep-2009 Jonas Sundström <jonas@kirilla.com>

Removing ifdefs and code for non-Haiku build targets. Partial clean-up. Enforcing the 80-char limit, renaming constants, newline at end of file.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 290c9039 29-Sep-2009 Jonas Sundström <jonas@kirilla.com>

Partial clean-up. Asterisks and k-prefix constants.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33366 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb6afcb1 21-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

* Give Deskbar a refreshed and cleaner look.
* Fixed a bunch of problems in layouting the various views. (For example,
the last app menu entry is no longer one pixel too short, but there was
more...)
* Fixed Deskbar being not wide enough for the Haiku logo in certain modes.
* Enabled the mount menu. I think it's a good idea to have at a more prominent
location where new Haiku users may look for it (Gnome also has this in
the main panel).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1cf94bf9 18-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Cleaned up the include list. It's probably safest to include <Debug.h> before
anything else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29600 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80fa95ad 14-Oct-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

no need to use private libbe variables anymore

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28073 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eaa9af99 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Never use the current menu UI color, but always the view color of any given
menu. Fixes #974.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28030 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2cddb12b 08-Oct-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

don't use the minimum window width, but the real window width. Just in case one day the deskbar was a bit wider

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27944 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dc69d5e2 14-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

Added an auto-raise feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21954 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2c7fad57 17-May-2006 Stephan Aßmus <superstippi@gmx.de>

synced to rev 1.9 and 1.4 from OpenTracker CVS

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 243fcbe2 02-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Since SF cannot be reached currently, this fix gets into the Haiku tree first:
ExpandoMenuBar::ItemAtPoint() was broken, which could cause a crash when doing
the "vulcan death grip" over a window item. This fixes bug #379.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16964 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f4a73641 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Imported current OpenTracker Deskbar: it can now start apps (and show the
"About Haiku" window) without having Tracker running.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15803 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7da06231 01-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Imported Deskbar from OpenTracker-current.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15774 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6d01b66d 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

GCC 4 fixes by Ingo Weinhold.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14893 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 41281cf3 22-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added Tracker and Deskbar from OpenTracker-current to the repository.
They both build fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12773 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0fc30d893468d504ba14cb3685ae45c1309290e3 09-Apr-2015 Dario Casalinuovo <b.vitruvio@gmail.com>

Deskbar: Sanitize the usage of BMessage

... especially for SendMessage and SendReply.
* Delete the item's message if AddItem does not return successfully.
* Fixes #11934.

Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>


# b49e806d3d560677f968daf1758d01cd791a1ba8 30-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

Deskbar: minor style cleanup.


# 4f4cab958e7d4dac805d3f715889ec8854606264 23-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Move ExpandoMenuBar name to constructor

... instead of passing it in from BarView.


# deaae5fc20b5cf44115441d34a1e33436df885b2 07-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Persist ExpandoMenuBar

Add private BMenu::_SetMenuLayout() method. Set TExpandoMenuBar
as a friend class in BMenu to call this method. A little hacky,
but, this keeps SetMenuLayout() from being exposed as part of
the public API.

Don't destroy and rebuild the ExpandoMenuBar when switching from
horizontal to vertical mode. Instead build the TExpandoMenuBar
when the application starts and then switch it from B_ITEMS_IN_ROW
to B_ITEMS_IN_COLUMNS by using the newly added _SetMenuLayout()
method.

When we resize from vertical to horizontal, recalc the max
menu item widths, this resizes the application menu items so
that they take up the right amount of space.

Since we no longer destroy the menu bar we no longer have to
save whether menu items are expanded or not in a separate list.
Instead we can store that information in directly in
TExpandoMenuBar. This removes a lot of code.

Fixes #9350


# a0310fc74193bebb22053a43c26fb04eeec7547e 16-Feb-2015 John Scipione <jscipione@gmail.com>

Deskbar: Style fixes to TBarView::SendDragMessage


# 8afcac1bb3241ecfd5b5abc0a8b14c86fd0c7fa0 06-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Compare signature case-insensitive


# 9f339a005bd0f5ffd8d6f49ae26cc498417e36fa 06-Jan-2014 John Scipione <jscipione@gmail.com>

Deskbar: Style fixes only


# 8f0935ac21663427ecf6471de11f3f94ca511159 13-Apr-2013 John Scipione <jscipione@gmail.com>

Whoops, hide if minimode


# 777fffe8f75e05cc7b13c59404036b840794890e 14-Apr-2013 John Scipione <jscipione@gmail.com>

Build the fBarMenu object in the BarView constructor

... then resize it and move it to the desired size and location on update.

* Create an fBarApp pointer and use it, this is easier than having to keep casting to TBarApp.


# 541decfaaba75c5b0451da0740ed0231080f7a53 14-Apr-2013 John Scipione <jscipione@gmail.com>

Remove this code from FullState. Use default sMinimumWindowWidth


# 4ae3e5421d4009205c273ec076bdcb5e1f21f936 14-Apr-2013 John Scipione <jscipione@gmail.com>

Fix a bug where the Deskbar menu was incorrectly sized in horizontal mode

Actually, the Deskbar menu was sized correctly but the separator item was not,
so, I've replaced the separator item with a new TSeparatorItem class that is derived
from BSeparatorItem but does it's own drawing. This neatly avoids the bug since
the TSeperatorItem doesn't need to be resized explicitly.

Also, there were some instances of AddSeperatorItem (with an e) that I renamed to
AddSeparatorItem (with an a). I also eliminated includes in the header which means
I added them in some cpp files where they were needed.


# e83b2f0b9cf71e3830bce4041401d48e033f8696 14-Apr-2013 John Scipione <jscipione@gmail.com>

Create a SetMaxItemWidth() method and set it in horizontal mode on update


# ee78e4de9f1ee2293d9e1c4b8b44db1bcf981530 13-Apr-2013 John Scipione <jscipione@gmail.com>

Convert state variable from a uint32 to an int32


# 2de4b0463fa09f983d7fcd13056c6dca1eaaf958 13-Apr-2013 John Scipione <jscipione@gmail.com>

Remove unneeded includes from BarView


# fe624b3937dc8b7a4551dbc66b5e5c81dfb468d6 13-Apr-2013 John Scipione <jscipione@gmail.com>

Style fixes only

Most indentation and newlines with a few comment updates


# b76cec7d9c445a3f058ec4100fdde780b5c8cc78 10-Apr-2013 John Scipione <jscipione@gmail.com>

Pass a pointer to the TBarView object into the ExpandoMenuBar constructor

I fear that perhaps the fBarView variable may be accessed before it has a
chance to be set in AttachedToWindow(). By setting it in the constructor there
is no chance of this. Might fix #9656


# 9f2cce2faaddd7b08af1458bf56aadaed8179a3f 06-Apr-2013 John Scipione <jscipione@gmail.com>

Eliminate repeating CountItems() loop premature micro-optimization

Loop backwards if possible, if not, set a variable and use that instead.
There were a couple of instances where the loop style got changed from
for (int32 i = CountItems(); --i >= 0;)
to
for (int32 i = CountItems() - 1; i >= 0; i--) {
but should be functionally equivalent.


# 53ec5d1f33912441da3ad5786dfd300282cdfcf0 11-Mar-2013 John Scipione <jscipione@gmail.com>

Rebuild application menu bar less. Fixes #8539 (I hope)

Instead of destroying and rebuilding the application menu bar each time we
change state, create it at startup and then only update it from there on. This
means that bugs that rely on the app bar being constantly destroyed and rebuilt
will be much less likely to occur.

Unfortunatly, there is still one case where the application menu bar is being
destroyed and recreated and that is when you are switching between horizontal
and vertical mode, and that is because a menu bar cannot be altered from
B_ITEMS_IN_ROWS to B_ITEMS_IN_COLUMNS anywhere but in the constructor.

* Renamed fExpando to fExpandoMenuBar
* Updated TExpandoMenuBar to be more flexible after construction, the menu
items are built in the new BuildItems() method. Also, don't pass the BarView
object in at contruction, that can happen in AttachedToWindow(). Also, set
fDeskbarMenuWidth just once at constructor, no reason to keep setting it over and over again.


# 31c0024d1b271b0b671c77432cce0be483b366f0 07-Nov-2012 John Scipione <jscipione@gmail.com>

Add Deskbar clock settings to Time Preferences

* Added a new Clock tab to the Time preflet. Added Clock related
controls there. They all function by communicating with Deskbar.
* Put controls in a BBox controlled by the Show clock checkbox.
This more clearly shows that all the clock settings are dependent
on the show clock setting since it doesn't matter what your clock
settings are if you don't show the clock.
* Make revert work.
* Split clock settings into it's own file and struct.
* Re-add the time zone setting.
* Remove the clock settings from the Deskbar preference window, they
are in Time now.
* Make Locale preferences accepts B_LOCALE_CHANGED message, although
not used.


# c6bc755d6cf6c23dabf835e44a119631d6d72f39 15-Nov-2012 John Scipione <jscipione@gmail.com>

delete fBarMenuBar on destruction preventing memory leak


# 1a5df674c1bb93a405699daec540c7cdddc86e1b 12-Nov-2012 John Scipione <jscipione@gmail.com>

Fix saving and re-expanding items.

Subtle bug #1 found, 11th hour change broke this feature, fixed
once again.


# d1e438cad1c1072d0abe208f6373038b4650871f 12-Nov-2012 John Scipione <jscipione@gmail.com>

Force app menu to auto-layout before recomputing scroll limits.

This makes Deskbar correctly calulate the scroll limits in the case
when scrollbars are attached but not due to an app being added or
removed for example because the icon sizes increased.


# 652a115c1cef9a100765f2ad83d71075ae7b29c6 12-Nov-2012 John Scipione <jscipione@gmail.com>

Use fDragRegion width not left, you can't depend on the screen position reliably


# 27a53c3c9ee61c7c5938baa266074989daa9b743 12-Nov-2012 John Scipione <jscipione@gmail.com>

Fix build, forgot a {


# b4c922197ca723c35514a76d8f668f8de8429f4e 12-Nov-2012 John Scipione <jscipione@gmail.com>

Fix Deskbar crash when scroll arrows are removed.

fExpando is added and removed from InlineScrollView only and it is
created and destroyed in BarView only. Before this there was a
case where it was removed in both InlineScrollView and BarView
causing a crash from the double remove


# e4f9bfce33a0baeb0b45297eb8c021934928d49a 27-Oct-2012 John Scipione <jscipione@gmail.com>

Need to position window before checking for scrolling.

Otherwise when you switch from bottom mini mode to vertical expando mode
you'll get scroll arrows when you shouldn't because the bottom of the
window frame will be below the screen.


# dec421b1dbfb82da1e693da603e59fa3602e50a2 26-Oct-2012 John Scipione <jscipione@gmail.com>

Make sure that you remove the separator item before adding the team menu in mini mode or it won't work all the time


# 0e100a37a9c94088d334f4c56b1aacf1a9de503c 26-Oct-2012 John Scipione <jscipione@gmail.com>

Cleanup


# c07e6ff292cbe19ab758ce8bcb6c5cde38a3e662 26-Oct-2012 John Scipione <jscipione@gmail.com>

Make horizontal scrolling work in Deskbar

* Split the Leaf menu and seperator into their own menubar.
* I got rid of a lot of special cases for horizontal in the
ExpandoMenuBar class because now the menubar contains the same
items as in vertical mode. However, it also means that the dreaded
<none> bug also affects horizontal mode.
* Make the application menubar resize itself even in horizontal mode.
This means that the view background shows through so I'm going to have
to fix this up.
* Calculate when to add the scroll arrows and how much to allow the user
to scroll by for horizontal. CheckItemSizes() got a big refactoring.
* Rework the InlineScrollView class a bit. It no longer requires you to
specify the begin and end limits on construction because it can
calculate them instead. It also no longer depends on the screen at all,
this means this class can be extened to be used more generally and in
more places.


# e6d8c22a7d78f0e47be55db2338083ada4766b2a 26-Jul-2012 John Scipione <jscipione@gmail.com>

WIP: Add support for horizontal scrolling.


# 32f840b7684012009c47338da6e00a202388126b 25-Jul-2012 John Scipione <jscipione@gmail.com>

Rename ScrollArrowView to InlineScrollView

InlineScrollView takes a BView instead of a BMenu as well, and it
no longer has flags to do drawing respond to frame changes since
this view does neither of those things.


# e06f13f9110879dca0e2338266c20e6f44f14d1c 25-Jul-2012 John Scipione <jscipione@gmail.com>

Replace a deleted comment, check parent is not NULL before using it.


# 9c5644aa0913c5af2926f43353122d580e28bf79 24-Jul-2012 John Scipione <jscipione@gmail.com>

Detach the scrollbars before deleting fExpando.
... when rebuilding the application bar.

This fixes a Deskbar crash on resolution change because the lower
scrollbar is a child of fExpando so it must be removed and deleted
before fExpando is. So the tear down is remote scroll arrows
(if attached) then remote fExpando, then remove the scroll arrow
container view. The application bar is then rebuilt in reverse.


# fcfe60b02ec06525dbe76eedc110d20b7eb808f7 24-Jul-2012 John Scipione <jscipione@gmail.com>

Renamed BMenuScrollView to TScrollArrowView and moved it into Deskbar

Also gave the Up Arrow and Down Arrow a scroll arrow. The up arrow works
but the down arrow doesn't because the sibling menu is stealing the
MouseDown event."


# afa1c29104c7f6b7a904008fbfc6a4835de4b3d3 21-Jul-2012 John Scipione <jscipione@gmail.com>

Tweaks, remove dead code. Menu and Menubar are stock again.


# 7ee3b479d14579e4a9db2709499c4706850e53c9 21-Jul-2012 John Scipione <jscipione@gmail.com>

Make the MenuScrollView a fixed size...

instead of trying to make it follow fExpando just make it a fixed
size on creation. It is invisible and extends to the bottom of the
screen. fExpando grows inside it, and the window follows fExpando.
When the window grows taller than the screenframe the arrows are
added. You can scroll with the mouse wheel, but I haven't yet gotten
scrolling to work from clicking. Deskbar still crashes when going
from Mini mode to vertical expando mode. I have no idea why.


# 49ff476d139dc28ebaa95d65b7820423b6061d60 19-Jul-2012 John Scipione <jscipione@gmail.com>

Make ScrollMenu not rely on Menu.cpp

Rename ScrollMenu.cpp to MenuScrollView.cpp

Half step towards making this class work as part of Deskbar without
extending any other classes. Scrolling works both with mouse and
scroll wheel. Redraws on scroll, need to make that work better.
Also need to move classes out of the Interface Kit and into Deskbar.


# cb55ef9fb597a3f3bc91e53017360b18b20dd27b 27-Jun-2011 John Scipione <jscipione@gmail.com>

WIP: Created a BScrollMenu class that works like BMenuWindow but works on a view instead of a window. Use this to implement a scrollable BarMenuBar in Deskbar. The basics work but there are issues still with sizing and other issues.

Modify the ScrollMenu class to use the layout kit by adding a constructor that doesn't take a view.

Get the BScrollMenu class to follow the size of the BMenu it is a parent of. Adjust the scrollers to appear in the right places. This is a WIP but it works in Deskbar, next step is to integrate this directly into BMenu with the scrollers as children of the menu instead of as children of the BScroller class.

Rebase changes on top of master

Deskbar scrolling works for the most part, just need to fix the
bottom arrow and clean up a bit.


# 8cf6d28f996f132095d5f61c0b5622168c39ae91 22-Jul-2012 John Scipione <jscipione@gmail.com>

It is okay to delete dragMessage even if it is NULL. Not worth the branch.


# 8f29b6e639c5fb96e5f5ccd3f197ad94fee6ce15 22-Jul-2012 John Scipione <jscipione@gmail.com>

indent break statements. Only delete dragMessage if not NULL.


# 47a394ec139b7defdd57aeea2587f435716aa172 22-Jul-2012 John Scipione <jscipione@gmail.com>

Replace calls to DragRegion() with fDragRegion avoiding a function call. Move variables in MouseMoved down to just before they are used.


# d7ed9414a3260efaed0fa9de5dde9bb8c0bc11ef 22-Jul-2012 Rene Gollent <anevilyak@gmail.com>

Fix #8523.

- When the message filter would receive and process a mouse moved message,
if the message resulted in causing the deskbar to relocate or reorient
itself, it was possible for the expando view to become detached from
the looper. Consequently, if the intercepted mouse moved happened to have
come from the latter, when returning out of the filter the view would no
longer have a target looper, triggering a debugger condition in BLooper.
In order to prevent this situation, we now dispatch a message asking for
the layout change to occur asynchronously.


# 95aae4ae1eb036133a9d509fde8538ae83d0c825 06-May-2012 Rene Gollent <anevilyak@gmail.com>

Style fixes.


# ec3fd1713a48109bbc977cfc3addcc5f5ddf69d3 05-May-2012 Rene Gollent <anevilyak@gmail.com>

Fix regressions introduced by previous commit.

- Conditionally enable and disable event masks as needed when we detect
the mouse entering/exiting the deskbar area. This is necessary because
otherwise the app_server appears to eat mouse messages due to the ctrl+cmd+
resize shortcut. Also change some conditionals slightly to better deal with
differing combinations of autohide and/or autoraise.


# 22812ba24ffdc5c1a1f30257bc01ce9b4b211d47 05-May-2012 Rene Gollent <anevilyak@gmail.com>

Fix ticket #8497.

- Rework Deskbar's handling for the autoraise/autohide cases to not
need event masks. This prevents various problems that would occur
if one happened to be working in another window that overlapped part
of Deskbar, as reported in #8497. Instead, we now use a message filter
to redirect the messages as needed.


# 1cd61330ecd8257551d58f204332d00145c855ec 02-May-2012 John Scipione <jscipione@gmail.com>

Style fixes including reordering #include's in Deskbar

* Reorder includes according to the Style Guide.
* Whitespace changes, mostly making sure there are 2 newlines
between things and making sure there is 1 newline at the end of
each file.
* Make end of header files all in the style of
#endif\t/* _HEADER_GAURD_H_ */
* The one change that is not purely style is to #include <Path.h>
in DeskbarUtils.h instead of DeskbarUtils.cpp because it is used
to define entry_ref for the AddRefsToDeskbarMenu() prototype.


# 1f0c9f183e3bd12f6056ca2251438ffada696d58 23-Apr-2012 John Scipione <jscipione@gmail.com>

Set a tooltip with the application name if hidden.

If Deskbar is set to hide application names show the application
name as a tooltip when you hover your mouse over the item.

* Style fixes.
* Save CountItems() into a variable outside the loop so that it only
gets called once (micro-optimization/best-practice).
* Convert a for loop to a while loop that wasn't really being used
used as a for loop anyway, the variables are declared and used
outside the loop.


# 9ac6fee13ad6aa1638f058d8791ac7bc1c64ae89 18-Apr-2012 John Scipione <jscipione@gmail.com>

Rename "deskbar_rt_" back to "Status".

Siarzhuk Zharski informed me that KeymapSwitcher depends on this
view being named "Status" to work, so, renamed it back to that.

Instead of sending the message by name to the replicant tray view,
since the view name "Status" is not very unique and I fear that
there could be collisions, resend the message to BarView which
then passes the message on to the replicant tray which updates the
clock and reflows the icons.

This being said, KeymapSwitcher should probably not send a message
hardcoded to the name of the replicant tray view and instead send
the message to Deskbar and allow it to pass the message on to the
appropriate view.


# b932a5a45f86add0cdfca66be71bba585b338588 15-Apr-2012 John Scipione <jscipione@gmail.com>

Fix bug #8004

Dragging the Deskbar with CTRL+ALT+mouse not possible with
Auto-raise and Auto-hide disabled.

The reason this only worked with auto-raise or auto-hide enabled
is because the EventMask on BarView was only set to received mouse
events when those were settings were enabled. Apparently someone
figured this out. So, to fix this bug I set BarView to always
accept mouse events. Doesn't appear to have any obvious negative
consequences. Auto-hide and auto-raise still work.

I also added a comment in BarWindow::MenusBeginning(). It is
setting the EventMask of BarView to 0 and then back again in
TBarWindow::MenusEnded() to get around a bug in BeOS (according
to the comment anyway). I took out those lines and didn't notice
anything different so I assume that whatever the bug was it is
fixed and now and we can take those lines out permenantly.


# 573f748c5f8fb7ed75beb0ceb7eb097d3ab0c038 09-Apr-2012 John Scipione <jscipione@gmail.com>

Add 12/24 hour and time formatting options to Deskbar.

* 12/24 hour settings come from and alter BLocale
* Time formats are short, medium, long. Short is default. Come from
Locale kit.
* Don't delete fClock (now fTime) when hiding, just hide and show
the view.
* BarView now has nothing to do with setting or keeping track of
time settings. This is all handled in TTimeView. TReplicantTray
is responsible for updating the replicant tray and doing showing
and hiding. TTimeView is responsible for drawing according to the
clock settings.
* Remove fShowInterval and fShowSeconds from BarView
* Remove ampmMode setting and replace it with timeFormat.
* Reset targets in DeskbarMenu.

Originally I was trying to solve a bug where the TTimeView
was relying on the Deskbar settings too much. The settings
should only by set on quit and accessed on startup or a crash can
cause Deskbar to be in an unusual state.

I realize that the timezone is not very helpful. I'd like to provide
the day of week in a short format instead, i.e. Wed for Wednesday or
similar based on your locale. Blame the Locale Kit for now allowing
me to be able to use a custom TimeFormat. Once a custom TimeFormats
becomes possible from the Locale Kit Deskbar can be updated to use
them.


# d0a49328634b3702d647e27b8704a3ce706074b8 07-Apr-2012 John Scipione <jscipione@gmail.com>

Fix a few more bugs in Deskbar, find a new one too.

Hiding in horizontal mode was leaving behind a white bar because the
window was getting hidden but the view not resized. Now fixed.

Moved simple state and member access function implementations from
BarView.cpp to BarView.h. Always use the local variable in BarView.cpp
to avoid a function call.

Rename Expando() to ExpandoState() and add FullState() and MiniState()
methods to BarView.h.

Call just PlaceApplicationBar() in vertical expando mode when resizing
icons. Call the full UpdatePlacement() in horizontal mode because I need
to update the height of the status tray when icons resize. Do not call
any method in MiniState because the icons will get resized when the
menu gets opened later.

The new bug I found is a little subtle. If you hide the clock by right
clicking on the clock and selecting Hide clock then quit deskbar with
'hey Deskbar QUIT' and restart Deskbar with 'Deskbar' the Show seconds
checkbox in the preference is disabled correctly, however, right clicking
Show Clock doesn't undisable the checkbox so you can no longer hide
seconds anymore. I'll fix this in a bit.


# 363a49a64e0c4a009b2b9549c117782f2080e39c 07-Apr-2012 John Scipione <jscipione@gmail.com>

Fix memory leak and an optimization in Deskbar

When resizing Deskbar icons, delete the icon bitmap before rebuilding
it with a new icon, was leaking the bitmap.

For several actions including:
- Sorting running apps
- Setting Tracker first
- Showing/hiding application expander
- Expanding new applications
- Resizing icons
- Hiding and showing application names

It is not necessary to rebuild all of Deskbar, just rebuild the
application bar. Should also help but not complete fix Ticket #532.


# 2ce9bab873e024bb515a95faf384df62b88bbb8c 27-Jun-2011 John Scipione <jscipione@gmail.com>

Fisher Price Deskbar icon support

Implements the feature described in #7132
Also fixes #2387 (menu items too big in horizontal mode when font size > 12)

Adds a slider to Deskbar preferences which allows you to resize your Deskbar
team icons from 16x16 to 96x96. The default is 16x16. This works both in vertical
and horizontal mode.

In vertical mode when icon sizes are greater than 32x32 the label moves
underneath the icon where there is more room. In horizontal mode the width of
the menu item increases to make room for the icon while keeping room for the
label the same. As many applications are added the labels are truncated as usual.

This patch also adds a checkbox to the Deskbar preferences to hide application
names to make more room for icons if you wish. It doesn't make a lot of sense
at 16x16 but does >32x32.

If the kResizeTeamIcons message gets dropped, don't resize to current value,
just do nothing. This fixes a bug where sometimes the slider wouldn't trigger
a resize. Fix a spelling error in a comment. Take out a redundant paren pair.


# 4bbb27e3ccf0b1e38ee4a63ca9ec765e167a72bd 12-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

More 'GCC4.6 variable set but not used' fixes.


# 323b65468e5836bb27a5e373b14027d902349437 21-Nov-2011 Oliver Tappe <zooey@hirschkaefer.de>

Filtered flat import of Oliver's svn package management branch

Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.

Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.


# 001f379993c2a6b597c9469b9de66d372ee3ef8a 01-Nov-2011 John Scipione <jscipione@gmail.com>

This commit fixes a bug described in ticket #7051 where Deskbar forgets expanded
items when you switch away from expando mode. It does this by keeping a list of
expanded item signatures in a fExpandedItems BList on the BarView class. I
can't use team_id because there can be more than one team per application.

If you have checked the 'Expand new applications' option in the Deskbar
preferences then the signatures of new applications will be added to the
fExpandedItems list expanding the item. If you open a new application while
not in expando mode then the app will be expanded upon returning to expando
mode.

Since 'Expand new applications' automatically adds any new item's signature
to the fExpandedItems list Tracker is expanded on startup since it is 'new'.
Also if Deskbar is restarted all applications will be considered 'new' so they
are expanded. This fixes ticket #4830

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43092 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3e6ff860b4f9cd789a091250a8923023bbe0ce91 30-Oct-2011 Rene Gollent <anevilyak@gmail.com>

Rework Deskbar's tray replicant support a bit. Instead of relying on a live query
for be:deskbar_item_status in order to determine which replicants are supposed to
be living in the tray, a list of entry refs is now stored. While the former approach
was cool, it doesn't really work in either a multiuser or a package-aware world, where
executables are generally read-only. Note this means you'll lose your existing replicants
the first time you run this new revision, and need to re-add them.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43004 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3dfd9cb95ce45f59160d50975210bc55e3fc0709 16-Jun-2011 Oliver Tappe <zooey@hirschkaefer.de>

Flat commit of all changes from package-management branch in svn


# e27005998f2cb3d61a7a95e97ff9b5bcbd3eadd6 06-Jul-2011 Axel Dörfler <axeld@pinc-software.de>

* Applied a patch of x-ist that implements auto hide functionality with minor
coding style changes by myself.
* Thanks, and sorry for the long delay!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42383 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4ec67d2b37f3100924230787b6ca2170ad31b586 05-Mar-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Patches from John Scipione as part of bug 7052.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5ceb49c12d9988c1a02fe6f3437a22b605bd987e 31-Jan-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

As pointed out by korli use the PostMessage function that takes a code directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40333 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 38bda6536f13f9aff0d31e6d922bf9bcbebd8b03 30-Jan-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Patch by John Scipione:
"Show Application Expander" and "Expand New Applications" in the Deskbar preferences only work in Expando mode, however, this is not communicated to the user. This ticket contains a patch which disables these options in the preference window when not in expando mode and re-enables them in expando mode.
This fixes ticket #7177.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40326 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0dd68c866c1c6a3d5deae29b5e2bb9ab88bc19f2 21-May-2010 Axel Dörfler <axeld@pinc-software.de>

* Moved child creation to the constructor; it doesn't seem to have any negative
effect, and DetachedFromWindow() was not symmetrical to AttachedToWindow(),
and would have leaked the children if called without destroying inbetween.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36888 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 71bd3ba59c06b130115c3ddd44457d8f9dd78997 30-Sep-2009 Jonas Sundström <jonas@kirilla.com>

Removing ifdefs and code for non-Haiku build targets. Partial clean-up. Enforcing the 80-char limit, renaming constants, newline at end of file.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 290c903985a449fa86c501366b6fcddf7f55b46a 29-Sep-2009 Jonas Sundström <jonas@kirilla.com>

Partial clean-up. Asterisks and k-prefix constants.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33366 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cb6afcb1464e92f0134232e6179215295e17bc79 21-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

* Give Deskbar a refreshed and cleaner look.
* Fixed a bunch of problems in layouting the various views. (For example,
the last app menu entry is no longer one pixel too short, but there was
more...)
* Fixed Deskbar being not wide enough for the Haiku logo in certain modes.
* Enabled the mount menu. I think it's a good idea to have at a more prominent
location where new Haiku users may look for it (Gnome also has this in
the main panel).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1cf94bf91f3b7d038b366ef9f270d09a73a0ad6e 18-Mar-2009 Stephan Aßmus <superstippi@gmx.de>

Cleaned up the include list. It's probably safest to include <Debug.h> before
anything else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29600 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80fa95ad77bd33130e9b05cf0bb5626b62853d6f 14-Oct-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

no need to use private libbe variables anymore

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28073 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eaa9af9937ed538a6e175852bee9f22a2c20a814 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

Never use the current menu UI color, but always the view color of any given
menu. Fixes #974.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28030 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2cddb12bacc0f3499863ef3a57aad2939e208731 08-Oct-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

don't use the minimum window width, but the real window width. Just in case one day the deskbar was a bit wider

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27944 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dc69d5e23365ca14b8e8e2354a52dcae8b91f1c8 14-Aug-2007 Axel Dörfler <axeld@pinc-software.de>

Added an auto-raise feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21954 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2c7fad579cac4999f7bc96d4d94844e158499bbb 17-May-2006 Stephan Aßmus <superstippi@gmx.de>

synced to rev 1.9 and 1.4 from OpenTracker CVS

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 243fcbe279044852cf007df093a2e5a62d1b7e16 02-Apr-2006 Axel Dörfler <axeld@pinc-software.de>

Since SF cannot be reached currently, this fix gets into the Haiku tree first:
ExpandoMenuBar::ItemAtPoint() was broken, which could cause a crash when doing
the "vulcan death grip" over a window item. This fixes bug #379.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16964 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f4a73641e0bec45c55d16f2e86845be99d37cb8f 03-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Imported current OpenTracker Deskbar: it can now start apps (and show the
"About Haiku" window) without having Tracker running.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15803 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7da062312a13b77ed1aac63bdd67c44c44ad5824 01-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Imported Deskbar from OpenTracker-current.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15774 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6d01b66d300c2841dba033705f120a7f6e709696 13-Nov-2005 Axel Dörfler <axeld@pinc-software.de>

GCC 4 fixes by Ingo Weinhold.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14893 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 41281cf362916855e6eb9ad1d728d919863a1e81 22-May-2005 Axel Dörfler <axeld@pinc-software.de>

Added Tracker and Deskbar from OpenTracker-current to the repository.
They both build fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12773 a95241bf-73f2-0310-859d-f6bbb57e9c96