Commit Graph

27032 Commits

Author SHA1 Message Date
Michael Lotz
f7de7fa4e3 Add throw() to the nogrow new operator. This will cause the right version to be
used that handles NULL returns and doesn't expect an exception. This fixes that
certain constructors would still be called even if the allocation failed in low
memory situations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28208 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 08:32:42 +00:00
Stefano Ceccherini
6bda235a59 some gcc4 warning fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 08:08:20 +00:00
Rene Gollent
4a4355bd7d app_server was not storing its settings when the workspace count was changed.
As a consequence this setting was lost unless another setting was also altered
that affected the workspace configuration in some way.
Fixes #2849.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:56:44 +00:00
Alexandre Deckner
3d7584da5c * Rewrote the way BViewState checks if changes needs to be saved on quiting a navigation window (icon mode and
list mode) or switching dir in single window navigation. Fixes the other half of the problem in #2441. Left some 
todos.
  I discovered an other bug that can add a random offset after finishing adding poses.  


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:41:43 +00:00
Axel Dörfler
64ba396fa7 * When changing the workspace of a window, it's workspace position will now be
set to its current position if that is the only workspace it's in.
* This fixes missing windows on other workspaces in the Workspaces app after
  boot, ie. before you had visited that workspace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:31:44 +00:00
Axel Dörfler
4e59d9c7b4 * Use a good default "yellow" in case there is no decorator (otherwise yellow
isn't initialized, but also not really used currently).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:30:06 +00:00
Rene Gollent
d8383f234c Update example description to the current state of affairs. Please revert to old description whenever we enable ACPI by default again.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 01:01:11 +00:00
Bruno G. Albuquerque
2cb8652f55 - The Trash context menu was using a checkmark to keep track of the last
selected item which does not make much sense. Disabled the checkmark.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-17 00:33:38 +00:00
Michael Lotz
bba5ce5afe * Add a mapping of interrupt handler data and remove the panic on installing
the interrupt handler. There can be more than one interrupt handler installed
  on the same interrupt number with different data, so we also need the data
  pointer when removing the handler (to remove the right one). But since ACPI
  doesn't supply it to us, we have to do the mapping ourselfs. Fixes #2848.
* Renamed acpi_root to sACPIRoot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 22:25:04 +00:00
Michael Lotz
85c66f1c22 * Disable ACPI by default for now as it currently introduces problems with
interrupts (UHCI/EHCI not working).
* Add missing line break in debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 22:06:27 +00:00
Ingo Weinhold
51f837ae42 Dynamically adjust the page writer's I/O priority depending on how many
pages have to be written and how tight the memory situation is.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 22:02:55 +00:00
Ingo Weinhold
6e595b29e3 Moved KERNEL_BREAKPOINTS to kernel_debug_config.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:43:32 +00:00
Ingo Weinhold
3b248948f2 Added ThreadCPUPinner AutoLocker class.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:41:11 +00:00
Ingo Weinhold
d52718a5f8 Fixed serious race condition: If the thread waiting for a request was
interrupted, another thread closing the other end of the pipe could
invoke thread_unblock() while the first thread already entered
mutex_lock(). This would make the first thread think it successfully
locked the mutex, without removing its (on-stack) wait entry from the
mutex queue, thus leading to crashes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:40:32 +00:00
Oliver Tappe
9f3fce1eac Stippi + zooey:
* fixed LineHeight() for the case when the textview does not yet contain
  anything - instead of returning 0 we now return the lineheight of the
  default style (or the textview's font).
Fixes #2231


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:40:12 +00:00
Ingo Weinhold
9b0eb8c8f4 Removed "lal" alias and added "-A" to "ll" instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:34:15 +00:00
Ingo Weinhold
8a05bb865f Added TODO regarding serious locking problem.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:32:14 +00:00
Michael Lotz
471844b258 Add the ACPI module to the boot module symlinks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:31:32 +00:00
François Revol
4d05f2f108 Added an updated version of BeHappy as optional package. This one can use NetSurf instead of NetPositive if it finds it.
Make sure you rm generated/downloads/NetSurf.zip to get the new replicable one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:31:17 +00:00
Michael Lotz
88db388930 Remove one line of whitespace.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:22:00 +00:00
Michael Lotz
6ddf7ae490 * Make the initialization of the DPC module lazy. It'll not be available in early
boot, but it's not needed there either.
* Return 1 for the thread id when ACPI asks and we are thread 0 (early boot),
  because it treats 0 as an error.
* Switch over logic when installing/removing interrupt handle to panic when
  installing the interrupt handler if the data supplied is non-NULL. In case it
  is NULL we're fine because we can remove it again without knowing the data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:19:23 +00:00
Michael Lotz
d4c300d8f1 Prepare usage of the ACPI module. Actual code for getting PCI interrupt routing
not yet done though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:12:33 +00:00
Michael Lotz
83d8936cff Move semaphore initialization a bit earlier in boot. They'll be needed by ACPI.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:11:37 +00:00
Stephan Aßmus
46bf89d15f * This should fix the build of FileTypes... I should have heard the warning... :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 21:10:43 +00:00
Michael Lotz
60a068c8a4 Fix build. The deep version did use the CompareData of course.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:54:40 +00:00
Axel Dörfler
b4b00ffcea * Added bfs to the -Werror components.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:53:41 +00:00
Stephan Aßmus
dad7391aaa * Implement a method to track the need to save changes. Enabled the
Save menu item accordingly and ask the user to save changes when he quits
  the window and there are any changes.
  Most changes are tracked in a robust way, only icons are tracked with a
  more fuzzy method (the actual data is not compared). Whenever an icon
  (of the app itself or one of its types) is changed, then the preflet is
  convinced of the need to save, regardless of the icon is removed again or
  is changed to the visually same icon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:45:48 +00:00
Michael Lotz
3c6372b44a Rename BMessage::CompareData() to HasSameData() as this makes more sense for the
bool return type. Did I mention this was an unstable Haiku extension?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:45:12 +00:00
Axel Dörfler
49ad25b392 * The type ahead mechanism did not work correctly in list view mode: instead
of taking the contents of the columns, it would always use the file name
  instead.
* That uncovered another bug, though: WidgetText::Text() tried to cast everything
  to StringAttributeText, but GenericAttributeText is actually used for most
  columns.
* Therefore, GenericAttributeText is now a subclass from StringAttributeText.
* Extended the type ahead to take other columns into account, and made it also
  find strings in the middle (like a filter) as a second choice.
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 20:18:20 +00:00
François Revol
1e2bc11e99 bonefish+mmu_man: fix cbuf_user_memcpy_from_chain() returning an error when the source buffer was NULL despite being asked for 0 bytes, while the counterpart was actually not creating a buffer for 0 bytes to send... Also don't bother calling it from receive_data() in that case anyway.
This fixes a deadlock in SoundPlay that made it freeze when trying to play the 2nd sound.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:48:28 +00:00
Stephan Aßmus
20ca748ade * Fixed a memory leak when creating the drag bitmap.
* Added an optional modification message that is triggered whenever the
  view adopts a new icon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28178 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:26:19 +00:00
Stephan Aßmus
21f11263f6 aldeck + stippi:
* Improved the naming of the menu entry that removes a replicant from a shelf
  to be less frightning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:21:01 +00:00
Stephan Aßmus
11c5023a77 Applied patch by Stephen Deken:
* Added a new class BAffineTransform, currently in the BPrivate namespace
  and the inofficial "shared kit".
* Extended BPolygon to be transformable by a BAffineTransform.

Thanks a lot!

Minor fixes by myself:
* The class accidentally still derived from agg::trans_affine.
* Added then missing comparator operators.
* Swapped the BPoint* and count arguments of Apply(), since that seems
  to be the more common order in the other Be API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 19:10:10 +00:00
Stephan Aßmus
bf3a206445 Fixed r28168, which introduced an app_server deadlock. Functions
which call into Desktop methods which in turn grab the window
write lock are never supposed to hold this write lock themselves
already, since the Desktop code takes care to not hold the lock
when for example calling EventDispatcher methods, which would
cause a deadlock (as in this example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 18:01:55 +00:00
Michael Lotz
5b25b917f9 Introduce BMessage::CompareData() which is a Haiku API extension. It compares
the data of two BMessages and allows recursive comparison (BMessage inside
BMessage). Note that using this API might require you to recompile your app in
the path to R1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 15:55:36 +00:00
François Revol
baa1c04611 Add support for non-standard port on ssh and sftp.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 15:51:16 +00:00
Stephan Aßmus
f73283cf6a When opening mails with slightly larger attachements in Beam, I noticed that
it was quite sluggish. When opening larger mails, like a 1.14 MB mail for
example, it could take almost half a minute until it was displayed. It turned
out that the offending thread was in strstr().
This is an implementation taken from Wikipedia (declared as public domain
there), which makes the mails open instantly. This usecase may have represented
a worst-case scenario for the previous implementation. It may be beneficial to
take a look at more of these string functions, but I am happy for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 15:31:58 +00:00
Axel Dörfler
a0a1bf7fb0 * Disabled the allocation group check again.
* Fixed warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 15:11:07 +00:00
Oliver Tappe
e1e083d584 * added skipping of '0'-modified supported by glibc (formats are padded
with zeros anyway)
this fixes creation of unique file names in Beam under haiku


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 13:51:45 +00:00
Stephan Aßmus
85649f93c7 Removed the solid white icons.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 12:57:09 +00:00
Axel Dörfler
96c6ee9507 * _Show() and _Hide() must now be called with having all windows locked
(it would do that internally anyway).
* AS_MINIMIZE no longer calls _Show() when being unminimized, but
  Desktop::ActivateWindow(), as this will also bring the window on the screen
  if it's on another workspace (according to its flags).
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 12:15:02 +00:00
Michael Lotz
9f1cce99b9 * Fix warnings in busmanager code.
* Check return of lock_memory() and get_memory_map(). They may fail and under
  Haiku they also return a usable value in that case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 12:02:51 +00:00
François Revol
861fb97cf9 Inline Unset and SetTo correctly. I copied the class from BFS which only uses it in a single file...
Thx for the gcc4 fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 10:05:59 +00:00
Michael Lotz
433579eaf5 Fix comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 10:05:41 +00:00
Michael Lotz
9ed6818888 * Return an error code if installing the interrupt handler fails.
* Add debug facilities.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 10:05:01 +00:00
Michael Lotz
8be1e1ecf4 The ACPI module isn't BeOS compatible anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 10:02:05 +00:00
Axel Dörfler
58a77fd3c9 * Fixed the incorrect ASSERT that possibly dropped you into KDL while deleting
something (as reported by Marcus and Bruno on the mailing list).
* AllocationGroup::Allocate() would always invalidate the largest block if
  it did not cover the largest part of the group; now it only invalidates it
  if it has been cut before.
* Added small test app for the invalidation part.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 10:00:34 +00:00
Stefano Ceccherini
a96b4beb84 Fix build for gcc4. If you really want to inline these methods, they need to be implemented in the header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 09:53:06 +00:00
Stefano Ceccherini
b5e67ab6fb Fix build for gcc4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 09:30:07 +00:00
Stephan Aßmus
26da5fe367 * Do not delete the private data of the BMessage! This fixes a crash when
dragging and dropping icons from one FileTypes window to another (in case
  the dragged icon was a vector icon).
* Checked the other similar places, but all seems fine. Added a comment in
  one place why no data is leaked, although it may seem to at first sight.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 09:19:43 +00:00