55015 Commits

Author SHA1 Message Date
Michael Lotz
8074f0b94b launch_daemon: Replace the remaining putenv() calls by setenv(). hrev49571 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.
hrev49570
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. hrev49569 2015-08-23 09:19:35 +02:00
Julian Harnath
9b417f6486 app_server: rework AlphaMask, use bounds for mask pictures
* Refactor AlphaMask class to separate the mask from its source. This
  allows use to not just a BPicture as source for a pixel alpha mask,
  but also e.g. a BShape in the future (not yet implemented).

* For BPicture-based masks, use the PictureBoundingBoxPlayer to
  determine the size of the resulting mask bitmap. The masks are now
  drawn into bitmaps of this size (instead of the whole view size).

  When alpha masks are stacked, their bounding rectangles intersect
  (i.e. masks further up in the stack can never be larger than masks
  lower in the stack). The bitmap of a mask always contains the state
  of itself blended with all masks in the stack below it.

  This also avoids frequent rerendering of the masks. They are now
  independent of view size. When the view origin (in screen
  coordinates) changes we only have to reattach the mask buffer,
  without having to redraw it.

* The class UniformAlphaMask is used for simple masks with the same
  alpha value in all pixels, it uses no mask bitmap at all.
  Currently, it can only be used on its own and not be stacked
  together with other mask types.
2015-08-23 01:01:47 +02:00
Julian Harnath
bafd2b461a app_server: PictureBoundingBoxPlayer fixups
* TODO: squash commit before merge into master
2015-08-23 01:01:42 +02:00
Julian Harnath
1cd452ea03 app_server: Drawing mode fixups
* TODO: squash commit before merge into master
2015-08-23 01:00:38 +02:00
Julian Harnath
e3d7394869 app_server: fix test-app_server for launch_daemon changes
* Make test-app_server work again in a launch_daemon environment

* test_registrar gets a separate signature and port name again so the
  host system can distinguish it from the system registrar

* AppServer is normally a BServer now, however, there can't be two
  BApplications in one team. A class TestServerLoopAdapter is added,
  which becomes the base class of AppServer instead of BServer when
  compiling for libbe_test. It's an adapter class which looks towards
  AppServer as it if was a BServer, but internally it is derived from
  MessageLooper (like the old AppServer before the transition to
  BServer).

  This way, AppServer can stay a BServer in normal builds and it also
  avoids having to use too many #ifdefs to distinguish the two
  versions.
2015-08-23 01:00:32 +02:00
Julian Harnath
801b5d2119 app_server: add pixel alpha composite solid mode
* Same concept as the previously exisiting drawing mode
  implementations for e.g. pixel alpha overlay mode: when pattern
  is solid, provide a separate mode implementation which does no
  unnecessary pattern pixel lookups. This provides a considerable
  speedup in composite mode when no stipple pattern is used.
2015-08-23 01:00:27 +02:00
Julian Harnath
ed7b139e08 app_server: fix direct assignment in alpha pixel composite
* 'alpha' is 16 bit (alpha * cover) in blend_hline_alpha_pc(), so
  compare with 255 * 255
2015-08-23 01:00:23 +02:00
Julian Harnath
01c7304204 app_server: fix comment header in pixel alpha overlay modes 2015-08-23 01:00:18 +02:00
Julian Harnath
64c6e038eb app_server: bilinear bitmap painting: alpha overlay support
* Add support for pixel alpha overlay mode in the optimized bilinear-
  scaled bitmap drawing code of BitmapPainter.
  For now, only BilinearDefault supports this. DrawBitmapBilinear
  gets the colour type and draw mode as template parameters to
  minimize code duplication and allow simple extension with further
  pixel formats and modes.
  Avoids, for this mode, fallback to the slower generic
  AGG-pipeline-based version.
2015-08-23 01:00:14 +02:00
Julian Harnath
79a483ebbf app_server: add alpha masked mode to DrawBitmapNoScale
* Add another mode to DrawBitmapNoScale for drawing bitmaps using
  B_OP_COPY with alpha masks. It behaves like the definition for
  ClipToPicture from the BeBook: pixels with alpha = 0 are ignored,
  pixels with any alpha > 0 are copied.
  Before, this fell back to the slower generic AGG-pipeline-based
  version.

* Some light refactoring
2015-08-23 01:00:09 +02:00
Julian Harnath
f4f05935db app_server: give Painter direct access to alpha masks
* To use alpha masks in optimized drawing code outside of the AGG
  renderer pipeline, we need to allow access to the alpha mask's
  underlying buffer:

  - AlphaMask gets another method which returns its
    clipped_alpha_mask
  - clipped_alpha_mask gets a get_hspan() method which returns a span
    of alpha values without combining it with anything
  - Painter/PainterAggInterface store a pointer to the
    clipped_alpha_mask (in addition to the AlphaMask's scanline
    container)
2015-08-23 01:00:04 +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).
hrev49568
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.
hrev49567
2015-08-22 17:23:35 +02:00
Adrien Destugues
44884f88fa Add packages for gws and haikuporter. hrev49566 2015-08-22 16:13:53 +02:00
Adrien Destugues
4b26da642b PowerStatus: show when the battery is charging. hrev49565 2015-08-22 15:11:39 +02:00
autonielx
6b6288a6de Update translations from Pootle hrev49564 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.
hrev49563
2015-08-22 00:21:07 -04:00
Michael Lotz
3667f6efdb BApplication: Avoid create_app_meta_mime() for the registrar.
BApplication::_InitData() already avoided the use of BRoster from the
registrar (and launch_daemon) where it isn't available. Since
create_app_meta_mime() indirectly just sends a message to the registrar
using BRoster, it too cannot work when the registrar isn't available.
hrev49562
2015-08-21 23:23:26 +02:00
Michael Lotz
811f0164a0 BRoster: Make sure we aren't the registrar when initializing.
This fixes a regression introduced in 9bfc833, where the old way of
getting the roster port was replaced with its launch_daemon counterpart.

The previous method of finding the roster did always fail when running
from the registrar, as at the time of initialization (initialize_before
of libbe) the registrar looper doesn't exist yet. This commit restores
the previous behaviour by checking if the returned registrar team is the
current team and avoiding initialization in that case.

The regression caused a 5 second boot delay when later BApplication
initialization of the registrar tried to communicate with itself with a
reply timeout of that length.

Fixes #12258 at least partially and might affect #12237.
hrev49561
2015-08-21 23:03:37 +02:00
Michael Lotz
5ca445dfc6 FS module docs: Add documentation for entry_cache_add_missing().
This was missed when introducing the feature in hrev49558. Thanks Jérôme
for the pointer!

Also add a note explaining that update operations on cached entries and
the removal of uncached entries are safe.
hrev49560
2015-08-21 21:08:15 +02:00
Michael Lotz
c4a9344a11 libroot_debug: Support alignments > B_PAGE_SIZE in guarded heap.
These are always allocated using an area. The allocation size is
increased as to guarantee the availability of a suitable address. The
pages between the allocation info and the actual, aligned start address
and the pages past the allocation end are then protected.

This commit also fixes corruption of the allocation info for large
allocations that used areas. The alignment wasn't taken into account
when calculating the amount of space needed. The alignment could then
lead to rounding down the allocation start such that it would overlap
with the allocation info.
hrev49559
2015-08-20 21:59:41 +02:00
Michael Lotz
5d4501aa01 Assorted whitespace cleanup and typo fixes. 2015-08-20 21:54:41 +02:00
Michael Lotz
44b69ccbdb bfs: Use negative caching on directory lookup failures. hrev49558 2015-08-20 21:25:56 +02:00
Michael Lotz
efb0a3a853 EntryCache: Add entry_cache_add_missing() for negative caching.
It provides a way for filesystems to cache a lookup failure and
therefore prevents repeated lookups of missing entries. This is a
common scenario for example in command lookup and compiling, where
each directory in PATH or each include directory is searched for the
given entry.
2015-08-20 21:25:56 +02:00
Michael Lotz
883b3e1d5c DebugAnalyzer: Fix 64 bit build. 2015-08-20 21:25:55 +02:00
Stephan Aßmus
36ab52c74e HaikuDepot: Adapt package contents when package status changes
Based on a patch in ticket #11886 by TwoFx, but with checks for
packageRef.Get() != NULL and better member name for the package status.
hrev49557
2015-08-20 16:25:07 +02:00
Jérôme Duval
36c3cc9732 Update bash packages. hrev49556 2015-08-19 21:31:46 +02:00
Jérôme Duval
1ecd2c8163 Add libasr, freeciv and its dependencies for x86_64.
* Update freetype for x86_64.
hrev49555
2015-08-18 21:13:24 +02:00
Jérôme Duval
92a3fa86db Add ncurses6 packages, update cmake, mpg123, unrar packages. hrev49554 2015-08-17 21:51:21 +02:00
Axel Dörfler
b20d210d5a Mail: minor cleanup. hrev49553 2015-08-17 21:12:42 +02:00
Axel Dörfler
f8300bd979 Tracker: Added a "Skip all" functionality.
* Also, the copy prompt gets a missing "Replace" button (instead of
  only offering "Replace all").
2015-08-17 21:11:51 +02:00
Axel Dörfler
0104e6facb Tracker: Use BEntry::Name(), minor cleanup.
* Use BEntry::Name() over GetName() where appropriate.
* Fixed some weird indentation.
* Simplified some constructs.
2015-08-17 21:09:46 +02:00
Axel Dörfler
103adddb37 BTextView: do not restrict max size in GetHeightForWidth(). 2015-08-17 21:08:16 +02:00
Adrien Destugues
897d8754a6 GrafX2: update to a version that actually works. hrev49552 2015-08-16 14:48:07 +02:00
Humdinger
28b7dd63d3 Updated qbittorrent and quicklaunch. hrev49551 2015-08-16 13:41:28 +02:00
Adrien Destugues
ebc6718fb2 Add package for GrafX2. hrev49550 2015-08-16 13:04:09 +02:00
Humdinger
b3fe461495 Updated bepodder, added new qbittorrent and dependancy built by Diver hrev49549 2015-08-16 08:50:22 +02:00