Commit Graph

57745 Commits

Author SHA1 Message Date
Augustin Cavalier
a7c323c633 libroot/time: set_timezone is deprecated and does nothing, so don't return B_OK. 2017-11-15 18:11:33 +01:00
Augustin Cavalier
f009c69deb docs/develop/input: Delete useless cruft.
The only thing of any real use in this directory was the Be Newsletter
article, and the objdump from BeOS R5 (at least I guess that's what it is...)
so I kept those.
2017-11-15 17:52:50 +01:00
Augustin Cavalier
69da4f60e8 input_server: Delete useless functions.
As far as I can tell, these functions were "added" because they appear
in a symbols dump from R5. Nothing calls them, they don't do anything,
and they do not appear in R5 headers.
2017-11-15 17:52:39 +01:00
Augustin Cavalier
581cd2a22d Nuke COMPILE_FOR_R5.
Not used in $long_time, almost certainly broken, so it's just cruft.
2017-11-15 17:52:27 +01:00
Augustin Cavalier
304f594da1 De-wire net_stack_cleanup from boot/loader/main.cpp
This reverts commit 2960780faa.
Sorry for the noise; I thought I'd run a compile but apparently it was
only a partial one.

It seems that the netboot core is linked into the main bootloader
no matter the build configuration, which means that since this one
function was called, the linker tried to resolve all the other symbols
from that static library. Which of course failed.
2017-11-13 21:17:45 +01:00
Augustin Cavalier
ec0a48e837 wlan/Jamfile: Update comments to properly reflect in-tree driver origin. 2017-11-13 17:19:05 +01:00
Owen
a4d1e64920 Make Alt-Up and Alt-W keys work for file panels.
Fixes #11979

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:56:47 +01:00
Andreas Faerber
2960780faa Wire up net_stack_cleanup()
The NetStack.h header is currently not usable from C code. So while
net_stack_init() is called from platform code, we cannot call
net_stack_cleanup() from OpenFirmware's platform_start_kernel().
Thus call it directly from main()'s cleanup TODO, having assured
that the function is a no-op when no network stack was initialized.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:48:26 +01:00
Andreas Faerber
ce6fdd33ef Detach UDP sockets on cleanup
The UDP service does not own the UDP sockets. When shutting down,
inform the bound sockets that the service is no longer available.
This allows subsequent method calls to error out cleanly.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:48:09 +01:00
Andreas Faerber
74077e46e1 Add net_stack_cleanup()
Add a cleanup function net_stack_cleanup() that calls a new NetStack::ShutDown() method.
Make sure this method works even if the network stack was never initialized.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:47:27 +01:00
Andreas Faerber
9037351c6c Don't double-free the Ethernet interface
It is currently done in both ~EthernetService() and ~NetStack().

Since NetStack is where it's added and where an explicit accessor function is provided,
choose that location.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:46:32 +01:00
Dale Cieslak
1939021364 CharacterMap: Use binary searches rather than linear lookups where possible.
UnicodeBlockView::SelectBlockForCharacter and CharacterView::_FrameFor
use the same linear search to find which block a character is in, so I
refactored both to use a shared BlockForCharacter function in UnicodeBlocks.cpp
that is a binary search. CharacterView::_BlockAt also had a TODO comment to
use a binary search, so I rewrote it as a binary search. It's not the same
search as the aforementioned BlockForCharacter function. These two changes
ought to improve the overall performance of CharacterMap.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-11-13 16:33:21 +01:00
Andrew Lindesay
c23b641cf1 HaikuDepot: New Mechanic for Package Data Download
The application was previously making a number of different
requests to the application server in order to pull-down
meta-data (ratings, localization etc...) for packages.  This
will now happen in one request per repo.  The data is
also cached locally and freshness of the data is checked
back with the server before new data is pulled down.
2017-11-11 23:49:26 +01:00
A-star-ayush
272e1a2f97 tcp: fixed no response from window update, removed ideal timer
The reason for the erratic behavior was that the tcp implementation
silently drops window update messages after noting the update but without
triggering any data send event. Before the new TCP patches were applied,
the implementation relied on a retransmission timeout to trigger a send event
after a window update. One of the new patches dealing with the ideal timer
changed the semantic of the restransmit function call and caused the behavior
witnessed.

But a retransmission timeout is not the correct solution to window update. In
fact a retransmission is not a desired effect of window update. So in the patch
attached, I have changed the behavior of the implementation to immediately
acknowledge the window update (along with data from SendQueue) and thus solving
the problem of complete halt in data transmission.

The patch also has the changes re-implemented that were reverted back but had
nothing to do with the issue at hand. For the time being, I have also removed
the "ideal timer" part from the patch (although it wasn't creating any
conflict). I initially decided to implement the ideal timer using the same
timer used for retransmission to avoid adding an additional timer. But as I
have seen, it can be problematic. So I will be re-implementing the ideal timer
and thus it was not included in this patch.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Fixes #13704.
2017-11-11 11:56:51 +01:00
Automatic Committer
5d9eb1eb1b Update translations from Pootle 2017-11-11 07:09:23 +01:00
John Scipione
1061001b46 API Docs: minor brief description updates 2017-11-10 15:24:34 -08:00
John Scipione
9e72aeccc5 LayoutBuilder docs: document missing paramters 2017-11-10 15:11:10 -08:00
John Scipione
a960a58cd7 Docs: remove ; causing it not to find copydetails 2017-11-10 15:00:05 -08:00
John Scipione
6f6c9e0069 BDurationFormat::Format docs, update method params
Also a tiny style fix in the header, put const qualifier
on same line
2017-11-10 14:59:33 -08:00
John Scipione
021c2fec4f BNumberFormat docs: remove const qualifier 2017-11-10 14:45:39 -08:00
John Scipione
e08fce49e7 BDurationFormat docs: update ctor docs 2017-11-10 14:41:28 -08:00
John Scipione
1e994bc7cf Docs: Fix some warnings
... by adding book_ prefix in front of section labels in book.dox
2017-11-10 14:17:55 -08:00
John Scipione
d4a640ec2e Replace pt0 and pt1 with start and end 2017-11-09 13:58:35 -08:00
John Scipione
44b874666a API docs: it's => its fix 2017-11-09 13:23:55 -08:00
Jérôme Duval
fd6ef33795 xhci: HandleTransferComplete: adjust the lower check.
after the previous commit.
2017-11-08 22:46:33 +01:00
Greg Crain
c5ea0115b0 xhci: Fix incorrect TRB offset; solves #13343
* The incorrect offset would result in semaphores timing out

Signed-off-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2017-11-08 15:13:20 -06:00
Greg Crain
e344167824 xhci: the command ring must be stopped when setting its address.
* send stop and cancel commands.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2017-11-08 19:02:33 +01:00
Greg Crain
5ed6ef8e18 xhci: SubmitControlRequest: init 1st quadbit in SetupStage
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2017-11-08 17:51:50 +01:00
Philippe Houdoin
a54feb0e89 TextSearch: fix bug with filenames containing ' or " or \
* Style policy
* Add more error checking
* Increase default directories stack depth
2017-11-07 17:58:52 +01:00
Philippe Houdoin
77b2cdba88 TextSearch: fix build 2017-11-07 14:42:48 +01:00
Philippe Houdoin
ce04a43add TextSearch: avoid calling ChangesIterator's method when null
Fixes #9874
2017-11-07 14:35:25 +01:00
Philippe Houdoin
653c767602 TextSearch: several small improvements
* Wakeup periodically search thread, cancelling should be
  more responsive now...
* Show Lines setting is now saved too
* Fix a bug, current file is display again while searching.
* Always pass line number, if any, to invoked app.
  Works with StyledEdit as with Pe.

Partially fix #13289.
Another change will add "open with" context menu and remove "Open with Pe".
2017-11-07 10:37:21 +01:00
Augustin Cavalier
83e8a2654c Revert "userguide: fixes link to repositories pref page."
Revert "docs: promote SoftwareUpdater as easy tool to update Haiku."

This reverts commit 6487273924.
This reverts commit 8aab3a0d5e.

--

The Userguide and Welcome Guide are written and managed in the Userguide
Translator, not in the tree.
2017-11-06 19:56:56 +01:00
Philippe Houdoin
6487273924 userguide: fixes link to repositories pref page. 2017-11-06 19:13:07 +01:00
Philippe Houdoin
8aab3a0d5e docs: promote SoftwareUpdater as easy tool to update Haiku.
The welcome page was still saying the only way to update Haiku
is per command line. Not as much welcoming as one could expect
since SoftwareUpdater is now available.

Add SoftwareUpdater to the list of Haiku's applications in User Guide.
2017-11-06 19:06:48 +01:00
Philippe Houdoin
359b82e26a TextSearch: unbreak 32bits builds 2017-11-06 18:08:35 +01:00
Philippe Houdoin
33d4c8a62e TextSearch: way speeder by using xargs + grep
* Previously, each file was starting a shell to run grep
  command on it. Very suboptimal performance, big overhead.
* Now a thread write each file path to xargs input,
  while another start xargs, let it distribute files on
  grep processes (one per cpu) and collect results asap.
* This bring results way faster than previously.
* Rename Escape Text setting into Regular Expression, as
  name was more after shell workaround than after function.
* While it doesn't use a native text searching, by
  reusing both grep and xargs power, it answer the main
  issue with #9529.
2017-11-06 16:31:17 +00:00
John Scipione
2d27c2d003 Deskbar: Fix bug where items are sometimes wrong size
in vertical mode because the menu's MaxContentWidth is too small.

Fixes #13715
2017-11-05 21:10:40 -08:00
John Scipione
c0be54904f Deskbar: Fix bug calculating position of replicant icons
...in horizontal mode.

fTime->Frame().left was not in the correct position because the
window isn't yet done resizing. Instead calculate left from the
right edge of the drag region instead.
2017-11-05 21:04:14 -08:00
John Scipione
7b7bf68d71 Deskbar: create new constant kClockMargin and use it
defines the (minimum) margin between clock and replicant icons

Was used in a couple different forms, now all in 1 constant
2017-11-05 21:04:13 -08:00
John Scipione
a44504a168 Deskbar: Refactor TRelicantTray::LocationForReplicant()
* if index == 0 return right away, no calculation required.
* rename rect to rowRect then copy it into replicantRect.
  - This makes it clearer to me what's going on.
* don't have to check if index > 0 in horizontal mode anymore since
  we are checking it upfront.
* introduce replicantWidth variable for understanding
* reduce indent

Was calculating the height in multi-row mode twice. Instead, use
the saved height, if that isn't set calculate height as before,
if no replicants, use minimum height (16px) and don't calculate.
2017-11-05 21:04:13 -08:00
John Scipione
d8357181eb Minor whitespace style fix in TReplicantTray class
spacing private variables, no functional change intended.
2017-11-05 21:04:12 -08:00
John Scipione
32b0035a9f Deskbar: Rename some methods, variables, and call method
Rename IconCount() method to ReplicantCount()

Rename fChild and child to fReplicantTray and replicantTray
2017-11-05 21:04:12 -08:00
John Scipione
c62a389196 PowerStatus: Make battery 16x16 in Deskbar
Frame was a bit wider than it needed to be to fit, battery is same
size as before.

Moved the lightning right 1px and down 1px to fit better

expands to show battery percentage more compactly as well.
2017-11-05 21:04:11 -08:00
John Scipione
3b8cb30034 Deskbar: Set app menu width to drag region width
...in vertical mode. This is a simplication that is possible because
I am confident that the drag region is the right size at this point
so we don't have to lookup the window width or app width setting.

This led to further code simplications to vertical frame sizing.
Use MenuBar frame for right dimension always because it is set even
if fTrayLocation were to be set to 0.
2017-11-05 21:04:11 -08:00
John Scipione
c0dc265c3b Deskbar & PowerStatus: Realign Replicants
Added a new message constant to Deskbar kRealignReplicants which
is called to realign replicant icons. Add routing so that if you knock on
Deskbar's front door (Application) it will get routed to the right view, in
this case the repliant tray that knows how to realign replicants.

Send a message with this newly created constant in PowerStatus when
the width changes because you turned the label on or off. This makes
it so that when you show or hide the battery percentage it will not overrun
the clock.

Realign Replicants is a common case.

Fixes the rest of #8641
2017-11-05 21:03:23 -08:00
John Scipione
c3c3360f40 Deskbar and PowerStatus: style updates
80 char limit in BarApp.cpp
2 newlines and remove unnecessary curly braces in StatusView.cpp

Replicant: tiny whitespace style fix and remove trailing tab chars
2017-11-05 19:41:55 -08:00
John Scipione
70ad528943 Deskbar: Position clock & replicants better
This fixes some subtle layout issues. The replicant icon
positions and clock position has been made more consistent
in both vertical mode, and horizontal mode.

There is a fixed amount of space between the last replicant
and the clock before it wraps to next row. This now works
at different font sizes.

Use matching 3px of space between the clock and the dragger
on one side and and between the replicant and the dragger
on the other side.

Reparent ResizeControl from ReplicantTray onto DragRegion and
readjust everything.
2017-11-05 19:41:55 -08:00
John Scipione
9df5205c65 Workspaces: Make sure settings is set only once
... fixing oversight in hrev51512.

Erase the file and write all settings to disk each time.

When Workspaces is running in a window WorkspacesSettings
is destroyed first, then WorkspacesView is destroyed.
WorkspacesSettings saves all settings except for 'switch on
wheel', then WorkspacesView reads the settings in from
disk, tacks the switch on wheel setting on, then writes
the settings back to disk.

If WorkspacesView is a (Deskbar) replicant instead the
WorkspacesSettings steps are skipped. WorkspacesView reads
in the settings from disk, tacks 'switch on wheel' on, erases the
file, then saves all settings back to disk. Use ReplaceBool to
ensure that the 'switch on wheel' settings is added just once.

Create the file if it doesn't exist in either case.

Don't check Unflatten status because will fail on empty file.

SaveSettings on the view before opening Deskbar replicant
so that 'switch on wheel' gets loaded.
2017-11-05 19:24:19 -08:00
Michael Lotz
93596e8037 package_repo: Fix update command when used with relative target.
Renaming of the temporary repo file failed when used with a relative
target path. The path was appended twice in such a case. Also when
used with a specified base directory, the relative temporary repo file
wasn't reachable from the changed working directory.

To fix both cases, create the BEntry pointing at the temporary repo
file before changing the directory and rename it using only the target
leaf name.
2017-11-05 23:04:09 +01:00