Commit Graph

26396 Commits

Author SHA1 Message Date
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 d73be01714 Also load all kernel images and their symbols. They are not tracked, but
usually they won't change during the runtime of the profiled program
anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:06:50 +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
Jérôme Duval 82368346f8 fActiveVolume should always be set, and only switch volumes if needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:01:56 +00:00
Ingo Weinhold b34e395eaf The boot loader does now set the names of the images it loads to the
full paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:00:31 +00:00
Ingo Weinhold 6aa2c9ecf1 * Directory stores its parent directory (if any), now.
* Adjusted used files systems accordingly.
* BFS::Stream::GetName() was broken. It accessed the small data region
  which wasn't loaded, since BFS::Stream derived from bfs_inode, which
  is a variably-sized structure with the small data region at the end.
  Changed that to a ref-counted, shared member instead.
* Implemented RootFileSystem::GetName().
* Added Directory::GetPath() to get a full path of the directory or an
  entry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 12:55:41 +00:00
Axel Dörfler b33ba0e92e * Followed Marcus' suggestion and made the array a static const one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 12:14:54 +00:00
Stephan Aßmus e6378518c4 Fixed typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 09:15:35 +00:00
Stephan Aßmus 6168332c35 Sorry, should have been part of r27660. Moved BTextView::UndoBuffer derivatives
into BTextView class as well, hopefully fixing the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 08:43:06 +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
Ingo Weinhold 5c4cde5afa * Some renaming.
* Also print dropped ticks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 22:04:42 +00:00
Ingo Weinhold ecfad924e0 Solution for the potential deadlock when needing to flush the profiling
buffer during a timer event that interrupted a kernel function: We do
now flush the buffer as soon as it is 70% full, *if* we didn't interrupt
a kernel function. When the buffer runs full and we still haven't hit a
user function, we drop the tick. The number of dropped ticks is recorded
and sent to the debugger with the next update message.
Reverted the previous partial solution (the temporary disabling of
profiling while in debugger support code).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 22:04:03 +00:00
Ingo Weinhold 1ecc0a33db * Completed image tracking using the image event counter sent with
various debugger messages. We do now correctly match all sampled
  addresses.
* Update the saved info of a team's main thread after exec*(), so we
  can print a more useful name.
* Improved the output: The images are listed in a table, now. The
  function table also includes the image IDs for the functions.
* Cleaned up debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 20:44:19 +00:00
Ingo Weinhold eba9a4c3ee * Introduced a per-team counter that is incremented whenever an image
is created or deleted (or exec*() has been invoked). The counter is
  sent with several debugger messages.
* Track the image event counter that is used when samples are added to
  the profiling buffer. If the current team counter differs, we flush
  the buffer first (sending an update message to the debugger), so that
  the debugger has a chance to match the addresses to the correct images.
* Disable profiling for a thread while it runs in the debugger support
  code. This fixes potential deadlocks which could occur when a
  profiling timer event occurred that would require the buffer to be
  flushed while the thread was just sending something to the debugger or
  waiting for a command. As it turns out, this is not sufficient either,
  since we should never try to flush the buffer when the timer event
  occurred in the kernel, since the thread might hold a lock that the
  debugger thread could try to acquire. Will implement a more general
  solution later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 20:37:10 +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 8121345989 * Don't disable the controls completely if subpixel anti-aliasing is not
available for hinted font rendering. Instead, display the information that
  only this combination has no effect on Haiku builds without subpixel based
  freetype rendering. Better fix for 2753.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:25:07 +00:00
Stephan Aßmus 60497da7e0 Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:23:13 +00:00
Ingo Weinhold b533a08728 Implemented tracking image creation/deletion. It's not fully correct
yet, since there's no synchronization of the sample evalution with the
image creation/deletion. That is samples taken before an exec*() could
be evaluated after the new images have already been loaded and could
thus be translated to the wrong functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:10:57 +00:00
Ingo Weinhold 4ed8088f9a Added new debugger message B_DEBUGGER_MESSAGE_TEAM_EXEC, sent when
exec*() has been called.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 13:59:41 +00:00
Ingo Weinhold 78b13af677 The handling of a full profiling buffer couldn't work for two reasons:
* We can't enable interrupts in an interrupt handler. Instead we use the
  newly introduced callback feature, which notifies the debugger right
  before returning from the interrupt.
* We didn't indicate that the profiling buffer was full and that the
  thread shouldn't be profiled ATM. Therefore it could happen that it
  was profiled while trying to notify the debugger that the profiling
  buffer was full, resulting in a deadlock. Introduce a respective flag
  in the thread debug structure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 12:44:41 +00:00
Ingo Weinhold 23884ae025 Introduced a callback field in the thread structure. It can be set in an
interrupt handler and will be executed right before returning from the
interrupt.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 12:38:27 +00:00
Karsten Heimrich bef5fffeae * use B_PNG_FORMAT, thanks Stephan
* truncate the path label, since a long path would automatically
  resize the window to something unusable in that case...

  Note: somehow the PopUpMenu does ignore a set max column size
        expanding from small to large leaves some drawing artefacts



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:49:00 +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
Stephan Aßmus 37b9874302 Update header indentation style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:09:32 +00:00
Karsten Heimrich fc3bed0577 * implement saving
* have png and home as default
* still misses some kind of settings...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 09:35:20 +00:00
Philippe Houdoin 1c971ca7f0 Document the new HAIKU_IMAGE_LABEL user build option in UserBuildConfig.ReadMe. Thanks Ingo for pointing it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 00:39:21 +00:00
Ingo Weinhold 424f833bc9 * Changed the profiling API: Instead of sending all functions that shall
be tracked to the kernel, which then counts the hits, an area is
  passed to kernel in which the hits are recorded. When the area is
  full, the debugger is notified. For some reason that part doesn't work
  yet -- the whole system freezes when waiting for a reply.
* Reorganized the profile tool code a bit. For one with respect to the
  changed API, but also to prepare tracking of image creation/deletion.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 00:34:03 +00:00
Karsten Heimrich 4ae1ed90b8 use whitespaces instead of dots
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 23:26:25 +00:00
Karsten Heimrich 9b4277bd75 * typos
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 23:16:21 +00:00
Karsten Heimrich 9f07ffa384 * reorganize options
* implement silent mode using the existing BWindow code



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 23:14:23 +00:00
Philippe Houdoin 127456e5b5 Added user-defined image volume label support.
The default label is as previously: Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 17:32:57 +00:00
Stephan Aßmus 0a2452f0da Appearance cannot be built for BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 11:26:56 +00:00
Stephan Aßmus 8cfc10ab72 * Use layout management in the AntialiasingSettingsView.
* Remove unused code.
* Remove INSTANT_UPDATE define, I guess instant update is always wanted.
* Replaced text control for setting the "averaging strength" with a slider
  and hopefully improved label.
* Simplified other labels a bit as well.
* Added detection of subpixel rendering availability by peeking into the
  Freetype option header. If it's not turned on, then the controls are not
  displayed and instead there is a text explaining the problem and hinting
  at what needs to be done in order to enable the feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 11:26:11 +00:00
Stefano Ceccherini b7ef02aac6 use defines for some gif flags, for clearer code. Reordered initializers to avoid warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 09:39:19 +00:00
Axel Dörfler d3ae536bb9 * Made callout_pending() and callout_active() real functions instead of macros;
that makes drivers using it more independent from internal net_timer changes.
* Correctly implemented callout_active() using the new is_timer_running()
  stack function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 09:26:14 +00:00
Axel Dörfler 491da20dbf * Added a is_timer_running() function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 09:11:12 +00:00
Axel Dörfler e167a0a5d9 * Added definition of CALLOUT_MPSAFE. This closes ticket #2752.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 08:33:23 +00:00
David McPaul cac510c913 changes based on feedback from stippi
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 07:04:49 +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
Axel Dörfler 6126236e8a * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 16:04:28 +00:00
Stephan Aßmus e9a105668d Update some comments after understanding things better. Some things which got
me confused were perfectly correct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 15:35:54 +00:00
Axel Dörfler 35a16d8f5e * Moved the inode_types into Utilities.h.
* Added a S_EXTENDED_TYPES constant to simplify some checks.
* Simplified the fAllowDuplicates computation in BPlusTree::SetTo().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 15:22:29 +00:00
Stephan Aßmus aecd884e05 * Added some hopefully helpful comments.
* Replaced my bogus comment that Ingo pointed out with a description that
  mentions LogicalPartitions also being used to describe so called "inner
  extended" partitions, which are only needed to point to the next PTS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 14:56:49 +00:00
Axel Dörfler e73923b0c2 * Renamed static recursive lock variables to match our coding style guidelines.
* Renamed runtime loader semphore to something clearer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 14:01:29 +00:00
Axel Dörfler 95deefbf66 * Fixed wrong indentation and spacing.
* Enlarged default port size to 50.
* Added license header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 13:12:22 +00:00
Axel Dörfler 01774b2af5 * Added optional package for BePDF 1.0.0b2.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 12:55:59 +00:00