Commit Graph
125 Commits
Author SHA1 Message Date
Jérôme Duval a03ac89526 fixed some property_info and value_info for BShelf, BMenu, BWindow and BView
real support is to be implemented for a lot of them


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17728 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-05 15:57:58 +00:00
Stefano Ceccherini b9af5bfa5c - Fixed the recently introduced bug where menus would open again once closed. -Now hitting ESC will close the menu. - Reverted to the other variation of GetMouse() as Axel's advice
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-30 19:14:54 +00:00
Axel Dörfler 0dcf122e37 Removed now incorrect comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-29 15:41:09 +00:00
Stefano Ceccherini c1dd282b9b Fixed some bugs in StealFocus, RemoveFocus and SetStickyMode
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-28 08:50:52 +00:00
Stefano Ceccherini 848b89034e More hacks to BWindow's mousedown handler, to fix some problems with menus. Fixes bug 610 among other things. Note: I don't like this code so much, but apparently BeOS handles it in a similar way. I accept suggestions on how to improve this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-27 13:00:35 +00:00
Stefano Ceccherini e061d1bae5 an eventually opened menu is now quit in BWindow::DispatchMessage()
before sending a B_MOUSE_DOWN message to any other view. This fixes bug 
594 for real and another bug in BMenuBar.  BMenuBar tracking will also 
be simplified a bit because of this. Install items to a NULL window on 
Show() as does R5 (although I don't know why yet). 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-27 09:57:14 +00:00
Stefano Ceccherini 03f2d7791e Switched back to the GetMouse variation which does NOT check the message
queue, should fix bug 594 and not risk of losing clicks. SetStickyMode() 
calls StealFocus() to give the chance to be keyboard-navigated to menus. 
Added an extra (temporary) InvalidateLayout() because some items weren't 
added in 
some cases (Tracker's attributes menu for example)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-26 18:13:38 +00:00
Stefano Ceccherini 73f99cd6ae reverted axel's change to menu, which introduced some other problems, and I can't reproduce that problem anymore. Axel, can you verify, please ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-26 17:28:18 +00:00
Axel Dörfler 712c1e8c39 Fixed the BMenuBar not spanning over the whole window width for MediaPlayer
and VLC (what a coincidence :)).
Would be nice if there is a better solution, though...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 16:54:32 +00:00
Stephan Aßmus 431da4dd4b AddItem(..., frame) used AddItem(..., index) which
triggered a debugger call -> refactoring and cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-22 09:53:08 +00:00
Stefano Ceccherini b0f89f914d Fixed the problem mentioned in bug 484, some cleanups, implemented
BMenu::InvokeItem() more correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-20 22:36:38 +00:00
Stephan Aßmus 2a3de9bc1d * use new (nothrow) when checking the returned pointer
* better handling of errors in various versions of AddItem()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-19 09:39:54 +00:00
Stefano Ceccherini f711110191 Refactored the AddItem mechanism. Now the private _AddItem() method doesn't lock the looper or invalidate the layout anymore, which is done by the caller. This way AddList is much more efficient.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-19 08:03:11 +00:00
Stefano Ceccherini 925479d7b3 Added a new method RelayoutIfNeeded(), which does the real Layout invalidation, it's called by menubar and menu. This fixes the menufields not being resized. Note that a problem still remains, will be fixed shortly (hopefully)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-09 21:48:51 +00:00
Stefano Ceccherini 63b7888854 BMenu::InvalidateLayout() should only sets a variable, the real invalidation is done on Draw() or AttachedToWindow() (like on R5). This fixes bug 567 (at least the crash in HotEdit)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-07 19:58:07 +00:00
Stefano Ceccherini 4436b7269d Menuitems are layoutted better, fixing bug 526
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-30 20:24:30 +00:00
Axel Dörfler 9c418bc0f9 Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-29 14:08:32 +00:00
Stefano Ceccherini 05e515d56c hopefully improved menu tracking. Among other things, this fixes bug 461
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-22 17:56:21 +00:00
Stefano Ceccherini 59d1b7be9d It's a good idea to snooze AFTER we've checked the possible exit conditions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-21 11:33:02 +00:00
Stefano Ceccherini 48688dcd5f Fixed a bug in menu tracking: in some cases you had a goal of 1 pixel when trying to enter a submenu ( http://flickr.com/photos/johndrinkwater/131805244 )
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-20 20:56:57 +00:00
Stefano Ceccherini b03deb09db Menu settings are now handled by the app_server. As a result, changing them does something, although they aren't saved to disk yet. 'click_to_open' is not checked anymore, because it was useless anyway, I'll remove it from the Menu preflet too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-19 20:04:19 +00:00
Stefano Ceccherini 1b5b2e4c35 MenuItems don't flicker anymore when a submenu opens (fixes bug 484). Implemented popupmenu's 'clickToOpenRect' feature, used by tracker's dirmenus, for example (fixes bug 523
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-18 20:32:10 +00:00
Stefano Ceccherini 4697016070 Lowered the delay in menus after which they don't switch to sticky mode, should fix bug 491, although its not really a bug
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-17 14:13:08 +00:00
Stefano Ceccherini 415c63bee2 PopUpMenus didn't respect the openanyway setting (sticky mode), they always set it. And even in that case, they weren't working correctly. This should fix bugs 463 and 476. This might not work if click to open isn't selected in the menu prefs, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-15 16:57:51 +00:00
Stefano Ceccherini 36aa2198b7 Some more changes, fixed bug 487, added a small hysteresis so menus could be more nice to navigate, some corrections in popupmenu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-15 12:42:34 +00:00
Stefano Ceccherini 0e0b8fd554 more fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-12 11:25:59 +00:00
Stefano Ceccherini 7d550b53a0 and there, the usual forgotten stuff
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-11 20:53:11 +00:00
Stefano Ceccherini 2191a09a93 big improvements for menus. The tracking is in many ways on par with r5, except for a few things, like diagonal movement and that grandparent bug
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-11 20:20:41 +00:00
Stefano Ceccherini 9c5c552dd6 more fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-07 17:44:02 +00:00
Stefano Ceccherini bf5d7973b9 Obviously I put in the usual 'untested last minute change' which broke everything. Should be fixed now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-07 17:24:14 +00:00
Stefano Ceccherini c51421cc0b implemented sticky mode. Let's see how many complaints because it's not perfect at all. Under qemu it's super crappy btw
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-07 16:52:37 +00:00
Stefano Ceccherini 29c407a371 Fixed menus in case the window was hidden (VLC, StyledEdit). This is just a quick fix and will be changed later. Thanks to John Drinkwater for testing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 14:31:46 +00:00
Axel Dörfler 6d9adcf120 Removed a superfluous const_cast and a variable from ChooseTrigger().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17007 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 13:51:28 +00:00
Axel Dörfler cb2998af29 BMenuItem::SetTrigger() and SetAutomaticTrigger() now also update fTriggerIndex.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 13:13:18 +00:00
Axel Dörfler 0f11085c6c * Rewrote MenuItem.h (we're no longer using Be's header).
* Renamed private SetSysTrigger() to SetAutomaticTrigger().
* Added the '_' prefix to private methods that aren't called by anything outside
  BMenuItem (ie. no friend classes either).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-04 13:02:52 +00:00
Stefano Ceccherini 195f58ddbb BMenu::_AddItem() keeps the looper locked for the whole time, other changes: let's see if this fixes that bug
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-03 19:50:16 +00:00
Stefano Ceccherini e90bed06b1 Fixed vlc menubars
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-04-02 22:31:04 +00:00
Stefano Ceccherini 262a2483e2 I woulnd't say the classical last words... but I seem to have fixed latest crashes...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-31 20:13:41 +00:00
Stefano Ceccherini f2e9b063a0 This small change could even fix some big problems with menus... unfortunately I can only reproduce them in vmware, and not in qemu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-31 09:37:59 +00:00
Stefano Ceccherini 793fde40eb This should fix some problems I experienced later. At least, I can't reproduce them anymore
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-29 10:42:54 +00:00
Stefano Ceccherini 35beeaa99f Minor improvements
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 20:22:15 +00:00
Stefano Ceccherini 4185bd8b34 Hopefully simplified BMenu/BMenuWindow relationship and made it more robust.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 13:06:47 +00:00
Stefano Ceccherini 9913366fe7 Reset fAttachAborted otherwise menus never get filled after they have been interrupted once.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-28 06:44:39 +00:00
Stefano Ceccherini 6aa12747cd Stupid me. ConvertToScreen() isn't needed, and I should read more carefully my own code
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 21:50:35 +00:00
Stefano Ceccherini ed49f4afcd Improved OkToProceed(), removed unused file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 21:46:19 +00:00
Stefano Ceccherini f356aedc02 Implemented BMenu::OkToProceed() and used it correctly in BMenu::AttachedToWindow(). For some reason, though, I had to comment it out partially as something is wrong. I haven't debugged, though
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 19:43:05 +00:00
Stefano Ceccherini 7abe70f1b4 Hopefully cleaned up a bit the locking in BMenu::_show()/_hide()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-23 15:33:28 +00:00
Stefano Ceccherini 37cf3d970d Avoid attaching a menu to the BMenuWindow when not needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-22 21:07:35 +00:00
Stefano Ceccherini b80eb9d443 Partially reverted axel's change, because it brings more troubles than benefits (menus lock when they reuse the supermenu's menuwindow). I'll try to resolve the various problems in another way. Some cleanups
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-22 20:47:52 +00:00
Axel Dörfler e87965deed * Fixed a possible crash when removing and adding items from a window.
* This does not yet close bug #233, but could also be a reason for this crash.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-21 17:49:42 +00:00