History log of /haiku-fatelf/src/apps/deskbar/StatusView.cpp
Revision Date Author Comments
# 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.


# e9632898 09-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Added Tracker and Deskbar to x86_64 build.


# 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.


# a663e905 16-Jun-2012 Rene Gollent <anevilyak@gmail.com>

Fix #8640.

- Automatic whitespace cleanup.
- Remove no longer exposed show/hide time setting. The methodology for
saving it on exit was broken anyways, since it relied on the current
show/hide state of the time view, which would be hidden if the deskbar
was currently in Autohide mode.


# 615d572d 03-May-2012 John Scipione <jscipione@gmail.com>

Fix #8505 cut-off Deskbar leaf bug.

Replace the leaf bitmap with a non-cutoff version derived from the
'data/artwork/Haiku Leaf' file. So, when icon size is > 16 the full
deskbar leaf is shown without the bottom cut-off. It should look
pretty much identical at 16x16 and in vertical mode at any icon size.

Also add a deskbar_leaf.png file to the data/artwork directory
although I didn't use that file in Deskbar, instead I embed an
archive bitmap into icons.h. I got rid of icon-freelogo.rdef and
icons_logo.h.


# 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.


# 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.


# f5be13ec 17-Apr-2012 John Scipione <jscipione@gmail.com>

Remove time zone clock option and Time preferences button.

* Nobody thought time zone was a particularly useful option to have
in the clock.
* You can still open Time preferences from Deskbar by right clicking
on the clock, but, since there isn't a big connection between
the clock settings in Deskbar and Time preferences anymore
this button isn't needed here.
* There are still 2 clock options, Show seconds, and Show day of week
and day of week is localized as well so this wasn't a total wash.


# 0d2ac94c 17-Apr-2012 John Scipione <jscipione@gmail.com>

Rename the TReplicantTray view "_deskbar_rt_"

instead of "_replicant_tray_". That follows the convention a bit
better and is less likely to cause name collisions. While I am at
it put the BView line below the : as is our usual convention.


# 30a55802 17-Apr-2012 John Scipione <jscipione@gmail.com>

Remove Time Interval radio buttons from Deskbar Prefs.

* 12/24 hour clock is set from the Locale prefs only.
* Redirect B_LOCALE_CHANGED message to the replicant tray instead
of the time view and tell the replicant tray to update the time
instead of updating the time view directly. This is because there
was a bug where if the AM/PM marker grew the time view over the
replicant tray icons when switching from 24 hour to 12 hour clock
it wouldn't reflow the replicant tray icons like it should.
* Rename the replicant tray view from "Status" to "_replicant_tray_"
because BarApp uses FindView() to get the view by name and I'm
assuming that this method can have conflicts. Following the example
of the "_deskbar_tv_" naming convention.


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 3cf2d117 14-Apr-2012 John Scipione <jscipione@gmail.com>

Change Time Format Options in Deskbar preferences.

Added two new methods to the Locale Kit in order to create a custom time
formats from a format string. One method is outputs into a char* array,
the other into a BString() and you can set the timezone.

These methods should be cleaned up, we only need 2, one to get
the time in a predefined style, the other to get a custom time format.
Also should probably do the same for dates and datetimes. But I'll let
this go for now.

I added myself to the Locale.cpp file. I retained the copyright instead
of assigning it to Haiku, Inc. because the file is under the OpenBeOS
license and I don't know what the concequences of copyright sharing are
for that license, unlike MIT.

These new methods are used to generate custom time formats in Deskbar.
Instead of using a set of Radio Buttons to choose between the predefined
time options I build my own by creating a format string and passing it
to the Locale Kit. The format string is generated from 3 checkboxes,
show seconds, show day of week, and show time zone. You can mix and match
between them choose any that you like. By default they are all off.

There are 3 new deskbar settings associated with these new options:
showSeconds, showDayOfWeek, and showTimeZone. timeFormat has gone away.

The time format string gets cached and updated only when Update() gets called
on the TimeView class.

In order to fit all the options in (there is 1 more than before) I had to
reduce the font size of the clock to 11pt when all options are turned on in
12 hour mode. For those with no imagination it looks like this:

http://imagebin.org/208162

Renamed "Open time preferences..." menuitem to "Time preferences...".
Renamed "Show Time" and "Hide Time" to "Show time" and "Hide time".

Other changes include refactoring the header files a bit. There were a lot
of headers included by header files uneccessarily. For instance BarWindow.h
now only includes <Window.h> and <Deskbar.h>. This change is mainly to
to speed up the compile time since it takes a while right now.

I copy the fBarView pointer from BarWindow in the BarApp constructor and then
use that throughout the file rather than getting the pointer from the window
each time by calling BarView(). BarView() is still available in the header
for other classes though.

I moved some message constants around since it was getting a bit jumbled.
Most of the messages related to settings are in PreferenceWindow.h.
fChangeState is moved to BarView.h since that is where the ChangeState()
function is and BarView.cpp uses that constant.

The time interval and format constants are in TimeView.h.

Make some methods public in their respective classes where it made sense.
The preference window methods to update dependent items are public, that
might get called from BarWindow when a message gets received at some point.

Also made ShowHideTime() and Time() public in StatusView.h. These methods
activate showing and hiding the clock and return the fTime clock object.
No reason they should be private.

I reindented the StatusView.h and PreferenceWindow.h headers to the standard
style. Question here, are the public: protected: and private: lines inside
of classes suppose to get indented 1 tab or not? I've seen both, the style
guide says no indent but 1 indent seems reasonable and looks pretty good.

Style fixes here and there. That's enough for one commit I think.


# 2a2dc95a 09-Apr-2012 John Scipione <jscipione@gmail.com>

Update timeView popup menu


# 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.


# 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.


# 8aab28f1 30-Oct-2011 Rene Gollent <anevilyak@gmail.com>

And more fixes.



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


# 7625ce51 30-Oct-2011 Rene Gollent <anevilyak@gmail.com>

Factor out an _SaveSettings() call to write back settings. Use it to commit tray item changes immediately instead of at Deskbar exit.


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


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

Adjust the previous change to use paths instead of entry_refs.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43005 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


# 9e8a970b 24-Mar-2011 Jonas Sundström <jonas@kirilla.com>

A better for the leaf logo bitmap.

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


# 1ad8c760 06-Mar-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

More style cleanup patches from John Scipione as part of #7052.


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


# 908d7185 22-Jan-2011 Rene Gollent <anevilyak@gmail.com>

Remove unused Draw function. Fixes CID 10350.


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


# 9e9c8091 20-Oct-2010 Rene Gollent <anevilyak@gmail.com>

Remove the "Full Date" setting and associated madness with respect to
the deskbar's current orientation. Instead, we now always show the full
date, but as a tooltip rather than switching the timeview's display
based on a mouse click.



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


# 68fdcbe0 11-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 926 : Memory leak


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


# 2f0eb7b1 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Introduce a new method in BCountry to get the first day of week (monday or sunday)
* Localize date in deskbar properly, and use the new API to show the calendar. The "show european date" checkbox is now gone.


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


# 3fc995d1 24-Jun-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Deskbar now uses localized time from locale kit. Thus the "24 hour
clock" setting is not needed anymore.
* The locale kit now provide a less complete 'full' time format : hour
minutes seconds, I don't think anyone cares much about the "UTC + 1" or
other similar stuff.


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


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

* The Deskbar will now intercept control+alt-clicks, and will start to move the
Deskbar around as other windows do (more or less), as suggested in ticket
#6029.


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


# 4eb0cbb0 07-May-2010 Matt Madia <mattmadia@gmail.com>

Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.


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


# 61863f2c 06-May-2010 Matt Madia <mattmadia@gmail.com>

Updated to use B_TRANSLATE* macros. relates to #5408.

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


# ae7a6e3a 10-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by mt (ticket #5573) : localize deskbar. Thanks !


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36117 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


# 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


# 0bec7100 14-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

moved the NULL check before dereferencing the view pointer. CID 1063

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


# 157cd891 16-Jun-2008 Alexandre Deckner <alex@zappotek.com>

- Calculating the space left for deskbar replicants was broken. The TimeView could overlap on the left. This fixes #1408
- Placement of the time text was broken. With big fonts, the text was way too low. Using text bounding box now, it looks pretty and robust too.
- Fixed the height of the time view to the replicant height. The view has a fixed height now and can never overlap deskbar at the bottom (horizontal deskbar mode) or other replicant
below.


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


# ced3755c 28-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Fixed a memory leak in Deskbar's BarWindow.cpp when adding a deskbar
replicant failed as pointed out by Mark Hellegers.
* Clarified ownership of the passed in message in TReplicantTray::AddIcon()
as well as BShelf::_AddReplicant().


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


# f6742aab 13-Jan-2008 Jérôme Duval <korli@users.berlios.de>

whitespaces => tab


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


# 66eba86f 16-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Applied patch by Jonas Sundstrom: fixed the usage of B_UTF8_ELLIPSIS hopefully
everywhere in the tree.
* Added the ellipsis to "About Haiku" in Deskbar as well.
* Minor cleanup of Deskbar's StatusView.cpp


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


# a5210ab1 11-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Imported files from OT-current:
* ExpandoMenuBar.cpp 1.18
* CalendarMenuItem.cpp 1.6
* WindowMenu.cpp 1.3
* TimeView.cpp 1.14
* StatusView.cpp 1.18
* BarWindow.cpp 1.8


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


# 9c50f36e 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Now has some error checks in TReplicantTray::AddIcon() - this fixes bug #222.


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


# 465b54cd 17-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed crashing bug in the test environment on quit.


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


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

Enabled Deskbar add-ons. They don't work that good, but they don't crash
the Deskbar anymore. It's still disabled for the libbe_test build, though
(as it will find incompatible add-ons via queries there).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15834 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


# 7d93e668 06-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Added the Deskbar to the libbe_test environment - I thought I had committed this already...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15379 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


# 9c910f9e 06-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

first draft of a Haiku logo for the Deskbar, link against Haiku libs when building for Haiku

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13508 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


# e963289800007e623f4a120b27e7bd476230f57f 09-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Added Tracker and Deskbar to x86_64 build.


# 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.


# a663e9050638c7470918bda00c4f260c30513990 16-Jun-2012 Rene Gollent <anevilyak@gmail.com>

Fix #8640.

- Automatic whitespace cleanup.
- Remove no longer exposed show/hide time setting. The methodology for
saving it on exit was broken anyways, since it relied on the current
show/hide state of the time view, which would be hidden if the deskbar
was currently in Autohide mode.


# 615d572db00c03d9de04a6d3ed0f3c50929e0635 03-May-2012 John Scipione <jscipione@gmail.com>

Fix #8505 cut-off Deskbar leaf bug.

Replace the leaf bitmap with a non-cutoff version derived from the
'data/artwork/Haiku Leaf' file. So, when icon size is > 16 the full
deskbar leaf is shown without the bottom cut-off. It should look
pretty much identical at 16x16 and in vertical mode at any icon size.

Also add a deskbar_leaf.png file to the data/artwork directory
although I didn't use that file in Deskbar, instead I embed an
archive bitmap into icons.h. I got rid of icon-freelogo.rdef and
icons_logo.h.


# 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.


# 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.


# f5be13ecc7503a48a32b87995a78a2d0247ab401 17-Apr-2012 John Scipione <jscipione@gmail.com>

Remove time zone clock option and Time preferences button.

* Nobody thought time zone was a particularly useful option to have
in the clock.
* You can still open Time preferences from Deskbar by right clicking
on the clock, but, since there isn't a big connection between
the clock settings in Deskbar and Time preferences anymore
this button isn't needed here.
* There are still 2 clock options, Show seconds, and Show day of week
and day of week is localized as well so this wasn't a total wash.


# 0d2ac94c4df1061e1f2b835703f018553c929744 17-Apr-2012 John Scipione <jscipione@gmail.com>

Rename the TReplicantTray view "_deskbar_rt_"

instead of "_replicant_tray_". That follows the convention a bit
better and is less likely to cause name collisions. While I am at
it put the BView line below the : as is our usual convention.


# 30a5580244604caad54b5314c1a23d88c1d58fa8 17-Apr-2012 John Scipione <jscipione@gmail.com>

Remove Time Interval radio buttons from Deskbar Prefs.

* 12/24 hour clock is set from the Locale prefs only.
* Redirect B_LOCALE_CHANGED message to the replicant tray instead
of the time view and tell the replicant tray to update the time
instead of updating the time view directly. This is because there
was a bug where if the AM/PM marker grew the time view over the
replicant tray icons when switching from 24 hour to 12 hour clock
it wouldn't reflow the replicant tray icons like it should.
* Rename the replicant tray view from "Status" to "_replicant_tray_"
because BarApp uses FindView() to get the view by name and I'm
assuming that this method can have conflicts. Following the example
of the "_deskbar_tv_" naming convention.


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 3cf2d117e570356c8487e67a0e38b09b1639ab6c 14-Apr-2012 John Scipione <jscipione@gmail.com>

Change Time Format Options in Deskbar preferences.

Added two new methods to the Locale Kit in order to create a custom time
formats from a format string. One method is outputs into a char* array,
the other into a BString() and you can set the timezone.

These methods should be cleaned up, we only need 2, one to get
the time in a predefined style, the other to get a custom time format.
Also should probably do the same for dates and datetimes. But I'll let
this go for now.

I added myself to the Locale.cpp file. I retained the copyright instead
of assigning it to Haiku, Inc. because the file is under the OpenBeOS
license and I don't know what the concequences of copyright sharing are
for that license, unlike MIT.

These new methods are used to generate custom time formats in Deskbar.
Instead of using a set of Radio Buttons to choose between the predefined
time options I build my own by creating a format string and passing it
to the Locale Kit. The format string is generated from 3 checkboxes,
show seconds, show day of week, and show time zone. You can mix and match
between them choose any that you like. By default they are all off.

There are 3 new deskbar settings associated with these new options:
showSeconds, showDayOfWeek, and showTimeZone. timeFormat has gone away.

The time format string gets cached and updated only when Update() gets called
on the TimeView class.

In order to fit all the options in (there is 1 more than before) I had to
reduce the font size of the clock to 11pt when all options are turned on in
12 hour mode. For those with no imagination it looks like this:

http://imagebin.org/208162

Renamed "Open time preferences..." menuitem to "Time preferences...".
Renamed "Show Time" and "Hide Time" to "Show time" and "Hide time".

Other changes include refactoring the header files a bit. There were a lot
of headers included by header files uneccessarily. For instance BarWindow.h
now only includes <Window.h> and <Deskbar.h>. This change is mainly to
to speed up the compile time since it takes a while right now.

I copy the fBarView pointer from BarWindow in the BarApp constructor and then
use that throughout the file rather than getting the pointer from the window
each time by calling BarView(). BarView() is still available in the header
for other classes though.

I moved some message constants around since it was getting a bit jumbled.
Most of the messages related to settings are in PreferenceWindow.h.
fChangeState is moved to BarView.h since that is where the ChangeState()
function is and BarView.cpp uses that constant.

The time interval and format constants are in TimeView.h.

Make some methods public in their respective classes where it made sense.
The preference window methods to update dependent items are public, that
might get called from BarWindow when a message gets received at some point.

Also made ShowHideTime() and Time() public in StatusView.h. These methods
activate showing and hiding the clock and return the fTime clock object.
No reason they should be private.

I reindented the StatusView.h and PreferenceWindow.h headers to the standard
style. Question here, are the public: protected: and private: lines inside
of classes suppose to get indented 1 tab or not? I've seen both, the style
guide says no indent but 1 indent seems reasonable and looks pretty good.

Style fixes here and there. That's enough for one commit I think.


# 2a2dc95aa1f99080b0589186770f10ead41621a5 09-Apr-2012 John Scipione <jscipione@gmail.com>

Update timeView popup menu


# 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.


# 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.


# 8aab28f19b8361c9eebdd81c7ae645ba3d10096e 30-Oct-2011 Rene Gollent <anevilyak@gmail.com>

And more fixes.



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


# 7625ce51505cad2b0b3b51cbc63ac0b205f2a9da 30-Oct-2011 Rene Gollent <anevilyak@gmail.com>

Factor out an _SaveSettings() call to write back settings. Use it to commit tray item changes immediately instead of at Deskbar exit.


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


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

Adjust the previous change to use paths instead of entry_refs.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43005 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


# 9e8a970bd56e3888b93167d1ab60deef85b7a899 24-Mar-2011 Jonas Sundström <jonas@kirilla.com>

A better for the leaf logo bitmap.

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


# 1ad8c760ed6f0e7e30f5f3154b0c4639a77b0a1b 06-Mar-2011 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

More style cleanup patches from John Scipione as part of #7052.


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


# 908d7185b01b1a5a4d1fc23ed550d2c97117b06f 22-Jan-2011 Rene Gollent <anevilyak@gmail.com>

Remove unused Draw function. Fixes CID 10350.


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


# 9e9c8091e7ebc92a8808463b05dd4249ccb2f6d9 20-Oct-2010 Rene Gollent <anevilyak@gmail.com>

Remove the "Full Date" setting and associated madness with respect to
the deskbar's current orientation. Instead, we now always show the full
date, but as a tooltip rather than switching the timeview's display
based on a mouse click.



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


# 68fdcbe01d66c041edafab8ff63929132639346e 11-Aug-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

CID 926 : Memory leak


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


# 2f0eb7b11e9cdb428b2da5bfaac25c9998b02e03 02-Jul-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Introduce a new method in BCountry to get the first day of week (monday or sunday)
* Localize date in deskbar properly, and use the new API to show the calendar. The "show european date" checkbox is now gone.


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


# 3fc995d101cdc6b31f12bb35f9681f4f16b8a408 24-Jun-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

* Deskbar now uses localized time from locale kit. Thus the "24 hour
clock" setting is not needed anymore.
* The locale kit now provide a less complete 'full' time format : hour
minutes seconds, I don't think anyone cares much about the "UTC + 1" or
other similar stuff.


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


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

* The Deskbar will now intercept control+alt-clicks, and will start to move the
Deskbar around as other windows do (more or less), as suggested in ticket
#6029.


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


# 4eb0cbb044cf538f18c0d252934a5bcaa33bfd34 07-May-2010 Matt Madia <mattmadia@gmail.com>

Updated TR_CONTEXT to be B_TRANSLATE_CONTEXT, relating to #5408.


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


# 61863f2c44866b672437629037b377f723e288de 06-May-2010 Matt Madia <mattmadia@gmail.com>

Updated to use B_TRANSLATE* macros. relates to #5408.

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


# ae7a6e3a6ffcfb7ad151d684822cd0f2f5bc77af 10-Apr-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by mt (ticket #5573) : localize deskbar. Thanks !


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36117 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


# 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


# 0bec71008b2f1f836d244b64824e0ba99ab6c391 14-Sep-2008 Stefano Ceccherini <stefano.ceccherini@gmail.com>

moved the NULL check before dereferencing the view pointer. CID 1063

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


# 157cd8913e6173dae21b43aef5bfd5419d4a5f68 16-Jun-2008 Alexandre Deckner <alex@zappotek.com>

- Calculating the space left for deskbar replicants was broken. The TimeView could overlap on the left. This fixes #1408
- Placement of the time text was broken. With big fonts, the text was way too low. Using text bounding box now, it looks pretty and robust too.
- Fixed the height of the time view to the replicant height. The view has a fixed height now and can never overlap deskbar at the bottom (horizontal deskbar mode) or other replicant
below.


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


# ced3755c30e6d91cb23175a888f32355401fe39d 28-Mar-2008 Axel Dörfler <axeld@pinc-software.de>

* Fixed a memory leak in Deskbar's BarWindow.cpp when adding a deskbar
replicant failed as pointed out by Mark Hellegers.
* Clarified ownership of the passed in message in TReplicantTray::AddIcon()
as well as BShelf::_AddReplicant().


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


# f6742aab04209bd1973fb743c30c6c71578f25be 13-Jan-2008 Jérôme Duval <korli@users.berlios.de>

whitespaces => tab


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


# 66eba86f4b3c2eef6462d090e93245fc60d7127b 16-May-2007 Axel Dörfler <axeld@pinc-software.de>

* Applied patch by Jonas Sundstrom: fixed the usage of B_UTF8_ELLIPSIS hopefully
everywhere in the tree.
* Added the ellipsis to "About Haiku" in Deskbar as well.
* Minor cleanup of Deskbar's StatusView.cpp


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


# a5210ab17da5a6784a814bb69c59ba6bf5401432 11-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

Imported files from OT-current:
* ExpandoMenuBar.cpp 1.18
* CalendarMenuItem.cpp 1.6
* WindowMenu.cpp 1.3
* TimeView.cpp 1.14
* StatusView.cpp 1.18
* BarWindow.cpp 1.8


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


# 9c50f36ed7d1700b6bc940524b617c83b9cc9f4d 09-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

Now has some error checks in TReplicantTray::AddIcon() - this fixes bug #222.


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


# 465b54cd6505462c140f2d71e927558a3bfcd731 17-Jan-2006 Axel Dörfler <axeld@pinc-software.de>

Fixed crashing bug in the test environment on quit.


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


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

Enabled Deskbar add-ons. They don't work that good, but they don't crash
the Deskbar anymore. It's still disabled for the libbe_test build, though
(as it will find incompatible add-ons via queries there).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15834 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


# 7d93e66823a7669a7b1baebb5d9f6a38cdb6a4c3 06-Dec-2005 Axel Dörfler <axeld@pinc-software.de>

Added the Deskbar to the libbe_test environment - I thought I had committed this already...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15379 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


# 9c910f9e80e8d06a921d44d4e2fcf1ae02f0737d 06-Jul-2005 Stephan Aßmus <superstippi@gmx.de>

first draft of a Haiku logo for the Deskbar, link against Haiku libs when building for Haiku

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13508 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