Commit Graph

4040 Commits

Author SHA1 Message Date
Stephan Aßmus
4df6a8c3fb * As with other controls, for BeOS compatibly behavior, don't shrink
a BTextView via GetPreferredSize() if it is large enough. (Have not
  confirmed this is necessary... gut feeling.)
* Calculate a minimum line height even if the BTextView is empty yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-01 16:12:21 +00:00
Karsten Heimrich
eb1466cf86 * use the screenshot app to take a screenshot
* remove libpng and libz dependency in case we build for Haiku



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-30 21:48:35 +00:00
Ingo Weinhold
366f546e67 Don't fail when the runtime loader debug area can't be found. When we
can load the image files, we can still do symbol lookups just fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-29 00:41:31 +00:00
Stefano Ceccherini
2b389c6e5a don't leak the bmessenger. CID 888
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 15:51:29 +00:00
Stefano Ceccherini
85d7d4bc41 the loop was never entered. CID 93
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 14:36:29 +00:00
Stefano Ceccherini
84dcf4f24f CID 996. Don't leak the BString
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 14:23:39 +00:00
Stefano Ceccherini
2e2f53f614 don't leak extendedPoseInfo on error. CID 997
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 14:19:59 +00:00
Stefano Ceccherini
1c35c27bec renamed static variable to have the s prefix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 07:39:28 +00:00
Stefano Ceccherini
7696317d06 Style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27726 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 07:37:23 +00:00
Stefano Ceccherini
97c7b4da99 minWidth could be used uninitialized. CID 1150
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 07:31:48 +00:00
Stefano Ceccherini
e7d2f0f0e8 fix the problem reported in the TODO by using a reference to pointer
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27724 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-25 06:12:02 +00:00
Stefano Ceccherini
727834785d Added a TODO explaining why BGameSoundDevice::Buffer() is broken. Small style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-24 12:55:25 +00:00
Ingo Weinhold
95d4a71d89 Rather use MAP_PRIVATE instead of MAP_SHARED. It doesn't make a
difference ATM, but will, when we change the semantics of MAP_PRIVATE to
imply MAP_COPY.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 20:34:45 +00:00
Michael Lotz
0b559106bf * Only copy over the list content if resizing/allocating the list succeded.
Fixes CID 1268.
* Remove no more correct comment.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 19:07:13 +00:00
Stefano Ceccherini
250505c99b more small style changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 15:38:32 +00:00
Stefano Ceccherini
92ed85c9ec use nothrow for allocation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 12:41:42 +00:00
Stefano Ceccherini
671fe092d3 Added missing break(s) in switch block in GameSoundBuffer::GetAttributes(). Added missing default case. Avoid double calculation of buffer size
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 12:28:18 +00:00
Stefano Ceccherini
3beb2f72d7 style changes. Also added a TODO taken from a comment in bug #575
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 11:02:58 +00:00
Stefano Ceccherini
0e79ce1ebc Style changes. don't use new to allocate a 2-sized buffer, but use the stack
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27704 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 10:43:02 +00:00
Stefano Ceccherini
c9e6288649 Fixed every (hopefully) CID cases of delete where delete[] should have been used. CID 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 147, 148, 149, 150
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 09:52:45 +00:00
Stefano Ceccherini
2d4df7f2fc CID 80. err was checked twice for the same value. Also add more error checks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 08:33:09 +00:00
Stefano Ceccherini
b0acb3febf Don't leak the BMediaFile. CID 5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 08:14:07 +00:00
Michael Lotz
56c05e04af Actually only allow bytes per row > 0 or B_ANY_BYTES_PER_ROW. Still we don't
actually handle other invalid bpr values like if the width doesn't really fit
into the provided bytes per row for example.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 19:42:35 +00:00
Michael Lotz
f8b51708a6 In case there is no error field in the reply message, make sure that we don't
continue with B_OK. This also fixes CID 1122 where in such a case an
uninitialized token would be returned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 18:15:50 +00:00
Michael Lotz
708f792ecc In r16700 the name and meaning of that loop condition variable was flipped
around, but the condition itself wasn't which resulted in the code never being
executed. Fixes CID 88.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 17:57:31 +00:00
Michael Lotz
e55f4dd23c Remove check for a supplied bytesPerRow < 0. Negative values are valid and
indicate that a default bytes per row for a certain color space and width
should be used (B_ANY_BYTES_PER_ROW). Fixes CID 55.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 17:49:33 +00:00
Ingo Weinhold
0be39a3a0d Rather use the new _kern_read_kernel_image_symbols() syscall to use
kernel image symbol tables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 11:17:30 +00:00
Ingo Weinhold
7ada326834 Also store the string table size for an image. This helps to improve the
symbol name len check.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 23:38:46 +00:00
Rene Gollent
90b7764dc3 Move WidthBuffer and TextGapBuffer into BPrivate and use them from there in BPoseView and BTextView. This (correctly) fixes the previous gcc4 build issues.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 20:47:16 +00:00
Stephan Aßmus
8864334702 * First steps towards making BTextView behave well within the layout management.
* The class calculates a minimum width now, which is based on the line height,
  this may also fix the bug with the small text inputs in the Pe Find window.
* Added TODOs about implementing GetHeightForWidth(), which may be a good idea
  when a BTextView is used as non-editable informative text in an interface,
  and one wants to make sure that the entire text is shown.
* Replaced the call to _Refresh() in Draw(), which recalculates all the line
  breaks for no reason with _DrawLines() again. The TODO mentioned that text
  will be drawn without drawing the background first, but maybe this is a
  relict from times where Draw() was invoked directly? At least I cannot see
  any negative consequences, and this should be much more efficient.
  (Other than that, this patch should hopefully have no potential negative
  side effects...<crosses fingers>)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 15:36:44 +00:00
Stephan Aßmus
53aaed9f6b Forgot to delete fLayoutData in destructor.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 15:29:02 +00:00
Ingo Weinhold
d8b24b47e3 Made SymbolLookup safe to be used for the kernel team. Only the image
file based functionality will be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:02:13 +00:00
Stephan Aßmus
8ab8c63d26 Moved BTextView::UndoBuffer derivatives into the BTextView class as well,
hopefully fixing the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 08:42:02 +00:00
Stephan Aßmus
18fe1bf6fb Small fix for 80 char/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 15:37:47 +00:00
Stephan Aßmus
a682d9819f Quite a cleanup action to avoid polluting the global namespace with private
BTextView classes:

* Declared the directly used BTextView helper classes as private BTextView
  classes and changed all affected files.
* Realized that Tracker's BPoseView was (accidentally?) using what used to
  be _BWidthBuffer_. It had declared it's own class with the same name and
  same members/size in headers/private/tracker/TextViewSupport.h, but the
  implementation was nowhere to be found. I can only explain this that
  the BTextView implementation was then actually linked and used. But the big
  problem was that it was used without locking (unlike in BTextView)! When
  many Tracker windows opened during system startup or later and they happened
  to each request characters not yet in the cache, I imagine things could have
  gone bad and corrupted memory. Anyways, since I can see the usefulness of
  the cache, BPoseView uses BTextView::WidthBuffer on purpose now. And I moved
  the locking inside BTextView::WidthBuffer::StringWidth().
* Adjusted InterfaceDefs.cpp accordingly.
* TODO: Move subsequent classes into BTextView namespace as well, ie derived
  classes that BTextView doesn't directly know about. All stuff in src/kits/
   inteface/textview_support/
* Added preliminary and not yet implemented layout friendly BTextView
  constructors.
* I will try to handle the insets imposed by BTextView::fTextRect a bit
  differently when used inside the new layout management framework. For this,
  I added BTextView::SetInsets() and GetInsets(). SetInsets() doesn't do
  anything yet.

So far, everything seems to work still... ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 15:08:40 +00:00
Stephan Aßmus
1aaf53ecac I accidentally removed some backwards compatible behavior. When there is no
label, a TextControl maintains it's current width in ResizeToPreferred() if
it is wide enough. Should fix #2751.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:46:09 +00:00
Karsten Heimrich
c7d112ff6a * unmark existing marked items in case we add a new item that is marked
i did exactly that way in my code, which messed up the location popup 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:25:55 +00:00
Karsten Heimrich
d1fe803469 * automatic whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:17:00 +00:00
Ingo Weinhold
abb2df34ee * SymbolLookup: Implemented loading the symbol tables from the shared
object files. Thus static functions will be found, too.
* debug_lookup_symbol_address() and debug_next_image_symbol() no longer
  need to read the symbol name via the debugger API, since the
  respective SymbolLookup methods compute the length of the symbol name
  that can safely be accessed locally, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 22:17:11 +00:00
Ingo Weinhold
eb333098fe Added work-around for a runtime loader problem after fork(). Its image
structures still have the parent IDs, so finding an image by ID would
fail in this case. We do now fall back to getting the image's text base
address and finding the image by address.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 00:15:44 +00:00
Philippe Houdoin
7b40eb4206 Fixed a typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-17 22:24:55 +00:00
Stephan Aßmus
43f8c6143a * Updated the coding style.
* The layout friendly constructors don't need to mess with the control size.
* The layout friendly constructors can use the respective BControl constructor.
* Refactored some duplicated code.
* Removed duplicated GetFontHeight() calls.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-16 15:08:02 +00:00
Stephan Aßmus
349c911ee9 * Implemented a lot of layout related methods and resolved a few TODOs by
doing a lot of these things the same way as BMenuField are already doing.
  Perhaps a private helper class could be refactored from these two controls
  to avoid duplicating a lot of this code, although there are a few subtle
  differences here and there.

These changes make a BTextControl behave properly in the layout management
frame work, in case CreateLabelLayoutItem() and CreateTextViewLayoutItem()
are _not_ used to layout the BTextControl.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-16 10:50:31 +00:00
Stephan Aßmus
08edea662b * Don't set an explicit max size, instead calculate a proper max size in
MaxSize(). This makes sure that MaxSize() returns a proper size when the
  user "unsets" the explicite max size.
* minimum label height is 0 if there is no label.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-16 10:45:27 +00:00
Stephan Aßmus
93ba577c3e * Updated header indentation
* Removed unused fClean member
* Got rid of fSkipSetFlags member by simply calling the BView::SetFlags()
  directly where fSkipSetFlags was supposed to prevent the custom
  implementation.
* Added some debugging facilities.
* Used the layout friendly constructors of BControl where appropriate.
* Used B_FOLLOW_ALL for the child text input, it should be more correct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 19:43:18 +00:00
Ingo Weinhold
68e6763b07 Added functionality for iterating through the symbols of a debugged
team's image to libdebug.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 12:47:59 +00:00
Stefano Ceccherini
ec10ce591d delete -> delete[]. CID 151
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 12:15:54 +00:00
Stefano Ceccherini
99b75a6f12 delete -> delete[]. CID 121
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 12:11: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
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