Commit Graph

54615 Commits

Author SHA1 Message Date
Michael Lotz
5b9f6b5485 BRoster: Add launchSuspended option to _LaunchApp().
It allows to launch the app, but keep its main thread suspended instead
of automatically resuming it.

Also add appThread argument which allows to retrieve the main thread of
the launched team.
2015-08-28 22:52:50 +02:00
Axel Dörfler
df5aeb6dda AHCI: fixed constant mixup, minor cleanup.
* TRANSITION_... was incorrectly changed from the original patch.
* Divided it into two constants, and also prefixed the new constants with
  the register fields they are valid for.
* Fixed incorrect usage of |= and removed the corresponding TODO comments.
* Moved some reoccurring code into their own methods.
* Added check for the ST bit in the command register for the interrupt
  hard reset, too.
* This closes ticket #12295, thanks Anarchos!
2015-08-28 19:26:14 +02:00
Sylvian Kerjean
5584c22fdd AHCI: Fix boot failures due to "Port Connect Change" IRQ storm.
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2015-08-28 19:26:14 +02:00
Dario Casalinuovo
8a28f84965 Media: Fix restart button alignment 2015-08-28 18:27:16 +02:00
Dario Casalinuovo
5d8765c0af media_server: No need to call Roster() every time 2015-08-28 18:27:16 +02:00
Dario Casalinuovo
1c3d7e0c68 MixerControl: Add more safeness for Roster() errors 2015-08-28 18:27:16 +02:00
Dario Casalinuovo
d15321ff90 BMediaRoster::Roster Use BAutolock 2015-08-28 18:27:16 +02:00
Dario Casalinuovo
be7d9d3f5d BMediaEventLooper: With B_WOULD_BLOCK we may still handle an event 2015-08-27 19:45:11 +02:00
Dario Casalinuovo
90cdf5e42e BMediaNode::WaitForMessage: protect it over negative timeouts 2015-08-27 19:45:10 +02:00
Stefano Ceccherini
d6039d2b23 Midi: Remove some duplicated code
Introduced new private read/write_midi_settings() and used them
in MidiSettingsView and SoftSynth.
2015-08-27 11:51:57 +02:00
Augustin Cavalier
281409fdc0 Revert accidental addition to Jamfile. 2015-08-26 15:54:15 -04:00
Augustin Cavalier
41f43d568f Screen: Rework AlertView to just use BAlert.
Fixes #12330.
2015-08-26 14:42:14 -04:00
Augustin Cavalier
1ea54e567e docs/user: BAlert: Fix incorrect ::TextView() docs.
TextView() returns *the* BTextView the BAlert is using, not a new
TextView with the contents of the BAlert (which is what this seemed to
imply).
2015-08-26 14:42:11 -04:00
Dario Casalinuovo
da18151469 Revert "MediaNode: Wait for 0 time if the absolute timeout is in the past"
This reverts commit ae9cbf9c4e.

* Thanks to Pawel Dziepak for reporting!
2015-08-26 22:54:01 +02:00
Michael Lotz
14156a33ac launch_daemon: Delegate launch data replies to Job.
Previously the LaunchDaemon would send out its own team id when a given
job was not yet launched, leading to invalid BMessengers once the port
owner changed to the actually launched team.

The launch of the target team and the launch data replies were also not
synchronized, which could lead to the launched team getting a reply
pointing to the launch_daemon when requesting data for itself. This is
the case for the BRoster init of the registrar. The fix in hrev49561
therefore didn't always work, because the registrar would sometimes get
the launch_daemon team id instead of the id of itself. It would later
try talking to the launch_daemon, which obviously never replied, leading
to #12237.

The LaunchDaemon now delegates the launch data reply to the Job instead.
The Job either replies directly, in case it has already been launched,
or queues the reply for when the launch completes. This causes launch
data requesters to block until the launch attempt is completed, but
won't block the LaunchDaemon message loop.

This commit introduces the seperate fLaunchStatus to properly handle the
ambiguity of fTeam being < 0, which is the case for both, when no launch
was attempted and when the launch failed. This new field now determines
what IsLaunched() returns and how launch data replies are handled.

The new launch status is additionally protected by the launch status
lock, which will later probably be made broader in scope to protect
against race conditions once service monitoring is implemented.
2015-08-26 22:24:00 +02:00
Michael Lotz
ee5575d9b3 BRoster: Apply no-registrar mode in a few more cases.
Avoids some more attempts at communicating with the registrar if the
no-registrar flag has been set.
2015-08-26 22:23:59 +02:00
Dario Casalinuovo
ae9cbf9c4e MediaNode: Wait for 0 time if the absolute timeout is in the past 2015-08-26 17:22:13 +02:00
Dario Casalinuovo
dfe056fd6a BMediaEventLooper: Continue code improvements. 2015-08-26 17:22:10 +02:00
Dario Casalinuovo
d9971ae7aa Media: Show alert while media services restart 2015-08-26 16:39:42 +02:00
Dario Casalinuovo
9a36e655d7 radeon_hd: Add missing id for Radeon HD 8490 2015-08-25 12:43:53 +02:00
Stefano Ceccherini
c34e5f4dd5 B_BIG_SYNTH_FILE and B_LITTLE_SYNTH_FILE are deprecated.
Small style change in midi headers.
2015-08-24 17:18:26 +02:00
Stefano Ceccherini
3ffaf5c263 MidiSettingsView: renamed box label
Renamed box label from "SoundFont" to "Available SoundFonts", hopefully
improves the user experience by making it clearer that this is a list
of the available soundfonts.
2015-08-24 10:23:28 +02:00
Stefano Ceccherini
2f41383c3b BBitmap: Archive the data also if "deep" is not set
Fixes #12326
2015-08-24 10:21:31 +02:00
Stefano Ceccherini
65b4405ecc BSoftSynth: Fixed auto selection of soundfont.
When no midi settings file was available, BSoftSynth should use the well known
TimGM6mb.sf2 soundfont. This wasn't working, since the code looked in the wrong
path (we have to append "synth" to the path returned by find_directory).
In case this SF is not present, now we try harder not to fail, and look for any
soundfont available in the system and user directories.
Fixes ticket #12325 although the selected soundfont is not written to the
user settings file.
2015-08-24 10:04:17 +02:00
Stefano Ceccherini
a6fb27a3f6 Improved comment. Added TODO 2015-08-24 10:03:54 +02:00
Stefano Ceccherini
7ed2a44376 Fix naming 2015-08-24 09:34:02 +02:00
Jessica Hamilton
579efee783 package server: fix off-by-one error in RemoveLastComponent() 2015-08-24 15:53:56 +12:00
Michael Lotz
f11d686c96 launch_daemon: Remove extra quoting around env variables.
The extra quotes aren't needed and cause problems when not parsed
through a shell. For example LD_PRELOAD which is handled by the
runtime_loader directly failed to work as there was no way to remove
the extra single quotes.

Note that quotes and single quotes can still be added to the variables
through respective quoting in the driver settings syntax.
2015-08-23 15:17:39 +02:00
Michael Lotz
8b9bb054f4 libroot_debug: Replace two more uses of printf in guarded heap.
Use the internal print_stdout() instead as done when printing the
stack traces.
2015-08-23 13:19:12 +02:00
Michael Lotz
5dbea46970 libroot_debug: Track freeing thread in guarded heap separatley.
Previously the thread member was overwritten with the freeing thread
when a page was freed, leading to confusion when hitting unallocated
pages due to the debugger message still stating "allocated by thread".

Track the freeing thread separately as it might be interesting to know
both, which thread initially allocated and which thread eventually freed
an allocation.
2015-08-23 13:10:12 +02:00
Michael Lotz
8074f0b94b launch_daemon: Replace the remaining putenv() calls by setenv(). 2015-08-23 12:36:12 +02:00
Michael Lotz
71cc01b2b1 registrar: Use the safer strlcpy instead of strcpy. 2015-08-23 12:35:25 +02:00
Michael Lotz
462bfeede0 registrar: Fix race condition on MimeUpdateThread termination.
When the MimeUpdateThread is done, it marks itself as finished and
notifies the thread manager to clean up finished threads. Since multiple
such threads might finish at the same time and trigger the cleanup
notification, other threads that already marked themselves finished but
haven't actually exited yet might already be deleted and removed. This
would then lead to a use-after-free when they subsequently tried to send
their own cleanup message.

To solve the race condition, the thread manager will now wait for the
thread to actually exit before cleaning it up.

The introduction of the launch_daemon has made this race condition more
likely due to more applications starting in parallel, each triggering a
CreateAppMetaMimeThread which is a subclass of MimeUpdateThread. This
commit might therefore fix #12237.
2015-08-23 12:30:35 +02:00
Michael Lotz
dfb3208fa3 registrar: Whitespace and style cleanup only.
Generally this code still looks horrible (both from a style and from a
complexity point of view) and should eventually be reworked.
2015-08-23 12:30:35 +02:00
Adrien Destugues
1deb22eb4b PowerStatus: style fixes. 2015-08-23 09:19:35 +02:00
John Scipione
25af167e8f Spinner: Tweak the spinner button colors
* Tint the button text 1.777f which yields #303030 for the text color
  which produces a nice dark grey but-not-quite-black color. In testing
  black text is too dark and B_DARKEN_4_TINT (1.555f) yields #606060
  which is too light. #303030 is a compromise between the two.
* The button text gets darkened to black on mouse down and the button
  background gets darkened to B_DARKEN_1_TINT on hover as before, but
  the frame color is no longer affected --- the button frame tinted by
  B_DARKEN_1_TINT always (yielding standard Haiku button frame color).
2015-08-22 15:15:08 -07:00
John Scipione
a0ba79fbff Split BSpinner into BAbstractSpinner and...
2 concrete classes which are currently implemented:
* BSpinner (works on int32s)
* BDecimalSpinner (works on doubles)

In addition BAbstractSpinner now inherits from BControl instead of
BView/BInvoker. This allowed for code simplification at the cost of needing to
cast for the decimal version because SetValue(int32 value) comes from BControl.

Also, add a spinner_button_style enum with 3 options:
* SPINNER_BUTTON_HORIZONTAL_ARROWS
* SPINNER_BUTTON_VERTICAL_ARROWS
* SPINNER_BUTTON_PLUS_MINUS

which sets the spinner arrows to either use horizontal arrows (left/right)
vertical arrows, (up/down), or +/- symbols (the default).

If the spinner button is using horizontal arrows you can decrement and increment
the spinner value by pushing control+left/right, otherwise you can increment and
decrement by pushing up or down. The reason for needing control is so that you
can move the cursor in the textbox otherwise.

Switch the 3 apps that are currently using BSpinners to use the integer variety
in Deskbar preferences, WebPostive preferences, and Screen preferences.
2015-08-22 15:15:08 -07:00
John Scipione
d122938346 Spinner: Generalize actions into methods
Add an Increment(), Decrement(), and SetValueFromText() method.

These can be overridden by derived classes.
2015-08-22 15:15:07 -07:00
John Scipione
a9385e8e2e Spinner: Move ValueChanged up
... along with the other hook methods
2015-08-22 15:15:06 -07:00
John Scipione
e4df9afe58 Spinner: Use plus/minus instead of arrows
Eliminate the border between the buttons
2015-08-22 15:15:06 -07:00
John Scipione
963d585e35 Spinner: Improve look and feel
This arranges the buttons to the right of the text box horizontally and also
updates the background color and arrow cool to give feed back when moused over
the button, disabled, and pressed. Used be_control_look arrows to match arrows
used elsewhere (such as scrollbars).

The background darkens on mouse over if enabled, the arrow is drawn darker when
the mouse is down, and lighter if disabled.
2015-08-22 15:15:05 -07:00
John Scipione
49a4e7f685 WebPositive: Use BSpinner to set days of history setting
Also rename fDaysInHistoryMenuControl to just fDaysInHistory
2015-08-22 15:15:04 -07:00
John Scipione
4f11457556 Deskbar: Add spinners to preferences 2015-08-22 15:15:04 -07:00
John Scipione
a3fa81bd03 Update Screen prefs to use BSpinner class 2015-08-22 15:15:03 -07:00
John Scipione
adba4ce988 Add BSpinner class based on GCI2013 work 2015-08-22 15:15:03 -07:00
Michael Lotz
f6b2da0a71 launch_daemon: Add env vars from sourced files to correct list.
The environment variables were always added to the static environment
list instead of the one supplied as argument. This worked for targets,
as there the scripts are evaluated before the static environment is
used. For services and jobs this isn't the case, causing sourced
environment variables to be missing.
2015-08-22 17:23:35 +02:00
Adrien Destugues
44884f88fa Add packages for gws and haikuporter. 2015-08-22 16:13:53 +02:00
Adrien Destugues
4b26da642b PowerStatus: show when the battery is charging. 2015-08-22 15:11:39 +02:00
autonielx
6b6288a6de Update translations from Pootle 2015-08-22 06:42:07 +02:00
Rene Gollent
2d9d01e2e8 Debugger: Refactor non-interactive report handling.
- Add dedicated ReportDebugger application class for the case where we're
  asked to do nothing more than save a report. Also add a corresponding
  UserInterface subclass whose sole purpose is to take those necessary
  actions and then exit.
- When the debugger is invoked via the --save-report option, we now start
  via the aforementioned report/interface rather than piggybacking on the
  CLI.
- Clean up CommandLineUserInterface/CliContext to remove handling for the
  report saving option.

Should hopefully resolve #12155.
2015-08-22 00:21:07 -04:00