diff --git a/src/apps/deskbar/BarMenuBar.cpp b/src/apps/deskbar/BarMenuBar.cpp
index b246eb3..333e06a 100644
a
|
b
|
Except as contained in this notice, the name of Be Incorporated shall not be
|
26 | 26 | used in advertising or otherwise to promote the sale, use or other dealings in |
27 | 27 | this Software without prior written authorization from Be Incorporated. |
28 | 28 | |
29 | | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks |
30 | | of Be Incorporated in the United States and other countries. Other brand product |
31 | | names are registered trademarks or trademarks of their respective holders. |
| 29 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered |
| 30 | trademarks of Be Incorporated in the United States and other countries. Other |
| 31 | brand product names are registered trademarks or trademarks of their respective |
| 32 | holders. |
32 | 33 | All rights reserved. |
33 | 34 | */ |
34 | 35 | |
… |
… |
TBarMenuBar::SmartResize(float width, float height)
|
78 | 79 | BRect frame = Frame(); |
79 | 80 | width = frame.Width(); |
80 | 81 | height = frame.Height(); |
81 | | } else |
| 82 | } else |
82 | 83 | ResizeTo(width, height); |
83 | 84 | |
84 | 85 | width -= 1; |
… |
… |
TBarMenuBar::SmartResize(float width, float height)
|
96 | 97 | void |
97 | 98 | TBarMenuBar::AddTeamMenu() |
98 | 99 | { |
99 | | if (CountItems() > 1) |
| 100 | if (CountItems() > 1) |
100 | 101 | return; |
101 | 102 | |
102 | 103 | BRect frame(Frame()); |
… |
… |
TBarMenuBar::AddTeamMenu()
|
112 | 113 | void |
113 | 114 | TBarMenuBar::RemoveTeamMenu() |
114 | 115 | { |
115 | | if (CountItems() < 2) |
| 116 | if (CountItems() < 2) |
116 | 117 | return; |
117 | 118 | |
118 | 119 | if (fAppListMenuItem) { |
… |
… |
TBarMenuBar::RemoveTeamMenu()
|
121 | 122 | fAppListMenuItem = NULL; |
122 | 123 | } |
123 | 124 | |
124 | | BRect frame = Frame(); |
| 125 | BRect frame = Frame(); |
125 | 126 | SmartResize(frame.Width(), frame.Height()); |
126 | 127 | } |
127 | 128 | |
… |
… |
init_tracking_hook(BMenuItem* item, bool (*hookFunction)(BMenu*, void*),
|
179 | 180 | return; |
180 | 181 | |
181 | 182 | BMenu* windowMenu = item->Submenu(); |
182 | | if (windowMenu) |
183 | | // have a menu, set the tracking hook |
184 | | windowMenu->SetTrackingHook(hookFunction, state); |
| 183 | if (windowMenu) { |
| 184 | // have a menu, set the tracking hook |
| 185 | windowMenu->SetTrackingHook(hookFunction, state); |
| 186 | } |
185 | 187 | } |
186 | 188 | |
187 | 189 | |
… |
… |
TBarMenuBar::InitTrackingHook(bool (*hookFunction)(BMenu*, void*),
|
192 | 194 | BPoint loc; |
193 | 195 | uint32 buttons; |
194 | 196 | GetMouse(&loc, &buttons); |
195 | | // set the hook functions for the two menus |
196 | | // will always have the be menu |
197 | | // may have the app menu as well (mini mode) |
198 | | if (fBeMenuItem->Frame().Contains(loc) || both) |
| 197 | // set the hook functions for the two menus |
| 198 | // will always have the be menu |
| 199 | // may have the app menu as well (mini mode) |
| 200 | if (fBeMenuItem->Frame().Contains(loc) || both) |
199 | 201 | init_tracking_hook(fBeMenuItem, hookFunction, state); |
200 | 202 | |
201 | | if (fAppListMenuItem && (fAppListMenuItem->Frame().Contains(loc) || both)) |
| 203 | if (fAppListMenuItem && (fAppListMenuItem->Frame().Contains(loc) || both)) |
202 | 204 | init_tracking_hook(fAppListMenuItem, hookFunction, state); |
203 | 205 | } |
204 | 206 | |