Commit Graph

27482 Commits

Author SHA1 Message Date
Rene Gollent
a4f9a2b8c5 Fix various errors in handling specifiers and/or scripting messages. This
makes the Get, Count and Delete Replicant scripting directives work correctly,
and consequently fixes the Remove BSnow button (ticket #1897), as well as
commands like: hey Tracker Get Replicant BSnow of Shelf of View PoseView of Window 1



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 23:18:59 +00:00
Karsten Heimrich
072403a553 * fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 22:40:53 +00:00
Jérôme Duval
5d8c417782 Use a ColumnListView
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 22:05:33 +00:00
Maurice Kalinowski
3feea27945 whitespace and style cleanup, no functional changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 19:54:43 +00:00
Jérôme Duval
58b80f0913 updated libpng to 1.2.32
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 19:35:14 +00:00
Rudolf Cornelissen
ddcb4e528c es1370 compiles on haiku now. no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 18:23:46 +00:00
Axel Dörfler
6e036f0479 * Updated glob.h and its implementation to FreeBSD current (1.10, 1.27),
adapted them to work on Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 14:13:30 +00:00
Ingo Weinhold
f20ccdc461 Fixed some incorrect behavior pointed out in #2990:
* The pthread_mutex_*lock() family should return EDEADLK when re-locking
  an error-checked mutex.
* pthread_mutex_trylock() is supposed to return EBUSY, not
  B_WOULD_BLOCK.
* pthread_mutex_unlock() should return EPERM when the caller is not the
  owner. It used to print a message and try to unlock anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 12:04:51 +00:00
François Revol
6805373afd Add the BeBook as optional package, patch from Urias McCullough.
I added it as dependancy for BeHappy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-28 02:44:39 +00:00
Stephan Aßmus
e01a043190 Sorry for the confusing patch...
* Made KeyboardInputDevice more similar to MouseInputDevice, the object to
  track individual keyboards has become the class KeyboardDevice. Moved
  much functionality that used to be in KeyboardInputDevice into
  KeyboardDevice.
  Functionally, it should still be the same, but there are two important
  changes:
  - Each KeyboardDevice now has it's own Keymap. At first, it is not
    visible by the user, since all KeyboardDevices still adopt the keymap
    if the user reconfigures it. But it will make it easier to assign
    individual keymaps to each attached keyboard (and perhaps associate them
    with a vendor/product or some other means). The more immediate side effect
    is that there is no longer a confusion about the keyboard locks. If
    you press NumLock on your external keyboard, it will no longer enable
    NumLock on your notebooks internal keyboard.
  - KeyboardDevice now has a Stop() method, which it will call in it's
    destructor. This will make sure that the control thread is cleanly
    exited and does not end up invoking methods on a deleted object.
* Rewrote the tracing implementation in MouseInputDevice.cpp. At least it
  helped track me down the following problem:
* Both KeyboardDevice and MouseDevice now set fActive to "false" *before*
  closing the device. Since the control threads run at high priority, chances
  are high that rescheduling happens as soon as the device unblocks in
  ioctl() and returns an error. In that case, the control threads would
  check fActive and it would still be "true" and the whole idea of bailing
  out because we're already in Stop() would not work, causing a double free
  in the end.

All of this is nice and more correct, but input_server is still crashing
when restarting it via "input_server -q"... :-(


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 22:40:03 +00:00
Stephan Aßmus
393f282c79 * Mark InputDeviceListItems only as running if calling Start() for the
device returned B_OK.
* In the InputServer destructor, don't check the fAddOnManager pointer,
  but check the success of calling Lock() on it instead, which should
  be much safer.
* In StartStopDevices(), really start or stop all published devices for
  the given BInputServerDevice, not only the first one found. Simplify
  the check whether anything needs to be done.
* Change a bit the return codes of StartStopDevices(). Especially the
  version that's supposed to start or stop all devices will still try
  to do it for the rest of them.
* Removed no longer needed _FindInputDeviceListItem().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 22:19:55 +00:00
Stephan Aßmus
dab68c33ed * When a device closes, delete the transfer semaphore, so that threads blocking
on it are unblocked and get an error.
* Make fOpen volatile to prevent unwanted caching effects when checking it from
  different threads. (?)
* Check IsOpen() in the KeyboardDevice class in more acquire_sem_etc() return
  cases, analogous to the MouseDevice class.

I am still getting a problem when relaunching input_server with the input_server
add-on thread that ioctl()s on a USB keyboard fd, which should have never fired
because it's a fake device from a KVM. After the first input_server instance is
gone, this thread keeps on busy looping in acquire_sem_etc()->switch_sem() from
within the ioctl() of the KeyboardDevice usb_hid driver. Still on it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28350 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 16:52:39 +00:00
Stephan Aßmus
dae439fe60 Init the ref_count with 1, since the first AddPath() would leave it
at 0. A single AddPath()+RemovePath() would therefore leave a not
anymore needed path_entry(), while a AddPath()+AddPath()+RemovePath()
would remove/delete the path_entry while it was actually still used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28349 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 16:44:58 +00:00
Axel Dörfler
887be5801a * Don't try to update the DMAResource in case there is no medium (also saves
a panic when ejecting a disc, since updating DMAResource isn't implemented
  yet...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 16:00:43 +00:00
Axel Dörfler
34034cf61b * _UnmountAndEjectVolume() now actually ejects the media, if configured, and
possible, ie. if no other volumes are mounted on the device.
* Fixed a operator precedence bug in GetSettings() when retrieving the mounted
  volume flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28347 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 15:42:00 +00:00
Axel Dörfler
a58e2ed8f8 * Added functions FindPartitionByVolume() and FindPartitionByMountPoint()
that conveniently bridge BVolumes/mount points with BPartitions.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 15:33:37 +00:00
Axel Dörfler
2ec100b72e * Implemented Eject().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 15:30:58 +00:00
Axel Dörfler
67804f25ed * fs_unmount() removed the vnodes of the fs_mount twice since r28215,
triggering an assert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 14:33:58 +00:00
Axel Dörfler
1c78a18edc * Updated BePDF to the latest available package (1.1.0b1).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 14:26:16 +00:00
Stephan Aßmus
9dd2d40e39 Fixed a race condition and resulting deadlock I introduced, which
resulted in the keyboard not working (at least on my Lenovo/IBM T60).
The device control thread could become aware of a dead device
at the time another thread (for example the add-on manager thread)
is already waiting for it. Then it tried to remove the device and
got stuck on locks that the other thread already holds (InputDeviceItem
list lock). Now the control threads check the "active" flag before
trying to remove the devices themselves, which, when set, is a sure
sign that the devices are already being removed and they don't need
to take care of it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 11:28:25 +00:00
Stephan Aßmus
0d2fb32f12 As pointed out by Axel, this TODO is invalid.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-27 10:55:41 +00:00
Axel Dörfler
d5b30a2548 * As Marcus correctly pointed out indirectly, the bitmask for
ide_mask_sector_count_48, and ide_mask_LBA_*_48 were all wrong.
* Using the high byte in LBA48 mode should work now, too (wasn't written
  to the IDE controller before, but that shouldn't have been a problem yet with
  today's disks).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 22:14:20 +00:00
Axel Dörfler
1998abd8ea * Fixed off by one bug... math can be so hard ;-)
* This fixes bug #2880, ie. make the ide_adapter write the IDE task file
  correctly to the command register, CD-ROMs are working again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 18:27:54 +00:00
Ingo Weinhold
fad11a1c88 Strongly typed languages ftw.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 16:29:39 +00:00
Ingo Weinhold
801e9bd9f1 Always return what we've got from the socket module (error or number of
bytes received), but not B_OK on success.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28337 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 15:52:46 +00:00
Rene Gollent
3cead3c68e Make this check a bit more general purpose: in the case where the dragger is a child of the target view (probably the most common use case), we now verify that the dragger's frame is completely within the target, otherwise we reset it to a default position of the lower right corner. I'm not sure how to do similar validy checking in the case of the other relationships (or if that's even feasible) though. Comments welcome as always :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 15:22:02 +00:00
Ingo Weinhold
e360230ecd _user_xsi_msgrcv():
* Fixed some places that set an error return value but didn't actually
  return.
* Fixed success case return value. The number of bytes received must be
  returned, not B_OK.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 12:36:24 +00:00
Ingo Weinhold
4534a38441 stack_interface_recvfrom(): Incorrect return value check. It's a
ssize_t, not a status_t, so the following setting of the address length
was never invoked, causing recvfrom() to always return the passed in
size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 11:52:04 +00:00
Ingo Weinhold
e967b93ab6 * vfs_stat_node_ref(): Added missing initialization of
stat::st_{dev,ino}.
* stat::st_rdev is unused, but at least initialize it with some
  deterministing value. This makes Perl's lib/File/stat.t test happy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 11:49:48 +00:00
Stephan Aßmus
7e47a4ee00 patch by Humdinger:
* Various fixes and corrections
* Preparation for new sections


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 11:23:20 +00:00
Michael Lotz
a0d69d7dac Also add the border overlap on both sides to the available space of the initial
tab width. This fixes the initially wrong tab width for windows where the title
does not fit and previously there would be 10 pixels waste on the right.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 10:53:13 +00:00
Rene Gollent
1bbf044eeb In various apps such as ActivityMonitor, BDraggers are instantiated with
invalid rects (in ActivityView's case in particular, (-7, -7, 0, 0)). BDragger
would happily accept these, and preserve them when being archived/unarchived,
which led to its position being completely messed up in the target shelf.
We now compensate for this when determining our relationship with the target
view. This fixes the problems with missing replicant handles in BSnow,
ActivityMonitor and probably others replicants. The solution used here might
not be ideal though, so comments welcome.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 04:50:50 +00:00
Alexandre Deckner
f05f4fcb53 * Added support to show tracker preferences via scripting. This will allow accessing
tracker prefs via the preferences menu using a one line script: 'hey Tracker DO 
Preferences'. Not sure how to set the icon of the script with the build system, feel 
free to do it. See enhancement #2365


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-26 00:09:47 +00:00
Alexandre Deckner
ccbb95ba82 * Enable keyboard navigation on the long description BTextView.
* Use a derived text view that filters the tab key to avoid interupting tab 
navigation while in focus/editing. Closes #2321


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-25 23:09:06 +00:00
Ingo Weinhold
83d554a7a4 Require new GCC version.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-25 14:19:21 +00:00
Ingo Weinhold
3090050ef6 Updated gcc 2.95.3 package.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-25 14:17:10 +00:00
Axel Dörfler
b4743cca80 * Make the kernel (and boot loader) version of vsnprintf() (that backs up all
formatted printing) aware of '%%', closing bug #2953.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-25 12:28:53 +00:00
Stephan Aßmus
b93eb3a008 New and updated icon work by zuMi! Thanks a lot!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-25 11:10:11 +00:00
Stephan Aßmus
c5555ad3c0 * Ignore B_ENTRY_REMOVED node monitor messages.
* When the device watcher/control thread encounteres an error when
  read()ing or ioctl()ing the device, don't just quit the thread and
  leave a stale device add-on hanging there, but instead trigger
  _RemoveDevice() to exit this cleanly. This also takes care of calling
  _RemoveDevice() only from one thread. However, it adds a race condition
  should a mouse or keyboard be unplugged and plugged at the same time.
  I need to think about how to fix that cleanly, although the situation
  may be theoretical only... This fix seems to fix another problem with
  hot-plugging USB mice, before this change, the first mouse entry in
  /dev/input/mouse/usb/ was never gone and I got two entries after unplugging
  and replugging.
* When using BObjectList configured to own the entries - don't delete the
  entries! Also don't call RemoveItem() before still using the item. Took
  me all day to find this one, because the code looked so... correct. :-}
* In _AddDevice() call _RemoveDevice() just for the sake of it. It is really
  important that no device with the same name is published twice. The PS/2
  driver behaves strange in that it publishes device more than once, if
  I understand correctly, until it decides that there is no device.
* Only StartMonitoringDevice() /after/ having performed the initial device
  scan! Or else we may get ourselves confused. I don't know if this was
  an actual problem, but the code was like that before and it seems saner
  to me. Seeing there is no locking in the device add-on itself, we may
  already enter the code from the node monitor thread.

This should fix #2894.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:46:36 +00:00
Stephan Aßmus
3363dbce1f Small coding style correction.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:34:14 +00:00
Stephan Aßmus
740d899004 * InputDeviceListItem::fDevice was not maintaining it's own memory for the
device path, but instead pointing to memory owned by some device addon
  instance.
* Added TODO in the AddOnManager init code about a possible race condition
  which I have not varified yet.
* Check the return code of BList::RemoveItem() before deleting the item...
  pure defensive programming.
* For the time being, print a warning into the syslog when a device name is
  registered twice.
* When failing to Unflatten() an event, don't continue in the code after
  deleting it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:33:46 +00:00
Stephan Aßmus
1a1a4f955c * Updated the license header.
* Use new(nothrow) to allocate the MethodReplicant.
* fSignature needs to be free()d, not deleted.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:29:35 +00:00
Stephan Aßmus
944bc06060 * The way subdirectories for the input_server add-ons were defined was a bit
weird.
* Set fHandler to NULL in _UnregisterAddOns(), just in case it is called
  twice (which it probably never is... but be defensive).
* If a B_NODE_MONITOR message does not contain all the necessary fields,
  drop into the debugger when compiling in DEBUG mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 21:28:21 +00:00
Michael Pfeiffer
2643c0dddd Show size of partition. This should work even if the FS module is not on the image..
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 20:46:50 +00:00
Stephan Aßmus
c2006b1a52 Don't skip over device items when re-scanning the watched folders for the
devices that were removed. Should use the BPathMonitor anyways...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 20:36:42 +00:00
Alexandre Deckner
97893f16af * Removed the enclosing box to gain some space and enlarged the listviews. Should be
rethought and reimplemented with the layout system and my keymap management patch, but 
the intent was to make it more usable in the mean time.
* Don't change the focus on keydown so that we can naviguate the list with the 
keyboard.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 13:17:07 +00:00
Alexandre Deckner
7a249e96f5 Few fixes to the keymap preflet to make it good enough for the alpha 1. Lots of
things could be rewritten in a cleaner way but i'd rather finish my keymap 
management patch as i rewrote the preflet for it anyway. For example the '(Current)' 
item shouldn't be needed anymore but is still there in case the keymap:name attribute 
read fails or if the original keymap file doesn't exist anymore (for example, applying 
a user keymap, quiting the preflet, deleting the keymap file, and reloading the 
preflet)  

* Revert/apply data wasn't correctly loaded when the first load was on a system 
keymap. This would allow revert/apply right after starting the preflet. That was the 
cause of #2659.
* fCurrentMapName wasn't updated after a Revert or Apply
* Select the active keymap in the lists after reverting.

Quick cosmetical fix follows.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 11:50:45 +00:00
Axel Dörfler
500d847a1d * Enlarged the arbitrary maximum image size to 4 GB which still works just
fine.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 11:14:49 +00:00
Axel Dörfler
528b69d508 * Fixed bug #2727: symlinks usually "abuse" the data stream part of a
bfs_inode to store the link path (up to a certain length). If this was long
  enough to clobber the data_stream::size field (which luckily was the last
  field of struct data_stream), Inode::Free() would mistakenly assume this to
  be a valid data stream to be freed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 10:36:43 +00:00
Axel Dörfler
0982317bea * Workaround for bug #2273 - not pretty but works for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 10:15:39 +00:00