Commit Graph

5951 Commits

Author SHA1 Message Date
Alex Wilson
53617d366d Override a bunch of methods in layout related classes for FBC stability.
* Especially made sure to override archiving methods, since these are called rarely, so the cost is very minimal
* Otherwise, the closer a class is to a base class, the more likely I was to give it all the overrides.
2011-11-05 14:25:06 -06:00
Alex Wilson
0c8b758c09 Add a BView::LayoutChanged() method, called after layout of this view and children.
Fixes #7683.
2011-11-05 01:03:07 -06:00
Alex Wilson
fceb7ee27e Add FBC padding + Perform() methods to GridView and GroupView.
We probably won't need these, but these additions are cheap.
2011-11-04 23:08:11 -06:00
Alex Wilson
8151838e38 Add FBC padding to all (I think..) of the visible Layout related classes. 2011-11-02 00:29:33 -06:00
Alex Wilson
a851b3ad54 Add Perform() methods to all the layout-related classes that needed them. 2011-10-31 14:57:30 -06:00
Alex Wilson
9e9698bcd8 Delete scratch files that weren't meant to be commited... 2011-10-28 14:17:00 -06:00
Alex Wilson
e7b0dc78f7 Now that child classes aren't overriding the various InvalidateLayout() methods, we can take advantage of some guarantees to simplify/clean/optimize the layout invalidation propagation mechanisms! 2011-10-28 14:16:54 -06:00
Alex Wilson
c74faed432 Add BLayoutItem::LayoutInvalidated() hook. Leave BLayoutItem::InvalidateLayout() (and therefore BLayout::InvalidateLayout()) virtual. This is needed to let BLayout override it for invalidation propagations. 2011-10-28 14:16:52 -06:00
Alex Wilson
61eb1f1d19 Replace remaining InvalidateLayout()'s with LayoutInvalidated(). Also do a bit of cleanup/move methods around. 2011-10-28 14:16:49 -06:00
Alex Wilson
eee4243d35 De-virtualize BView::InvalidateLayout() and introduce LayoutInvalidated() hook, like BLayout. 2011-10-28 14:16:43 -06:00
Alex Wilson
b38ea98f52 Devirtualize BLayout::InvalidateLayout(), add a protected hook BLayout::DoLayout(). This will allow for much better control over the propagation of layout invalidations, and therefore cleaner, more optimal code. 2011-10-28 14:16:39 -06:00
Alex Wilson
449f014bcc Fix typo in BLayoutItem::SetLayout() which led to passing the wrong layout to the DetachedFromLayout() hook. 2011-10-28 14:16:37 -06:00
Alex Wilson
f87e4c7302 Fix bug in Layout.cpp's ViewRemover struct. operator() didn't deal well with NULLs. 2011-10-28 14:16:34 -06:00
Alex Wilson
90e615679c Fix a bug in BLayout::AddItem() where the right conditions + an error would have
caused the wrongful removal of a BView from its parent.
2011-10-28 14:16:31 -06:00
Alex Wilson
4e0131f51b Rename BLayout::DerivedLayoutItems() to DoLayout(), which is consistent with BView::DoLayout(). Also adjusted child classes and documentation. 2011-10-28 14:16:25 -06:00
Alex Wilson
cc1ca167a4 Fix a memory leak I introduced with my modification of BLayout::RemoveItem() and add comments so that it doesn't happen again. Also resolve some TODOs on the appropriate timing of calls to hook methods in BLayoutItem/BLayout. 2011-10-28 14:16:19 -06:00
Alex Wilson
fa01d08496 User BView's layout item tracking functionality to simplify and optimize some methods in BLayout and BView.
Delete BLayout::RemoveViewRecursive() as it is no longer needed.
Add a few TODO's.
2011-10-28 14:16:16 -06:00
Alex Wilson
30b07d019d Use the classes from AutoDeleter.h to improve BLayout::AddView() and to simplify the ViewRemover struct created for BLayout::AddItem(). 2011-10-28 14:16:13 -06:00
Alex Wilson
ea907ab587 Use BView's ability to track what layout items reference it to simplify BLayout::IndexOfView(). This also changes the semantics slightly, but I think it is a logical change. 2011-10-28 14:16:10 -06:00
Alex Wilson
bd97b9adba Add a BObjectList<BLayoutItem> to BView::fLayoutData that keeps track of any BLayoutItems that refer to this view that are part of a layout. BLayoutItem does the registering/deregistering of the items, and BView::Private proxies fLayoutData for us. Currently, this is not used anywhere, but there are many places where it will be used soon. 2011-10-28 14:16:07 -06:00
Alex Wilson
edb4c8244c Add a method to BView::Private that calls BView::_RemoveSelf().
Add a struct to kits/interface/Layout.cpp that uses BView::Private to
provide RAII mechanics for the removal of views (calling
BView::Private::RemoveSelf()).
Use the new struct to simplify BLayout::AddItem().
2011-10-28 14:16:03 -06:00
Philippe Houdoin
1ce29039cd Revert r42812. As pointed by Michael, one can use
BUSBDevice::GetDescriptor() to retrieve whatever descriptor, including a 
complete configuration descriptor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-24 21:02:14 +00:00
Rene Gollent
b0efb2e13b Skip non-file entries when enumerating OpenGL renderer add-ons. Fixes #8039.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-20 22:54:03 +00:00
Michael Lotz
7d7b963225 * Remove the BNetworkDevice::AddPersistentNetwork() again and instead introduce
BNetworkRoster::{Count|GetNext|Add|Remove}PersistentNetwork() as it fits
  better (thanks Philippe for the heads up).
* Implement the backend for these functions in the net_server and also move
  conversion of the wireless_network based format into the settings based format
  there.
* Implement removal of a network from the settings and make adding a new network
  with the same name replace the old one instead of just adding multiple ones.
  Might need to change this in the future depending on how we want to handle
  multiple networks with the same name (i.e. distinguish based on BSSID or
  similar).
* Fix apparent oversight that caused configured networks _not_ to be used in the
  auto join attempt.
* Remove auto joining open networks. I've been bitten by that more than once now
  because we happen to have an open network in the neighbourhood that I now
  accidentally used to transfer quite a bit of (unencrypted) stuff before
  noticing... In the future, one will instead have to explicitly join an open
  network once and store that config. Note that the driver will actually still
  auto-associate with open networks due to how things are set up currently.
  Note also that the auto join will fire join requests whenever there's a
  disassociation event, so you might see spurious join dialogs when the
  wpa_supplicant actually just re-establishes the connection.
* Make join requests async again. Instead of waiting for a synchronous reply of
  the wpa_supplicant we instead return success when the request has been sent.
  While the API call might still be made synchronous again in the future, the
  net_server should really not block on an external application. In the case of
  the wpa_supplicant we would otherwise deadlock when using the new
  *PersistentNetwork() API after a successful join, and in other cases we might
  just unacceptably delay other calls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-09 19:56:19 +00:00
Philippe Houdoin
d41559757e Expand usb_raw ioctl to support retrieving full usb configuration descriptor from userland, not only the header part.
I try to keep UBSConfiguration binary compatibility, but proofreading is welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-09 15:15:15 +00:00
Philippe Houdoin
13cb2a2930 Code cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-09 15:12:05 +00:00
Axel Dörfler
49774900fb * Now sanitizes the white space in the header fields before adding them to the
message (ie. multiple spaces are compressed to a single one, tabs and other
  white space is replaced with a space).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-08 19:25:10 +00:00
Axel Dörfler
ba91e5bbcd * Trim white space from the field names - this removes for example an extra
space in front of *every* attribute.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-08 19:03:57 +00:00
Axel Dörfler
0c7f804cec * mail_util.h was not self-contained.
* Added a few missing breaks in MailProtocolThread::MessageReceived()!
* Minor coding style update.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-08 18:41:20 +00:00
Michael Lotz
a1b98367ae Add a way to add persistent (configured) wireless_networks that will eventually
be stored by the backend in the net_server. I put it in BNetworkDevice because
that is where network enumeration is done as well, but I'm not sure that it fits
there particularly well.
Since BNetworkDevice::GetNetwork() directly interfaces with the driver and gets
the networks from scan results, such persistent networks don't yet show up in
those enumerations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-10-07 10:23:47 +00:00
Axel Dörfler
a35bbf9fb3 * Coding style cleanup.
* The Read() method remembers the last error, so you don't have to check each
  read when you do several in a row.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-09-30 00:02:22 +00:00
Axel Dörfler
3f0171fff5 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-09-29 22:46:35 +00:00
Axel Dörfler
e98a850504 * Minor cleanup.
* Removed non-Haiku compatibility code - it's just no longer needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-09-29 22:45:58 +00:00
Oliver Tappe
6846765fbf Work on #7947 (CalendarView not respecting locale's start of week)
* support all weekdays as start of week, not only Sunday and Monday
  (at least Saturday is used for real, too)
* introduce BWeekday as enumeration of weekdays (currently in Locale.h,
  may be moved somewhere else later)
* change CalendarView to use BDate as its model, not individual values
  for day, month and year, such that no more date computation is done 
  in CalendarView itself
* some more style cleanups in CalendarView along the way
* add monthwise paging to CalendarView
* adjusted Deskbar and Time preflet accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-09-07 21:41:57 +00:00
Oliver Tappe
aac8a4c3c4 Fix clamping in BDate::AddMonths():
* use _DaysInMonth() instead of DaysInMonth(), as the latter only works
  for valid dates, which we do not have if the day needs to be clamped
  to the maximum value for the current month


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-09-07 21:31:06 +00:00
Oliver Tappe
87663db420 Minor cleanup: respect 80-chars line length limit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-28 10:15:41 +00:00
Oliver Tappe
1e07062b40 Apply patch by Hamish, closing #7947 - thanks!
* determine first day of week and draw calendarview accordingly
* some cleanup: drop superfluous DateTimeView::Draw()
* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-27 21:19:56 +00:00
Stephan Aßmus
26fbe862cf Patch by John Scipione: Added cbrt() function to the supported functions
and factrorial expression support. Closes ticket #7945, thanks a bunch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-26 10:31:29 +00:00
Oliver Tappe
04c60f4472 * fix stuck loops in Replace...() on single chars in case the old and new character
are the same (Eclipse was complaining about 'assignment to self', which got me 
  looking at the code ...)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-23 19:59:50 +00:00
Oliver Tappe
e267238ff1 * add predicate FormattingConventions::AreCountrySpecific()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-21 17:18:31 +00:00
Oliver Tappe
7ba0381def * add protected accessor for baseline offset to StringItem, as that value is of
interest to derived classes

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-21 17:17:13 +00:00
Axel Dörfler
efa3bc3eca * Now reads the irs.conf from /boot/common/settings/network/irs.conf instead of
/etc/irs.conf. Untested.
* There are more config files, but I'm not even sure what they are used for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-19 19:12:29 +00:00
Oliver Tappe
45f2f22b52 * update (not-so-)optional package ICU to 4.8.1, which contains interesting stuff
for message formatting
* adjust LocaleKit to use namespace 'icu', as ICU has been configured to no longer
  use a version specific namespace
* adjust LocaleKit to general API changes in ICU 4.8
Note: all software using ICU (like WebPositive) needs to be rebuilt!
Note: the ICU package for PPC needs to be updated before it can be used!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-18 22:13:06 +00:00
Axel Dörfler
f1383bbf4d * Fixed build; should have been part of r42620.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-10 23:22:55 +00:00
Adrien Destugues
5ff6f0d491 Patch by John Scipione : use B_WOULD_BLOCK when locking fails, to avoid returning B_ERROR like when there's an ICU error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-09 17:12:05 +00:00
Adrien Destugues
ee298c8b81 * Fix DecoratorFrame() for kLeftTitledWindowLook windows
* Use it in notification window for better positionning.
Thanks augiedoggie for reporting the problem !


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-06 21:13:28 +00:00
Jérôme Duval
77f593de38 Patch from X512 (ticket #7408): Don't notify input server of focus change if window is not active.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-04 17:49:45 +00:00
Jérôme Duval
b0b4ce7e95 Patch from X512 (#7408): only send input method aware messages for active windows
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-03 20:48:23 +00:00
Clemens Zeidler
3b01da1b46 Add compatibility file again. Should fix #7858.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-01 02:44:22 +00:00
Clemens Zeidler
2dae355ecb Fix window stack api and Desktop::WindowForClientLooperPort lock assert.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-01 00:56:23 +00:00