Commit Graph

2389 Commits

Author SHA1 Message Date
Julian Harnath
d10ecc2c41 Style fix: add parameter name
* As pointed out by Axel.
2014-02-22 13:51:55 +00:00
Julian Harnath
dad49763d8 Disallow copy-construction of BCertificate.
* Prevents accidential creation of multiple instances with
  ownership of same fPrivate.
2014-02-22 13:51:52 +00:00
Julian Harnath
c99d7ea45c Fix double-free crash in BSecureSocket when cert. verification fails
* BSecureSocket::CertificateVerificationFailed() took a BCertificate
  instance by value as parameter.
  BCertificate deletes internal data in its destructor. Passing an
  object by value creates a copy, so the copy attempted to delete
  the internal data again during its destruction.
  This caused mail_daemon to crash here when it came across a failed
  certificate.

* Fix: pass BCertificate object as reference.
2014-02-22 02:09:55 +00:00
Adrien Destugues
19f3bae071 Fix more issues detected by gcc4 compiler:
More ssize_t/status_t mixup.
2014-02-11 17:51:22 +01:00
Adrien Destugues
9af2105d36 Move ZlibDecompressor to libshared
* This will be used to implement compressed http streams
* Remove the custom BDataOutput class, and use BDataIO instead, for
easier integration with existing code.
2014-02-11 12:06:38 +01:00
Adrien Destugues
b8c44b4c3f BAffineTransform: C++11 compatibility fix
inline const floats are a gcc extension. It is possible to do it in a
standard way in C++11 using constexpr, but then gcc will reject the
previously accepted nonstandard syntax.
2014-02-07 14:42:51 +01:00
Stephan Aßmus
a6db6bd40f Added WIP support for affine transformations to BViews.
Everything untested, but compiles, so it must work. The idea is to introduce
BAffineTransform additionally to the existing Origin and Scale properties of
BViews. One may use it in parallel or as an alternative. Painter in app_server
is not yet aware of the additional transformation. It is however already used
to transform drawing coordinates. It probably needs to work differently,
perhaps only in Painter and AGGTextRenderer.
2014-02-04 22:53:06 +01:00
John Scipione
77acb43273 TextView: Remove Cmd+Up and Cmd+Down Shortcuts
to go to the beginning and end of the document.
2014-02-01 11:04:34 -05:00
John Scipione
0875173246 TextView: Update nav shortcuts again
Make Cmd+Left and Cmd+Right work the same as Option+Left and
Option+Right, that is, they do word-wise navigation.

Make Option+Up go to beginning of paragraph and Option+Down go to end
of paragraph like Cmd+Left and Cmd+Right used to.

Unfortunately option shortcuts are currently eaten by S&T until #9431
gets fixed.
2014-01-31 18:30:07 -05:00
John Scipione
eb774c2948 TextView: Update navigation shortcuts
* Command+Left goes to beginning of line, ignoring softwrap
* Command+Right goes to the end of line, ignoring softwrap
* Home goes to beginning of line, accounting for softwrap
* End goes to end of line, accounting for softwrap
* Option+Left goes to previous word
* Option+Right goes to next word
* Command+Home and Command+Up go to beginning of document
* Command+End and Command+Down go to end of document

Shift with any of the above also selects the text.

This is similar to how the text editor Eddie works.
2014-01-30 19:48:31 -05:00
Ingo Weinhold
c41356fab5 BAppFileInfo: Add method versions that don't touch the MIME DB
Add SetSupportedTypes() and SetIcon[ForType]() versions with an
additional bool updateMimeDB parameter. If false, the method doesn't
update the MIME DB entries for the type.
2014-01-26 13:43:04 +01:00
Ingo Weinhold
3b07762c54 BAppFileInfo: Coding style update
Also remove doxygen comments.
2014-01-26 13:43:04 +01:00
Ingo Weinhold
6ef57ae2a9 pkgman: Add full-sync command
* BSolver/LibsolvSolver: Add FullSync() method. It uses libsolv's
SOLVER_DISTUPGRADE mode.
* BPackageManager: Add FullSync() using the new solver mode.
* pkgman: Add full-sync command.

The new command is similar to the update command without arguments, just
more aggressive, allowing downgrading or even removal of packages, to
match the state of the repositories. Just like "update" it doesn't work
properly yet.
2014-01-25 10:47:35 +01:00
Alexander von Gluck IV
14919567d1 kernel: Add more architecture code post-scheduler
* Fix incorrect cpu vendor name mapping
* Add additional CPU architectures
* Add additional CPU vendors
* Rework PowerPC arch_system_info passing
  PVR back for cpu model
2014-01-19 21:53:56 -06:00
Pawel Dziepak
32d1afe024 Remove B_CPU_x86_VENDOR_MASK 2014-01-20 00:31:38 +01:00
Adrien Destugues
fed5e6126b LocaleRoster: race condition on catalog loading.
Using a vint32 isn't enough to safely decide if the catalog is
initialized or not. Use init_once features instead.
2014-01-19 12:12:57 +01:00
Pawel Dziepak
d0f2d8282f Merge branch 'scheduler'
Conflicts:
	build/jam/packages/Haiku
	headers/os/kernel/OS.h
	headers/os/opengl/GLRenderer.h
	headers/private/shared/cpu_type.h
	src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.h
	src/bin/sysinfo.cpp
	src/bin/top.c
	src/system/kernel/arch/x86/arch_system_info.cpp
	src/system/kernel/port.cpp
2014-01-17 04:06:15 +01:00
Adrien Destugues
67af469ef0 Fix time_t/bigtime_t mixup.
Thanks stippi for noticing!
2014-01-16 09:41:01 +01:00
Adrien Destugues
5ebdc79955 SecureSocket: add some certificate support
* Instead of creating an OpenSSL context ofor each socket, use a global
one and initialize it lazily when the first SecureSocket is created
* Load the certificates from our certificate list so SSL certificates
sent by servers can be validated.
* Add a callback for signalling that certificate validation failed, the
default implementation proceeds with the connection anyway (to keep the
old behavior).
* Introduce BCertificate class, that provides some information about a
certificate. Currently it's only used by the callback mentionned above,
but it will be possible to get the leaf certificate for the connection
after it's established.

Review of the API and implementation is welcome, before I start making
use of this in HttpRequest and WebKit to allow the user to accept new
certificates.
2014-01-15 17:45:21 +01:00
Alexander von Gluck IV
7c28f77332 system: Improve AMD CPU detection
* Several CPUID's were thrown into the Athlon 64
  catch all.  Add Sempron 64 and correct CPUIDs
  solves #9553
* Add better AMD A-Series detection
2014-01-14 20:24:02 -06:00
Jonathan Schleifer
76b12d6056 StackOrHeapArray: Add missing include of cstddef.
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2014-01-13 19:14:49 +01:00
Adrien Destugues
3d864cd870 Remove B_PROT_* and related code
Use standard error codes instead.
This allows using error code returned by the underlying functions
directly, and makes it possible to use strerror for debugging. So, we
can also remove StatusString() from the various *Request classes.
2014-01-13 08:05:32 +01:00
François Revol
586d22c9ba Fix function prototype to be valid C 2014-01-11 17:53:00 +01:00
Jonathan Schleifer
4bda0212ce Add BStackOrHeapArray. 2014-01-10 22:31:46 +01:00
Alexander von Gluck IV
aa4b5749d6 runtime_loader: Detect and trigger on PE binaries
* Previously PE binaries would trigger the "incorrectly
  executable" dialog. Now we get a special message for
  B_LEGACY_EXECUTABLE and B_UNKNOWN_EXECUTABLE
* Legacy at the moment is a R3 x86 PE binary. This could
  be extended to gcc2 binaries someday far, far, down the
  road though
* The check for legacy is based on a PE flag I see
  set on every R3 binary (that isn't set on dos ones)
* Unknown is something we know *is* an executable, but
  can't do anything with (such as an MSDOS or Windows
  application)
* No performance drops as we do the PE scan last
* Tested on x86 and x86_gcc2
2014-01-07 19:38:07 -06:00
Pawel Dziepak
81e04d7b97 kernel: Remove cpu_info::load
This field forces kernel to track each CPU load all the time. It is not
a problem with the current scheduler on a multicore systems, but on
single core machnies or with any other future scheduler this field may
become just an unnecessary burden. It isn't difficult for an application
to compute CPU load by itself when it needs it.
2014-01-03 19:44:57 +01:00
Adrien Destugues
5b53e2e516 HttpRequest: close the connection on Stop()
When calling Stop(), we expect the request thread to exit as soon as
possible. Closing the connection unlocks it from any blocking read() or
write(), avoiding some lockup situations.
2014-01-02 08:38:03 +01:00
Alexander von Gluck IV
f8da8f3477 ARM: Be aware of ARMEL and ARMEL
* My BeagleBone gcc defines __ARMEL__ but not
  __ARM__ which breaks the native tool builds
* As ARM was originally Little Endian, we assume
  __ARM__ means as such.
* Look for Big Endian ARM and define the needed big
  endian preprocessors
2014-01-01 23:41:02 -07:00
Ingo Weinhold
a0848a1916 BButton: Add optional pop-up marker
* Add behavior constant B_POP_UP_BEHAVIOR which adds a pop-up marker
  to the button (similar to that of BMenuField).
* Add methods [Set]PopUpMessage(). To set/get the the message that is
  sent to the button's target when the pop-up marker is clicked.
2013-12-30 04:42:52 +01:00
Ingo Weinhold
813c5772c9 BButton: Removed dead code
Remove methods _DrawDefault() and _DrawFocusLine() which were used for
the non-BControlLook drawing.
2013-12-30 04:18:33 +01:00
Ingo Weinhold
b998f9f02f BButton: Add support for toggle button behavior
Add methods SetBehavior(), Behavior(). Supported behavior constants are
B_BUTTON_BEHAVIOR -- normal button behavior -- and B_TOGGLE_BEHAVIOR
-- toggle button behavior.
2013-12-29 01:21:45 +01:00
Ingo Weinhold
b181fabe57 BButton: Remove left over attributes 2013-12-29 00:43:25 +01:00
Ingo Weinhold
a249edfbfc BButton: Add flat property
* Add methods SetFlat()/IsFlat(). A flat button doesn't draw its frame,
  unless the mouse is hovering over it or it is otherwise activated.
* As a side effect this change also activates the hover glow that was
  already implemented in BControlLook, but not activated in BButton.
2013-12-29 00:13:49 +01:00
Alexander von Gluck IV
eb45d168e1 GL: Remove OpenGL kit, x86 Mesa
* Depend on Mesa packages to provide functionality
2013-12-22 23:36:02 -06:00
Ingo Weinhold
97bf0ce362 BControl: Move icon code to separate class BIcon 2013-12-22 14:45:34 +01:00
Ingo Weinhold
5414b3c445 Move icon related constants to InterfaceDefs.h
There will be non-BControl views to use those as well.
2013-12-22 14:45:33 +01:00
Ingo Weinhold
f829889455 BCheckBox: Add icon support
* Draw(): Remove the non-BControlLook code.
* GetPreferredSize(): Implement based on _ValidatePreferredSize() to
  avoid code duplication.
* Draw(): Fix off-by-one error. The label was too close to the box.
* Draw(), _ValidatePreferredSize(): Add icon support.
  _ValidatePreferredSize() is now actually aligned with what Draw()
  expects. The preferred width is now a tight fit; there were three or
  four pixels of empty space before.
  Due to the fixed check box position the layout isn't that nice in
  some situations (particularly with an icon larger than the text),
  IMHO.
2013-12-22 04:48:21 +01:00
Ingo Weinhold
be4367428b BControl subclasses: Override SetIcon()
... and implement Perform() action for potential later use.
2013-12-22 02:48:27 +01:00
Ingo Weinhold
be260374d5 BControl: Add icon support
The icon is meant as an addition to or replacement of the label. Icon
bitmaps for various states of the control (off, on, partially on, each
enabled or disabled, plus up to 125 custom states) can be set
individually via SetIconBitmap() (getter IconBitmap()).
The convenience method SetIcon() can be used to set the bitmaps for the
standard states from a single bitmap; it also supports cropping the
icon to its non-transparent area. Code borrowed from BIconButton.
2013-12-22 02:48:25 +01:00
Ingo Weinhold
1b848ee7f2 BControlLook: Add DrawLabel() variants with icon
A label, a bitmap, or both can be specified.
2013-12-22 02:48:24 +01:00
Ingo Weinhold
8719e0dc4b BControlLook: Add methods for getting insets
* Update the previously unused frame_type and background_type enums.
* Add methods GetFrameInsets(), GetBackgroundInsets(), GetInsets() to
  get the insets for a given frame type, background type, or both
  respectively.
2013-12-22 02:48:23 +01:00
Ingo Weinhold
df37cd4edd BCheckBox: Add tri-state support
* Add possible control state B_CONTROL_PARTIALLY_ON and support it in
  BCheckBox and BControlLook.
* BCheckBox: Add partialStateToOff property defining whether the
  partial state should transition to off. Defaults to false (i.e.
  partial to on).
2013-12-21 02:12:04 +01:00
Ingo Weinhold
5d7f782d4e BLooper: Add DispatchExternalMessage()
* This is primarily a service method for ports of widget tool kits
  that require single-threaded GUI. DispatchExternalMessage() calls
  DispatchMessage(), but also sets fLastMessage, so that
  [Detach]CurrentMessage() work correctly. This allows to detach a
  message in DispatchMessage() when called from the window thread,
  add it to a global queue, and later process the queued messages in
  a different thread that calls DispatchExternalMessage().
* BLooper/BWindow: Make sure fLastMessage is accessed only when locked.
2013-12-20 15:47:23 +01:00
Pawel Dziepak
ad6b9a1df8 scheduler: Use sequential locks instead of atomic 64 bit access 2013-12-20 02:18:44 +01:00
Pawel Dziepak
1b06228f13 kernel: Propagate scheduler modes to cpu{freq, idle} modules 2013-12-17 23:26:37 +01:00
Pawel Dziepak
d02aaee17e kernel, libroot: Add more memory info in system_info
system_info now contains all information previously available only
through __get_system_info_etc(B_MEMORY_INFO, ...).
2013-12-16 04:53:46 +01:00
Pawel Dziepak
1bc7045fdf kernel, libroot: Introduce new API for obtaining system info 2013-12-16 03:58:43 +01:00
John Scipione
1e1afb3939 Updates to BOutlineListView for docs
mostly param naming.

No functional change intended.
2013-12-11 16:13:52 -05:00
Adrien Destugues
824dd0a834 Reintroduce BUrlResult and add BDataRequest
* BUrlResult is back, with ContentType and Length methods.
* BHttpResult subclasses it and use HTTP header fields to implement
those
* Introduce BDataRequest for "data" URIs. These embed the data inside
the URI, either as plaintext or base64 encoded.
2013-12-11 17:29:25 +01:00
Pawel Dziepak
bcfdf88186 apps, kernel: Remove B_MAX_CPU_COUNT 2013-12-06 21:57:58 +01:00