Commit Graph

26246 Commits

Author SHA1 Message Date
Stefano Ceccherini
c96c57848d this was supposed to be part of the previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 12:04:34 +00:00
Stefano Ceccherini
ad7014b0d8 Other small style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 12:00:52 +00:00
Stefano Ceccherini
6aa49afc14 set fScanLine to NULL after freeing it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 10:44:43 +00:00
Stefano Ceccherini
a50feb079d more style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 10:38:46 +00:00
Stefano Ceccherini
6da7e6450f Style changes. No functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 10:30:45 +00:00
Stefano Ceccherini
9179339c4a free the allocated strings in error case. CID 864
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 08:01:33 +00:00
Stefano Ceccherini
59afe07d2c use MemoryDeleter to make sure we free 'flattenedRuns' on error, in every case. CID 905
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 07:49:27 +00:00
Stefano Ceccherini
697dfc3e47 delete -> free(), as the array is allocated with malloc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 07:37:03 +00:00
Stefano Ceccherini
2749af3ff8 BTextView::FlattenRunArray() doesn't take ownership of the passed array. Fixes CID 904
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 07:35:58 +00:00
Stefano Ceccherini
b56c51bcba set fPanRamp and fGainRamp to NULL after deleting them, otherwise they could be double-freed. Also dont' check for NULL before calling delete. CID 1230 and 1231
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 07:17:27 +00:00
Stefano Ceccherini
dd52d6d1a0 the 'base' string was leaked. CID 1296
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 06:51:59 +00:00
Stephan Aßmus
ff168f4e77 Use the dedicated BView constructor for using layout management.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 20:28:35 +00:00
Stephan Aßmus
14f6345690 Several fixes to BMenuField layout calculations.
* The most important fix is that in BMenuField::_ValidateLayoutData(),
  divider was calculated, but then never used. If the menu field was not
  using the layout management, it should take the existing fDivider into
  account, but never did. This caused #2728.
* Added some tracing that helped me debug this.
* Fixed a bunch of layouting inconsistencies. It will also improve some
  unnecessary resizing of the menu bar.

Will test all of this some more. But in the test app I do have, the BMenuField
works more like in BeOS now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27508 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 19:01:54 +00:00
Stephan Aßmus
0095fe722a * Added a comment about the purpose of the code in AttachedToWindow().
* Improved FrameResized(). The "diff" is actually between the new location
  of the right side (Frame().right) and the location where it probably was
  in the parent before it is resized (fMenuField->Bounds().right - 2).
  Could be that this change is wrong, or at least, not yet correct. Will
  test on a different machine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 18:52:30 +00:00
Stephan Aßmus
0ce571055a This class helps me with tracing function enter/leave output. It is passed
a static integer that it uses for indentation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 18:46:26 +00:00
Michael Lotz
fbf8d9c8dc Remove superfluous NULL check as menu being non-NULL is asserted at the top.
Fixes CID 1075.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 18:09:35 +00:00
Michael Lotz
f679edb6e4 Don't build the context menu before checking for NULL. Fixes CID 1077, though
the Tracker sources should really be cleaned up to use nothrow and/or exception
handling more consistently.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 17:51:13 +00:00
Michael Pfeiffer
7aafe66984 As reported in ticket #2477 the fix in r27149 does not work for NTFS partition.
Now all partitions are bootable that do not contain a partitioning system.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 12:43:41 +00:00
Axel Dörfler
959ff00dde * Removed Bitstream Vera fonts, they are replaced by the DejaVu ones.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 11:16:12 +00:00
Axel Dörfler
dea4ee1980 * Changed the error return by bfs_link() to B_NOT_SUPPORTED.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 10:39:29 +00:00
Axel Dörfler
4722f139ea * If we're in the kernel debugger, we won't even try to use ACPI to power off,
as we cannot do so with interrupts turned off (ACPI needs to allocate memory
  dynamically).
* Turn off interrupts right before going to sleep (_GTS), this at least works
  in VMware, maybe it also works on real hardware.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-14 08:52:14 +00:00
Michael Lotz
7b7464670e OK, how completely can one mess up a single change? Fixed the intel_extreme
accelerant I broke.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 21:20:14 +00:00
Stephan Aßmus
7302e28d1b Added BTextControl test. BTextControl seems to need some love.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 19:50:01 +00:00
Michael Lotz
28f362c129 Again fix the previous commit. Obviously we only want to delete the disc object
if it actually failed to initialize. Thanks Stephan for spotting that.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 19:38:52 +00:00
Michael Lotz
7c57e58de9 * CID 874 and CID 875: Fix leaking the session object GetSession() allocates.
* CID 876: Fix leaking the disc object in case it fails to initialize.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 19:26:04 +00:00
Stephan Aßmus
21527c4e77 Added BScrollBar test.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27495 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 19:21:55 +00:00
Stephan Aßmus
21bb6bd22b * Update header indentation.
* Added BScrollBar::SetOrientation().
* Improved _DrawArrowButton() to have a good visual result even when the
  scroll bar does not have the standard width or height.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 19:20:18 +00:00
Stephan Aßmus
65785bf7fd * Don't do anything in SetOrientation() if orientation is the same as the
current one.
* When calculating the thumb and bar frames, handle the case when the object
  doesn't have a label, but does have an update text.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 18:42:32 +00:00
Michael Lotz
2f464b193f Fix the build of the intel_extreme.accelerant, I obviously compiled the wrong
target when I checked it. Move the target display_mode declaration back above
the check but remove the dereferencing assignment. If proposing the display
mode succeeds it also initializes target. Thanks luroh for noticing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 18:42:03 +00:00
Michael Lotz
479731a193 Fix previous commit, forgot to inlude <new> for use of std::nothrow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 18:25:26 +00:00
Michael Lotz
95d570323b * CID 145 and CID 146: Use delete[] to delete the arrays.
* Also use new(std::nothrow) for the allocation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 18:22:44 +00:00
Michael Lotz
6b9d141359 CID 1039: Dereference mode only after checking it for NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 18:00:47 +00:00
Michael Lotz
c66c6997db CID 225: If the field size was <= 0 the field buffer wasn't allocated but still
used in the switch statement. Change that to continue early when a filed size of
<= 0 is encountered.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27488 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 17:31:13 +00:00
Michael Lotz
bbe2597fb6 CID 18 and CID 19: Fix leaking the cursor data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 16:39:11 +00:00
Michael Lotz
246a908734 * CID 1012: Fix leaking the OffsetFile in case it fails to initialize.
* Use std::nothrow (the rest of the file already used it).
* We also have to keep the source file around and properly dispose it, as
  OffsetFile doesn't take ownership of it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 16:30:48 +00:00
Michael Lotz
062952adf7 Initialize fFile to NULL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 16:26:02 +00:00
Michael Lotz
3e8d3c5f98 * CID 1090: Check the view pointer for NULL before dereferencing it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:55:15 +00:00
Michael Lotz
fccbe8f1a1 * CID 525: Check the return of _UpdateModeList() as otherwise fModeList can
still be NULL although it is used further down.
* CID 526: Check the front buffer to be available before using it in SetMode().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:51:16 +00:00
Michael Lotz
7c618f130f Remove accidentally introduced whitespace in last commit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:30:19 +00:00
Michael Lotz
8050519bed CID 157: Fix usage of *covers instead of cover which in this case indeed is NULL
and should have lead to a crash.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:28:31 +00:00
Michael Lotz
4071a5a97b CID 930: Fix memory leak in error case.
Note that this file has a completely different coding style, violating ours for
consistency until the whole file can be cleaned up.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 15:22:30 +00:00
Michael Lotz
84cd8e6902 CID 1251: If the NetStack::Init() fails, return the corresponding error instead
of setting the global net stack to a deleted value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 14:41:42 +00:00
Michael Lotz
2391ca5568 CID 56: Fix the wrong NULL check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 14:27:31 +00:00
Stephan Aßmus
ebcba0bec8 Free query in error code path. Fixes CID 927.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 14:04:13 +00:00
Michael Lotz
3ba6733d61 * CID 312 and CID 313: The device can be NULL in ReadLockPartition().
* CID 314 and CID 315: Same as above just for WriteLockPartition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 13:57:40 +00:00
Michael Lotz
b1effc0c77 CID 316: If path can be null, path->InitCheck() shouldn't be used. Split it up
into two seperate checks instead and return B_BAD_VALUE on a passed NULL path.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27475 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 13:43:50 +00:00
Michael Lotz
020f56a07f CID 323 and CID 324: Also check the results of these dynamic_casts, sorry for
not combining with the previous commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 12:36:17 +00:00
Michael Lotz
446d046c5e CID 325: Be defensive and check the results of the dynamic_casts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 12:28:46 +00:00
Ingo Weinhold
034fb25c4d * The image was create one byte too short. Fixes #2722.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 10:04:51 +00:00
Axel Dörfler
57b9debf76 * Some index updating functions did not take into account that not all nodes
are put into all indices. For example, symlinks aren't part of the size
  index. This fixes bug #2704.
* Also, Inode::NeedsTrimming() now ignores symlinks that have no data stream,
  it's const now, too.
* Added helper methods Inode::In{Name|Size|LastModified}Index(), and use it
  where appropriate.
* Clarified Inode::Create() description with regards to name vs. parent.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 09:47:55 +00:00