Commit Graph

54754 Commits

Author SHA1 Message Date
Axel Dörfler
6adf7a0c75 VFS: prevent FD inheritance for the kernel completely.
* Each io_context now has a "inherit_fds" member that decides whether
  or not this context allows to inherit FDs to its children.
* This replaces the former O_CLOEXEC mechanism.
2015-09-11 17:08:35 +02:00
Axel Dörfler
16844b92fc launch_daemon: Open stdin/out/err FDs.
* As with the boot script, point them to /dev/null.
* This should fix #12298.
2015-09-11 09:01:26 +02:00
Axel Dörfler
e668e80db0 VFS: Always open kernel FDs with O_CLOEXEC.
* Avoids leaking them into userland.
2015-09-11 08:57:15 +02:00
Stephan Aßmus
8d611f17a7 TextDocumentView: Fixed leak of BMessageRunner. 2015-09-10 21:56:38 +02:00
Stephan Aßmus
81f55cc896 HaikuDepot, text framework: Rework blinking the caret
Make sure that the caret starts blinking half a second after it last moved.
The previous solution using Pulse() had a number of problems:
 * The caret could be hidden during moving it or during typing. It would then
   be shown again very soon after, i.e. when typing the next character or
   when moving it to the next offset. But it looks bad anyway.
 * When the caret stopped moving, it started blinking a random amount of
   time afterwards, getting back into the rhythm of Pulse() messages.
   However, starting to blink a constant time after the caret last moved,
   looks much more satisfying.
2015-09-10 21:56:33 +02:00
Automatic Committer
877d731e03 Update usb.ids from www.linux-usb.org 2015-09-10 05:20:36 +02:00
Automatic Committer
6f7ee12593 Update pci.ids from pciids.sourceforge.net 2015-09-10 05:20:34 +02:00
Axel Dörfler
ac9ec47d27 BMenu: made left side padding font size relative.
* Also changed BMenuItem to make better use of that size.
2015-09-09 21:06:19 +02:00
Axel Dörfler
d8b517b50f Tracker: made title view height depend on font size.
* It now uses a font that's 3/4 the size of the plain font; ie. there
  shouldn't be any change with the default font size.
* Also cleaned up some weird layout code on the way.
2015-09-09 21:05:10 +02:00
Axel Dörfler
46dd7d5077 Tracker: Fixed vertical list icon position.
* Instead of drawing it at the bottom of the line, draw it in the
  middle of it.
2015-09-09 21:03:58 +02:00
Axel Dörfler
bf5480299e Tracker: Made list element spacing relative to font size.
* Instead of always adding two pixels, we now multiply the size with 1.1.
2015-09-09 21:02:15 +02:00
Axel Dörfler
f0b3691d10 Tracker: Removed extra border next to the draggable icon.
* Also removed extraneous call to BMenuBar::SetBorder(); B_BORDER_FRAME
  is the default, anyway.
2015-09-09 21:00:13 +02:00
Axel Dörfler
14cc5b4c44 BMenuBar::SetBorders() added.
* This allows you to only draw some of the borders.
2015-09-09 20:58:57 +02:00
Axel Dörfler
f74aab0a2e Appearance: Added font sizes 19, and 20 to the set.
* We might want to find a better solution for this, and also use it
  for the Terminal then.
2015-09-09 20:56:11 +02:00
Axel Dörfler
fd79684a5f BScrollView::SetBorders() added to disable borders.
* You can specify which borders will be drawn using the
  BControlLook::B_TOP_BORDER, ... constants.
* Adapted Mail to no longer need the SetInsets() hack.
2015-09-09 20:51:49 +02:00
Alexander von Gluck IV
635fe4746d network: Add missing hosts configuration file
* Provides localhost define to the network kit
* Resolves #12260 and others
2015-09-09 09:30:38 -05:00
Axel Dörfler
fb956f2561 Deskbar: scale better with the font size.
* This makes it much more usable with a larger font size.
2015-09-08 18:01:10 +02:00
Axel Dörfler
6612ea4f29 HaikuDepot: use better min/max widths for columns.
* Use a scale factor depending on the font size.
* Be more generous when it comes to the max width.
* Use StringWidth() for the default size of the size and status columns.
2015-09-08 17:59:17 +02:00
Axel Dörfler
f7c2983edc HaikuDepot: change window frame setting.
* Moved entirely into MainWindow.
* Moved duplicated code into separate methods.
* Resize the main window on larger screens by default, as we can make
  use of the extra space.
* Use BWindow::MoveOnScreen() instead of make_sure_frame_is_on_screen()
  as the former has more info. And is even smarter now as it can
  optionally resize windows to fit on screen.
* Center window on screen by default (ie. when there are no settings).
2015-09-08 17:58:02 +02:00
Axel Dörfler
bafcf01610 DiskProbe: improved layout scaling.
* Don't use a fixed size font for the header controls, but one that
  depends on the default plain font size.
* Minor cleanup.
2015-09-08 17:56:22 +02:00
Stephan Aßmus
7d8d7785c1 Text framework: Added TextEditor::Replace()
Call Replace() on TextDocument, so that there are not two edits later
on once UndoableEdit stuff is supported.
2015-09-06 23:09:36 +02:00
Stephan Aßmus
41bd20b06b Text framework: Add TextListener in TextDocumentLayout...
... and invalidate based on TextChangedEvents. I am not yet sure whether
TextChangeEvent needs separate counts for removed and changed paragraphs.
It is most likely not yet correct and may either update too many paragraph
layouts or miss updating some at the end.
2015-09-06 23:07:09 +02:00
Stephan Aßmus
4a96bcdafa Text frame work: Implement sending TextChangedEvents
TextDocument:
 * Moved implementation of Remove() and Insert() into private methods.
 * Reimplement all public Insert() methods and Remove() on top of Replace().
 * In Replace(), send a TextChangedEvent. Added TODO for sending a
   TextChangingEvent, although at this point, I am not sure if it will be
   needed at all.
2015-09-06 23:03:34 +02:00
Stephan Aßmus
f6e5131227 TextDocumentTest: Make document editable. 2015-09-06 23:02:51 +02:00
Stephan Aßmus
87136732d0 HaikuDepot: Fixed wording in a comment. 2015-09-06 21:51:24 +02:00
Stefano Ceccherini
ce27f9612e Implement ClipToPicture inside a BPicture. Not working yet.
BView::ClipToPicture doesn't work anymore, when nested inside a BPicture,
This happened when its implementation was moved server-side.
2015-09-05 21:35:54 +02:00
Humdinger
8ebeba656c Updated Web+ bookmarks.
Added BeSly software repo.
2015-09-05 19:17:10 +02:00
Michael Lotz
83dc74af93 BPicture: Fix archive constructor on 64 bit.
The int32 was cast to a ssize_t which has a different size on 64 bit,
therefore clobbering the stack.

Also remove the use of basic type references in arguments, which
probably was the reason for doing the above in the first place.
2015-09-05 18:13:34 +02:00
Michael Lotz
d64c7086d5 Various whitespace cleanup only. 2015-09-05 16:09:33 +02:00
Michael Lotz
8b9ec55606 BPicture: Fix archive constructor.
The cleanup commit df48d3f9a8 broke
constructing a BPicture from an archive due to an incomplete rename.
The passed in BMessage was used as the data buffer instead of the
extracted data field.

Fixes the application side crash of #12340. Seeing how long this was
broken without anyone noticing, the feature doesn't seem to be very
popular.
2015-09-05 16:09:32 +02:00
Michael Lotz
4176076be1 app_server: Port ServerPicture to the new PicturePlayer API.
This allows for bounds checks on strings and bitmap data to avoid
crashing due to corrupted user data. It also avoids copying the data
where possible.
2015-09-05 16:09:32 +02:00
Michael Lotz
eec73693e0 PicturePlayer: Rework to be more safe against corrupted data.
This introduces a more sane API (currently private) that allows for
safer and possibly more efficient implementations:

* It uses a struct of named and typed function pointers instead of just
  a void pointer array. This adds type safety to the callbacks so the
  compiler can figure out if things match up before subtle bugs get
  introduced.
* It provides bounds for all strings/buffers passed to the callbacks.
* It uses const references instead of implicitly copying arguments.
* It folds stroke_x/fill_x pairs into draw_x functions with a fill
  argument to reduce the amount of functions needed.
* It uses unsigned values where negative values make no sense.

The old API has been implemented on top of the new one using adapter
functions. It makes copies of all data passed to the callbacks which
effectively keeps the picture data from being modified. This matches
with the R5 behaviour.

This also reimplements the buffer parsing to be safe against corrupted
data by validating that the types actually fit in the provided sizes
and buffers (using a templated reader).

Since this class is used from the app_server with user provided data,
making it more safe is important even though it comes with a slight
overhead (replicating R5 behaviour, i.e. crashing the app_server when
corrupted data is fed, doesn't seem very appropriate here).
2015-09-05 16:09:31 +02:00
Adrien Destugues
5a87d490f5 Fix implementation of _res.
While not thread-safe, it should still be possible to use it in
non-threaded programs, or with locking on the application side.

The "thread-safe" implementation we got from NetBSD called abort(),
which is not a good solution. Restore the non-thread-safe
implementation, which should still work.

Fixes issues in openssh and mtr, and possibly other ported apps.
2015-09-05 12:17:46 +02:00
Humdinger
bf70e50b07 Updated Slime Volley package
Now with icon, app-signature, and settings saved in B_USER_SETTINGS_DIRECTORY.
2015-09-05 11:17:13 +02:00
autonielx
f3565aaab0 Update translations from Pootle 2015-09-05 06:40:57 +02:00
Alexander von Gluck IV
8248d96a06 AHCI: Begin simulating SCSI Inquiry with VPD data
* Needed for SCSI level access to trim maximum block sizes.
2015-09-04 19:30:34 -05:00
Rene Gollent
a1e25f862c Mail: Fix gcc4 build.
- Fix typo in forward declaration.
- Add missing include for snprintf.
- Add missing virtual destructor on QueryListener abstract class.
2015-09-04 16:57:06 -04:00
Axel Dörfler
9ed8f48498 Mail: show icons only setting works again.
* It will show the label as tool tip when the labels are hidden.
2015-09-04 17:33:51 +02:00
Axel Dörfler
6b8712663a BToolBar: made FindButton() public. 2015-09-04 17:33:46 +02:00
Axel Dörfler
50d381e862 Mail: use layout version of BMenuBar.
* Fixes layout issue: the minimal size was incorrect.
* Moved variable declaration to where it is actually used.
2015-09-04 17:33:41 +02:00
Axel Dörfler
31c65be109 Mail: fixed crash on resend.
* Seems to have been there for quite some time. Probably a good
  reason to remove that feature altogether.
2015-09-04 17:33:36 +02:00
Axel Dörfler
15c1056242 BMailSettings: removed debug message dump. 2015-09-04 17:33:32 +02:00
Axel Dörfler
62c1b01661 Mail: temporary workaround for the label placing issue.
* Does not work for all font sizes.
2015-09-04 17:33:27 +02:00
Axel Dörfler
4182c53bc4 Mail: change look of disabled text controls.
* Added HeaderTextControl that draws the text in black, and uses the
  panel background without a frame when it's disabled. Only the label
  is still drawn as disabled.
* Changed AddressTextControl to behave in the same way.
* The date view is now a HeaderTextControl, too.
* Unfortunately, the label is not vertically aligned with the contents.
2015-09-04 17:33:22 +02:00
Axel Dörfler
7bdee8beab BEmailMessage: added missing const, Date() returns time_t.
* Added missing const to some getter methods.
* Date() now tries to parse the date of the mail, and return it as
  a time_t; you can still retrieve the actual string via
  HeaderField("Date") if you have to.
* Mail now shows the time in the local time zone, and with the
  current locale.
2015-09-04 17:33:17 +02:00
Axel Dörfler
66078c7911 BMailComponent: made a few methods const. 2015-09-04 17:33:12 +02:00
Axel Dörfler
19d8cb703c BDate: added time_t constructor.
* This class is pretty much useless as it is.
2015-09-04 17:33:07 +02:00
Axel Dörfler
cc7e5aac40 Mail: fAccount text control is no longer used. 2015-09-04 17:33:03 +02:00
Axel Dörfler
8b1aaf348c Mail: properly disable prev/next buttons without Tracker.
* The prev/next buttons will only work when invoked via an actual
  mail file from Tracker.
2015-09-04 17:32:58 +02:00
Axel Dörfler
d891923650 BMenuField: use layout rect for the label.
* Instead of just laying it out as without the layout API.
2015-09-04 17:32:53 +02:00