Commit Graph

51692 Commits

Author SHA1 Message Date
Stephan Aßmus
28075ee427 HaikuDepot: Implemented logging into haiku-depot-server
UserLoginWindow:
 * Focus nickname text field on tab switches
 * Implement testing the login info, the web-app replies with a token, if
   valid. It could be used for Token Bearer authorization of requests, but
   this is not used yet. Instead the username and password are set on the
   Model. Also after creating a new account successfully.
Model:
 * Use a member instance of WebAppInterface. Set the preferred language
   and the login-info only once.
2014-09-21 00:09:17 +02:00
Stefano Ceccherini
f511367b33 BSoftSynth::SetInstrumentsFile(): Check if file exists. 2014-09-20 19:57:03 +02:00
Stefano Ceccherini
c0622eb3d3 Fix spacing 2014-09-20 19:21:23 +02:00
Stefano Ceccherini
bd68cd0517 Midi Kit: SoftSynth: Implement reverb (patch by Pete Goodeve)
Applied patch by Pete Goodeve which implements reverb in the soft synthesizer.
2014-09-20 19:19:12 +02:00
Stefano Ceccherini
6cd948da2a Midi Kit: Actually look in /home/config/settings/synth/synth.sf2 2014-09-20 19:08:34 +02:00
Stefano Ceccherini
bee3de4dbb Midi Kit: Made it possible for the user to use a soundfont different
from the one supplied by default.
Since the PM move, it was not possible anymore to use a different soundfont,
since the /boot/system/data folder became read only.
Now the user has to put the soundfont (or, better,  a symbolic link to it)
into /home/config/settings/synth.sf2
In the future we'll supply a preflet to select the soundfont.
2014-09-20 19:01:41 +02:00
autonielx
937e70aa28 Update translations from Pootle 2014-09-20 06:22:44 +02:00
Stephan Aßmus
9be707603f HaikuDepot: Implemented creating web-app user accounts
The accounts are created for real, but the information is not yet stored.
Nothing which would need it is currently implemented, like rating packages.
It is recommended to create accounts with a valid email address. Otherwise
the password cannot be reset, and it will need to be soon, since there
is a small change to the password storage in the pipe.

The error response from the service is parsed and presented
to the user, when the account could not be created. However, other checks
before contacting the server are not performed, like if the two passphrases
actually match.

The UserLoginWindow now has the concept of a running worker thread, and
while it runs, the UI controls (except Cancel) are disabled.
2014-09-20 01:35:45 +02:00
Stephan Aßmus
dfee849828 HaikuDepot: Added WebAppInterface::CreateUser() 2014-09-20 01:35:42 +02:00
Stephan Aßmus
a067756a29 HaikuDepot: Get captcha image in UserLoginWindow 2014-09-20 01:35:40 +02:00
Stephan Aßmus
d07ca0696d HaikuDepot::Model: Set preferred language earlier
Added accessor for preferred language.
2014-09-20 01:35:38 +02:00
Stephan Aßmus
fe6f67b410 HaikuDepot: Added captcha request to WebAppInterface
Also removed some disabled debug output.
2014-09-20 01:35:35 +02:00
Adrien Destugues
ee2985c144 NetworkSetup: list and join wireless networks
* Reuse the logic from the old network preflet for now. Something better
can be done later.
2014-09-19 17:52:11 +02:00
Adrien Destugues
763cd902f6 NetworkSetup: simplify UI layout
* Temporarily disable the non-working Profiles popup
* Remove the currently single-tabbed TabView
* Remove duplicate apply and revert buttons in the interfaces add-on.

The goal here is to remove functionalities not available in the current
network preferences, and finish the other parts, so we can put this new
preferences panel in service now. We can re-add the extra functionality
later.
2014-09-19 17:52:10 +02:00
Humdinger
76a607d2fe BAboutWindow: use the standard "OK" instead of "Ok" 2014-09-19 17:26:30 +02:00
Adrien Destugues
126a04e6d6 NetworkSetup: put interface settings in main window
* The initial design was probably inspired by Windows network settings,
which are a mess of nested windows and hyperlinks.
* Instead, the settings can be put directly inside the main window, like
it is done inthe media preflet. This makes the information available at
a glance and makes the UI easier to navigate.
* Remove the "configure" button and popup menu item. A single click is
now enough to show the settings for an interface

For this to work properly, complete the move to layout kit (there were a
few BRect-based constructorls left which would mess the layout) and
remove unneeded rectangle computations (layout kit does the job
already).

Further cleanup pending:
* Removal of the duplicate "revert" button
* Removal of the "save" button and switch to applying settings realtime
* Move the disable/enable and renegociate buttons inside the interface
settings
* Remove the top-level tab view (nested tab views are not nice) and
use a hierarchized list with both interfaces and services on the side
(like the Media preflet has audio and video).
2014-09-19 14:13:01 +02:00
Adrien Destugues
941986f7f4 Add the ALM headers to the haiku_devel package.
We provide the library, so why not also provide the development headers
for it?
2014-09-19 10:26:51 +02:00
Adrien Destugues
5fae0bc1a2 Add some cppunit-based tests for BTextView.
Note that this does not reproduce #8447. I could not get more precise
details from involved people about how to reproduce this, and the patch
was already applied anyway, so I'm stopping my investigation for now.
Feel free to complete this with more test cases.
2014-09-19 09:59:38 +02:00
Stefano Ceccherini
0bbed9620a TextGapBuffer: Style changes
Change long to int32
Removed useless parenthesis
2014-09-19 09:28:14 +02:00
Stefano Ceccherini
0eb9b74e00 BTextView: Fixed GetText().
Patch by Pete Goodeve which fixes a problem in TextGapBuffer::GetString()
used by BTextView::GetText(). Thanks! Fixes #8447.
2014-09-19 09:17:17 +02:00
Stephan Aßmus
d6bd3409e5 HaikuDepot: Don't right-align publisher/copyright...
... in the available space in the package title area. Just looks too random.
2014-09-18 22:39:45 +02:00
Stephan Aßmus
81c000dd0d HaikuDepot: Add "Log in" menu item which shows new window 2014-09-18 22:39:43 +02:00
Stephan Aßmus
700a71bdb8 HaikuDepot: WIP interface for logging in...
... or creating a new account in the web application. Just the interface,
nothing is functional, yet.
2014-09-18 22:39:41 +02:00
Stephan Aßmus
4f4f859c1a HaikuDepot: Small code cleanups in PackageInfo. 2014-09-18 22:39:38 +02:00
Stefano Ceccherini
ef860b2e96 NetStack: Fix locking
Change the monitor_lock to be a recursive_lock, fixing #7039.
Notify_device_monitor acquires the monitor lock, then the
monitor unregisters itself, calling unregister_device_monitor, which
acquires the monitor lock again.
2014-09-18 21:45:44 +02:00
Adrien Destugues
3ae6595c39 Build fix. 2014-09-18 17:41:21 +02:00
Janus
a74b2df992 Fix #9448. [notification_server] monitors screen resolution 2014-09-18 17:06:15 +02:00
Augustin Cavalier
016ef2de8b makefile_engine: fix wording, rewrap, bump version, capitalize name.
* Improve wording, fix spelling errors, rewrap
* Capitalize name
* Adjust templates to match.

Fixes #11158.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2014-09-18 16:29:44 +02:00
Alex Smith
8c7c8ec49f Update x86_64 bison package to 2.6.5
The previous package was broken (would often segfault, prevented
building Haiku cross-tools under x86_64), so update to the latest
version in HaikuPorts.

Signed-off-by: Alex Smith <alex@alex-smith.me.uk>
2014-09-18 15:14:16 +01:00
Adrien Destugues
77e139232c Syntax fix.
Sorry!
2014-09-18 15:01:57 +02:00
Adrien Destugues
1c3d2f2da4 Remove git_cvs from the non-hybrid gcc2 image.
It depends on gcc4-only package cvsps. Thanks to Ingo for suggestion on
how to do this.
2014-09-18 14:57:50 +02:00
Adrien Destugues
fda3962062 Migrate to Python 2.7.
* I rebuilt all packages that depend directly on python: I hope I
didn't miss anything.
* SVN upgraded to 1.8.10 because I couldn't get 1.6.18 to build. This
required uodating expat, apr and apr_util, and adding serf which
replaces neon for SVN http support.
* Everything seems to be running fine so far.
2014-09-18 10:06:33 +02:00
Julien Lepiller
73309d564f bootman: add the drive's icon in the drive list
* Also check status of GetIcon()
* Delete fDrive, fIcon in destructor

Fixes #7088

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2014-09-18 15:50:18 +12:00
Jérôme Duval
c8990b0907 _user_wait_for_objects: remove redundant check. 2014-09-17 21:04:14 +02:00
Adrien Destugues
7603710e9a Style fixes. 2014-09-16 21:39:53 +02:00
Adrien Destugues
804876f698 Style fixes. 2014-09-16 21:38:24 +02:00
Adrien Destugues
ce1f0d0a96 Remove the "old" network preflet.
This code is unused since 2007 and it's in the git history if you ever
need it again.
2014-09-16 21:33:12 +02:00
Adrien Destugues
2c8da96546 WebPositive: improve "show bookmark bar" menu item
* Disable the menu item when the folder doesn't exist, as the bar won't
show in that case.
* Use a mark on the item to tell wether the bar is visible, rather than
changing its label
* Simplify the logic for hiding and showing the bar. It is safe to call
_ShowBookmarkBar even if the bar doesn't exist, so no need to check for
it everywhere.

Fixes #11199.
2014-09-16 17:40:34 +02:00
Adrien Destugues
21f8e588da Optimize BUrl copy.
BUrl is passed by value in many places, and we should make sure this is
as efficient as possible. There is little point in initializing all the
strings then overwriting them by using the copy constructor, when we can
set them directly.
2014-09-16 15:30:01 +02:00
Adrien Destugues
c98378e51a Add HTTP proxy support.
* Move default context management to BUrlRequest since some code
(including the testsuite) bypass the BUrlProtocolRoster.
* Introduce proxy host and port in BUrlContext
* Have BHttpRequest use the proxy when making requests
2014-09-15 14:24:37 +02:00
Jessica Hamilton
cee64ce507 intel_extreme: probe all GPIO pins 2014-09-15 09:21:00 +02:00
Jessica Hamilton
9965ac0677 Partition.cpp: fix function prototype. 2014-09-15 16:40:25 +12:00
Jessica Hamilton
f0b0d6578b Undo accidental file mode changes. 2014-09-15 16:38:30 +12:00
Jessica Hamilton
fd7f53f049 storage kit: don't expose the dev_t in BPartition::Mount()
Comments to #9672 agree that there's really no need to
expose the dev_t handle, thus simplifying the API.

The dev_t handle, if required, can be retrieved via
BPartition::GetVolume() instead.
2014-09-15 16:28:41 +12:00
Paweł Dziepak
95e97463d2 kernel: add generic wrapper for accessing user memory
This patch adds user_access() which can be used to gracefully handle
page faults that may happen when accessing user memory. It is used
by arch_cpu_user{memcpy, memset, strlcpy}() to allow using optimized
functions from the standard library.

Currently only x64 uses this, but nothing really is arch specific here.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-09-14 22:39:07 +02:00
Paweł Dziepak
e81b792e8f Merge branch 'memcpy-v3'
This is a major rework of how Haiku implements memset() and memcpy() on
x64. These functions are now removed from the commpage and reimplemented
in C++ using sse2 where it proved to be beneficial. That required some
serious changes in handling fpu state. Now, full fpu state is saved
at each interrupt, but not on task switch.

Some numbers: results of building targets: kernel libroot.so runtime_loader
and HaikuDepot on Intel i7 4770 with 16GB of memory.

real
user
sys

before:
1m54.367
7m40.617
0m58.641

1m33.922
8m12.362
1m0.852

1m32.922
8m10.509
1m1.006

1m31.947
8m12.596
1m1.353

after:
1m50.959
7m43.118
0m58.923

1m30.644
8m6.385
1m0.584

1m31.549
8m7.976
0m59.792

1m31.546
8m6.733
1m0.242
2014-09-14 19:26:07 +02:00
Paweł Dziepak
4582b6e3a3 libroot/x86_64: new memcpy implementation
This patch introduces new memcpy() implementation that improves the
performance when the buffer is small. It was written for processors that
support ERMSB, but performs reasonably well on older CPUs as well.

The following benchmarks were done on Haswell i7 running Debian Jessie
with Linux 3.16.1. In each iteration 64MB buffer was copied, the
parameter "size" is the size of the buffer passed in a single call (i.e.
for "size: 2" memcpy() was called ~32 million times to copy the whole
64MB).

f - original implementation, g - new implementation, all buffers 16 byte
aligned

cpy, size:        8, f:    79971 µs, g:    20419 µs, ∆:   74.47%
cpy, size:       32, f:    42068 µs, g:    12159 µs, ∆:   71.10%
cpy, size:      128, f:    13408 µs, g:    10359 µs, ∆:   22.74%
cpy, size:      512, f:    10634 µs, g:    10433 µs, ∆:    1.89%
cpy, size:     1024, f:    10474 µs, g:    10536 µs, ∆:   -0.59%
cpy, size:     4096, f:     9419 µs, g:     8630 µs, ∆:    8.38%

f - glibc 2.19 implementation, g - new implementation, all buffers 16 byte
aligned

cpy, size:        8, f:    26299 µs, g:    20919 µs, ∆:   20.46%
cpy, size:       32, f:    11146 µs, g:    12159 µs, ∆:   -9.09%
cpy, size:      128, f:    10778 µs, g:    10354 µs, ∆:    3.93%
cpy, size:      512, f:    12291 µs, g:    10426 µs, ∆:   15.17%
cpy, size:     1024, f:    13923 µs, g:    10571 µs, ∆:   24.08%
cpy, size:     4096, f:    11770 µs, g:     8671 µs, ∆:   26.33%

f - glibc 2.19 implementation, g - new implementation, all buffers unaligned

cpy, size:       16, f:    13376 µs, g:    13009 µs, ∆:    2.74%
cpy, size:       32, f:    11130 µs, g:    12171 µs, ∆:   -9.35%
cpy, size:       64, f:    11017 µs, g:    11231 µs, ∆:   -1.94%
cpy, size:      128, f:    10884 µs, g:    10407 µs, ∆:    4.38%
cpy, size:      256, f:    10826 µs, g:    10106 µs, ∆:    6.65%
cpy, size:      512, f:    12354 µs, g:    10396 µs, ∆:   15.85%

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-09-14 19:16:52 +02:00
Paweł Dziepak
1d7b716f84 libroot/x86_64: new memset implementation
This patch introduces new memset() implementation that improves the
performance when the buffer is small. It was written for processors that
support ERMSB, but performs reasonably well on older CPUs as well.

The following benchmarks were done on Haswell i7 running Debian Jessie
with Linux 3.16.1. In each iteration 64MB buffer was memset()ed, the
parameter "size" is the size of the buffer passed in a single call (i.e.
for "size: 2" memset() was called ~32 million times to memset the whole
64MB).

f - original implementation, g - new implementation, all buffers 16 byte
aligned

set, size:        8, f:    66885 µs, g:    17768 µs, ∆:   73.44%
set, size:       32, f:    17123 µs, g:     9163 µs, ∆:   46.49%
set, size:      128, f:     6677 µs, g:     6919 µs, ∆:   -3.62%
set, size:      512, f:    11656 µs, g:     7715 µs, ∆:   33.81%
set, size:     1024, f:     9156 µs, g:     7359 µs, ∆:   19.63%
set, size:     4096, f:     4936 µs, g:     5159 µs, ∆:   -4.52%

f - glibc 2.19 implementation, g - new implementation, all buffers 16 byte
aligned

set, size:        8, f:    19631 µs, g:    17828 µs, ∆:    9.18%
set, size:       32, f:     8545 µs, g:     9047 µs, ∆:   -5.87%
set, size:      128, f:     8304 µs, g:     6874 µs, ∆:   17.22%
set, size:      512, f:     7373 µs, g:     7486 µs, ∆:   -1.53%
set, size:     1024, f:     9007 µs, g:     7344 µs, ∆:   18.46%
set, size:     4096, f:     8169 µs, g:     5146 µs, ∆:   37.01%

Apparently, glibc uses SSE even for large buffers and therefore does not
takes advantage of ERMSB:

set, size:    16384, f:     7007 µs, g:     3223 µs, ∆:   54.00%
set, size:    32768, f:     6979 µs, g:     2930 µs, ∆:   58.02%
set, size:    65536, f:     6907 µs, g:     2826 µs, ∆:   59.08%
set, size:   131072, f:     6919 µs, g:     2752 µs, ∆:   60.23%

The new implementation handles unaligned buffers quite well:

f - glibc 2.19 implementation, g - new implementation, all buffers unaligned

set, size:       16, f:    10045 µs, g:    10498 µs, ∆:   -4.51%
set, size:       32, f:     8590 µs, g:     9358 µs, ∆:   -8.94%
set, size:       64, f:     8618 µs, g:     8585 µs, ∆:    0.38%
set, size:      128, f:     8393 µs, g:     6893 µs, ∆:   17.87%
set, size:      256, f:     8042 µs, g:     7621 µs, ∆:    5.24%
set, size:      512, f:     9661 µs, g:     7738 µs, ∆:   19.90%

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-09-14 19:16:52 +02:00
Paweł Dziepak
718fd007a6 kernel/x86_64: clear xmm0-15 registers on syscall exit
As Alex pointed out we can leak possibly sensitive data in xmm registers
when returning from the kernel. To prevent that xmm0-15 are zeroed
before sysret or iret. The cost is negligible.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-09-14 19:16:52 +02:00
Paweł Dziepak
396b74228e kernel/x86_64: save fpu state at interrupts
The kernel is allowed to use fpu anywhere so we must make sure that
user state is not clobbered by saving fpu state at interrupt entry.
There is no need to do that in case of system calls since all fpu
data registers are caller saved.

We do not need, though, to save the whole fpu state at task swich
(again, thanks to calling convention). Only status and control
registers are preserved. This patch actually adds xmm0-15 register
to clobber list of task swich code, but the only reason of that is
to make sure that nothing bad happens inside the function that
executes that task swich. Inspection of the generated code shows
that no xmm registers are actually saved.

Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
2014-09-14 19:16:52 +02:00