Commit Graph

8927 Commits

Author SHA1 Message Date
Akshay Agarwal
bb3ad41ada Implement functions to get localized long/short dayofweek name and short month name in BDateFormat.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-30 20:28:31 +02:00
Kacper Kasper
cf3524e07f Fix WebPositive drawing glitches.
* Introduced with recent BTabView changes.
* Adjust drawing tabs a bit.
* Remove trailing whitespace.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-26 12:23:31 +02:00
Akshay Agarwal
1e4ab34cd7 Implement a formatter for relative dates.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

It can give results such as "in 2 hours", "2 days ago", etc.
This is different from BDurationFormat which will just say "1 hour, 2
minute and 36 seconds"
2017-08-25 21:14:27 +02:00
Adrien Destugues
a74f88cf8f Build fix. 2017-08-21 18:52:28 +02:00
Adrien Destugues
faef86335b BTabView: fix binary compatibility.
Re-introduce missing symbol so that old apps can still be used.
2017-08-21 18:21:21 +02:00
Adrien Destugues
0d1bb791fc BControlLook: remove broken intersection check
When using BAffineTransform, the update rect is not in the same
coordinate space as the drawing rectangle. Hence, testing them for
intersection does not work, and leads to not drawing buttons which are
in fact visible.

Moreover, the code in BControlLook does not perform only drawing, it is
also expected to update the drawing rect, so other functions may reuse
it later (for example, drawing a button border also computes the
rectangle for the button background). Because of this, it is not
possible to skip the drawing completely, or we could break the layout of
the client.

Fixes #13664
2017-08-20 15:55:56 +02:00
Adrien Destugues
d47dec9356 Make gcc2 happy. 2017-08-20 09:48:29 +02:00
Kacper Kasper
cb13fce878 BTabView: implement drawing tabs on all sides.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-20 09:04:05 +02:00
Kacper Kasper
173e8195a4 BTabView: remove dead code.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-20 09:04:05 +02:00
Kacper Kasper
a34769a0cc BTabView: cleanup draw function.
* Slightly changes how tabs look.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-20 09:03:52 +02:00
Adrien Destugues
b8d9fcbeb3 Revert "ControlLook: remove some bogus clipping"
This reverts commit b277177477.
2017-08-16 17:48:58 +02:00
Adrien Destugues
b277177477 ControlLook: remove some bogus clipping
ConstrainClippingRegion was used in BControlLook to limit drawing to
inside the update rect. There are two problems with that:
- It would ignore any other clipping set by the application, as calls to
ConstrainClippingRegion are not cumulative,
- ConstrainClippingRegion ignores transforms on the view, so on a
transformed view, we would not draw anything in most cases.

If constrained clipping is needed here, it should be achieved using
ClipToPicture instead.
2017-08-16 17:44:45 +02:00
Wiktor
abb297f5db InterfaceKit: fixed BSpinner's label rendering.
A '&' (reference) was missing on a specific line, causing
font information to never be updated. Also removed extra padding
dependent on a constant variable - if it is used, the label will
be render too far down.
Fixes #12981.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-10 20:23:15 +02:00
Jérôme Duval
0b18b79ce4 libpackage Jamfile: DoCatalogs rule needs to find sources.
SubInclude should stay at the end.
2017-08-02 18:29:03 +02:00
Murai Takashi
8119ed92ef libpackage Jamfile: Add missing ':'
Signed-off-by: Humdinger <humdingerb@gmail.com>
2017-08-02 14:31:19 +02:00
Andrew Lindesay
a1c3daa638 HaikuDepot : Streaming Icon Meta-Data Parser
More background work for later performance improvements.
This change generalizes the parsing of meta-data from
JSON streams as similarly structured meta-data is
anticipated to be carried in other payloads.  Unit tests
have also been implemented to provide coverage on this
new functionality.
2017-08-01 23:19:27 +02:00
Humdinger
99e5e3fd08 Package daemon notifications
* Sentence casing
* Localize notification texts in the package kit
* Have "Package daemon" as group name and "Warning" as title
* Use ::BPrivate in Bitmap.h to solve an ambiguity (as pointed out
  by PulkoMandy). Though not needed for my changes any more, since
  a the icon of the notifying app is now shown by default.

Fixes #13590.
2017-07-31 19:09:38 +02:00
Jérôme Duval
d9823ef5a0 PrintJob: make struct print_file_header packed.
* also struct _page_header_: on x86_64, these would align to 8 bytes, which the code
doesn't handle well.
* remove beos leftovers.
2017-07-31 17:11:53 +02:00
Augustin Cavalier
a1ceb00059 Remove even more Locale Kit cruft.
Not included in the build and not used.
2017-07-30 14:46:41 -04:00
Adrien Destugues
01c1bb6223 Remove more Locale Kit cruft.
BNumberFormat is the way to go for all of this. This code was not even
compiled in.
2017-07-30 19:25:16 +02:00
Adrien Destugues
f40841ac86 BNetworkRequest: fix _GetLine on empty lines.
On an empty line terminated by \n, we would access the temporary buffer
(stack allocated) with an index of (uint32)-1. On 32bit machine this
would just read the byte before the array on the stack, but on 64bit it
would crash.

Check that the length is at least 1 before trying to access a character
in the array.

Fixes #13625.

Thanks to accessays for proofreading the code:
2017-07-28 21:59:19 +02:00
Adrien Destugues
615ef07db3 libnetapi: missing NULL check. 2017-07-28 21:08:54 +02:00
Jérôme Duval
dbad909b4e BMediaFile: fix MediaExtractor crash.
* stop the extractor processing before deleting the source.
* crash happened in MediaPlayer FilePlaylistItem::_CalculateDuration().
* was a regression introduced in hrev50671.
* fixes #13156.
2017-07-24 11:59:05 +02:00
Jérôme Duval
13dbf47109 Revert "BView: use off_t instead of long."
This reverts commit ab3a87ed6e.
2017-07-24 08:48:28 +02:00
Adrien Destugues
037ea84ba5 BNumberFormat: add Parse() and GetSymbol(). 2017-07-23 11:40:25 +02:00
Adrien Destugues
6cbcfc1911 BNumberFormat: cache ICU formatters
For performance reasons, it is a good idea to keep the formatters
instanciated, instead of re-creating them each time we need to format a
number.
2017-07-23 10:24:02 +02:00
Adrien Destugues
0e4ad75e47 Remove more unneeded files from the Locale Kit
All of this is replaced by the single BNumberFormat class.
2017-07-23 09:15:42 +02:00
Adrien Destugues
0597752447 Remove full date format from Tracker date columns
It is too similar to the long format and does not add much value.
And it creates some problems with using a locale format with another's
string.

Fixes #11343.
2017-07-22 19:23:42 +02:00
Adrien Destugues
1416521f10 Notifications: default to application icon.
It is possible to SetIcon(NULL) to remove it.
But in msot cases we want the application icon to be the default.

as discussed in #13590.
2017-07-22 16:11:25 +02:00
Adrien Destugues
1d6af34b9a LocaleKit: remove obsolete files.
Formatting floats is handled by BNumberFormat already.
2017-07-22 12:59:12 +02:00
Jérôme Duval
ab3a87ed6e BView: use off_t instead of long. 2017-07-21 18:57:57 +02:00
Kacper Kasper
2aaee07095 Fix window behavior if default button is present.
* Almost all Enter keystrokes were hijacked without the ability to
  reconfigure.
* Let apps use these shortcuts.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-07-20 09:32:20 +02:00
Akshay Agarwal
b32b6a8633 Fix highlighting current system date in BCalendarView.
Changing the year in Calendar View does not remove the highlighting from
previous highlighted day.

Changing the system date to a date in a different month(different from
the month currently set in calendar view) does not remove the highlighting
from currently highlighted day.

The disabled day number text belonging to the next month (month after
the one currently selected) gets wrongly highlighted while attempting
to highlight the day number text belonging to the current month.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

ticket : #13605
2017-07-16 08:12:50 +02:00
Akshay Agarwal
8013f2e07d Highlight current system date in BCalendarView.
* Issue: In BCalendarView presently, there is no notion of a current date
and the current date is not highlighted. So in the deskbar tray calendar
which uses BCalendarView, we cannot know the current date once we change
the selected day.
* Fix: Make BCalendarView accept pulse messages, check for system date
with every pulse message and update the current date accordingly.
Highlight the current date by rendering its day number text in a
different color.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

ticket : #13592
2017-07-14 09:44:26 +02:00
Murai Takashi
3ceec1db72 BufferConsumer.cpp: Fix ordered comparison between pointer and zero.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

ticket : #13599
2017-07-14 09:40:30 +02:00
Augustin Cavalier
9175f4f04a netresolv: Merge patches from 2015 to current HEAD.
Commits merged from the semi-official Git mirror of NetBSD
trunk (https://github.com/IIJ-NetBSD/netbsd-src/).

Commit authors/messages in chronological order follow:
---------------------------------------
From: maya <maya@netbsd.org>
Date: Tue, 9 May 2017 02:56:44 +0000
Subject: Avoid shift of negative signed integer. this is UB. NFC.
2017-07-03 12:17:47 -04:00
Augustin Cavalier
954b54ba8d kits/mail: Remove OpenSSL logic from Jamfile.
Nothing in the Mail Kit proper uses OpenSSL directly anymore
(confirmed with a grep for USE_SSL as well as "openssl"),
so we don't need this logic anymore.
2017-07-01 04:59:17 -04:00
Humdinger
96bdefaf43 Tracker: Use layout management for "Select..." window
Also remove the BMessageFilter EscapeFilter and use B_CLOSE_ON_ESCAPE
in the window constructor instead.

I moved fExpressionTextControl->MakeFocus(true); down to when the
window is Lock()ed. Otherwise the text control refuses to be focused...
2017-06-12 19:31:06 +02:00
Augustin Cavalier
ba25f57aad Tracker: More B_PRId32 -> B_PRIdTIME. 2017-06-10 21:17:38 -04:00
Augustin Cavalier
9f6dbb5ff0 Fix the build following the 64-bit time_t switch. 2017-06-06 17:38:17 -04:00
Mark Hellegers
5721d1791e BHttpTime: Handle sunday properly
Cookies with expiration on a sunday would be misformatted, which could
lead to websites not recognizing them.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes 13543
2017-06-04 07:47:53 +02:00
Adrien Destugues
756c36e7ee Rotate permission labels in Tracker InfoWindow
This allows to fit a lot more text in the same horizontal space, so we
can fit the label in various locales, without spreading the checkboxes
further apart.

Fixes #6987
2017-05-29 15:27:49 +02:00
Adrien Destugues
fd9afd8ac6 Missing localizations in tracker info window.
Patches from Karvjorm in #6987 (but not directly related to that ticket)
2017-05-29 14:32:36 +02:00
Adrien Destugues
3ec7701779 NaturalCompare: implement using locale kit
The non-locale aware version is kept in src/build/libshared for use on
the host system and in packagefs (kernel add-on). In both cases, ICU is
not available.

Fixes #8192
2017-05-29 14:04:44 +02:00
Adrien Destugues
a19a18f553 Rework BCollator API
- Strength is now set once, instead of at each comparison, to improve
  performance and fix potential locking issues
- Add a way to enable "numeric" collation (aka "natural order")
2017-05-29 08:52:43 +02:00
Akshay Agarwal
ec6735b596 Handle UDAT_DAY_OF_WEEK_FIELD in BDateFormat::GetFields().
Handle the UDAT_DAY_OF_WEEK_FIELD case and assign the corresponding
BDateElement object i.e B_DATE_ELEMENT_WEEKDAY to the fields array
at the appropriate offset.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13529
2017-05-26 08:22:24 +02:00
Rene Gollent
f9065b53ad libdebugger: Minor fixes to NetworkTargetHostInterface classes.
NetworkTargetHostInterface:
- Fix missing initializer. This would lead to a crash in the destructor.

NetworkTargetHostInterfaceInfo:
- Implement IsConfigured() to validate passed in settings.
2017-05-21 19:54:48 -04:00
Rene Gollent
6889394848 libdebugger: Fix missing init in TargetHostInterfaceRoster.
- When adding the TargetHostInterfaceInfos to the roster, Init() was not
  called on the individual instances, leading to them potentially being
  incomplete.
2017-05-21 19:54:48 -04:00
Sean Healy
e683838e86 BTextView: Fix archiving after setting and unsetting disallowed characters.
If you disallow and then re-allow characters, so that the number of disallowed
chars returns to zero, BTextView::Archive will fail with "Invalid Argument".

Fixes #13520.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-05-19 21:05:34 -04:00
Owen
75fc19076c Tracker: Fix blue border for focus in file panel.
This fixes the bugs pertaining to drawing and erasing the blue border
when a view gains and loses the focus, respectively. It also fixes the
bug that the file list (PoseView) always has a blue border when the
panel window is activated, even if the pose view doesn't have the focus.

Fixes #13496.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-05-19 20:39:17 -04:00
Owen
1c0e7a58ea Tracker: Fix blue border of CountView in file panel.
This removes the blue border of CountView in BFilePanel.

Fixes: #12923

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-05-19 20:36:24 -04:00
Akshay Agarwal
f5c544b59a Fix style formatting issue in BTimeUnitFormat, update BDurationFormat accordingly.
* Issue: BTimeUnitFormat doesn't incorporate style formatting while
formatting a time unit. Format() does take style as an argument but the
style is not used anywhere. So currently the abbreviated style doesn't
work and by default the time unit is formatted to the full style.

* Fix: Move the style flag from BTimeUnitFormat::Format() to the
BTimeUnitFormat constructors and call the relevant icu::TimeUnitFormat
constructor. Map the Haiku defined style unit to the corresponding ICU
unit. Move the style flag from BDurationFormat::Format() to the
BDurationFormat constructors to map the changes in BTimeUnitFormat.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13508
2017-05-17 19:53:46 +02:00
Andrew Lindesay
55f5f25940 JSON Parser : code style corrections 2017-05-16 00:21:15 +12:00
Andrew Lindesay
1f6b57a5d2 Implementation of JSON Streaming Parser
This change will introduce a streaming parser capability to Haiku.  The
existing functionality of writing the JSON data to a BMessage in-memory
model is retained.  The new parser implements a SAX-style listener based
interface where the listener accepts parse events.  Unit tests have been
supplied for the JSON parser as well.
2017-05-13 18:50:39 +12:00
Owen
db068cd68c Tracker: Always enable the Open button for B_DIRECTORY_NODE.
Always enable the default button in Open File Panel if the node flavors
include B_DIRECTORY_NODE.

Fixes #13463.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-05-08 22:17:53 +02:00
dsizzle
9b6b158b88 Implementation of BFont::Blocks
BFont::Blocks is now implemented in ServerFont, via a call through the
app_server.  It uses fontconfig to iterate through a charset of a font
and stores the defined blocks in a bitmap.

A new API was added, BFont::IncludesBlock, that will allow for arbitrary
testing of a given Unicode block. Since nothing is cached, searching
through an entire charset for a series of Unicode blocks can be quite
slow. In a given block there may be only 1 or 2 characters actually
defined so every character within a block needs to be checked until one
is found, which in a degenerate case will mean the entire block is
checked.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-05-08 22:17:53 +02:00
Dario Casalinuovo
c0ef5b2b7c MediaFile: Little refactor to use the MediaStreamer class
* This clarify the ownership of the source when using the experimental
API.
* The extractor/writer are simplified and don't have to care about
adapters.
* MediaStreamer is able to provide a generic BAdapterIO that is
suitable also for different uses than the codecs API itself.
2017-05-04 14:08:07 +02:00
Dario Casalinuovo
9198105dbb MediaWriter/MediaExtractor: Remove BUrl constructors 2017-05-04 14:08:07 +02:00
Dario Casalinuovo
dfecb37aee Introduce new experimental class MediaStreamer 2017-05-04 14:08:07 +02:00
François Revol
e62e979e60 Allow dumping SSL session keys on TRACE_SESSION_KEY
This dumps SSL session keys to a log file specified by the
SSLKEYLOGFILE environment variable.

This permits decrypting SSL trafic in wireshark with a tcpdump
capture for example.
cf.
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format
https://security.stackexchange.com/questions/35639/decrypting-tls-in-wireshark-when-using-dhe-rsa-ciphersuites/42350#42350
https://wiki.wireshark.org/SSL#Using_the_.28Pre.29-Master-Secret
https://jimshaver.net/2015/02/11/decrypting-tls-browser-traffic-with-wireshark-the-easy-way/

Looks like we miss the required function from SSL...
SSL_SESSION_print_keylog is only in 1.1.0.
Also added dumping of client_random as it's required by wireshark.
2017-05-04 00:56:15 +02:00
Brian Hill
84c62f1d46 Fix drawing of Tracker volume icon freespace bar
For icon sizes less than B_LARGE_ICON (32) the icon size was
incorrectly just set to B_MINI_ICON (16) causing an error in where
horizontally the free space bar was drawn for icon sizes between 16
and 32. This has never really been an issue because the predefined
options in Tracker do not allow selecting an icon size between 16 and
32, but this fix will prevent drawing issues in the future if that
ever does become an option.
2017-05-02 19:37:09 -04:00
Owen
2d8adbdd85 Tracker: Fix Shift+click multi-selection not being disabled.
Using BFilePanel with multi-selection turned off does not prevent
multi-selection by SHIFT-click. Traced the bug to
BPoseView::AddRemoveSelectionRange(), and the safest fix is to not
touching the boolean extendSelection but to just add the test for
fMultipleSelection to the if block that handles B_SHIFT_KEY.

Fixes #13462.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-04-29 15:21:38 -04:00
Augustin Cavalier
a8ae893bc3 Tracker: Fix B_UNDO/B_REDO forwarding to a focused BTextView. 2017-04-29 15:09:05 -04:00
Augustin Cavalier
56f9e8b759 Tracker: If a BTextView is focused, do not force-forward clipboard events to it.
In its original state this code just forwarded all clipboard messages to the
focused view, which sometimes was a BTextView or the like which knows nothing
about Tracker's custom clipboard events, and thus would wind up in an infinite
loop.

Now, the messages are left to be handled by the focused view if a BTextView
is selected (e.g. in a file panel, or in Tracker's navigator), but otherwise
forwarded directly to the BPoseView.

Fixes #12721.
2017-04-29 15:00:05 -04:00
Owen
41b0595487 Tracker: Fixed shift extension after keyboard selection.
fixes the bug that caused multi-selection by SHIFT-cliking to fail if an
item in the file panel was selected by a key (ticket #13460).

If the user tries to select a single item by pressing a key (Left/Right,
Up/Down, etc.), the BPoseView::KeyDown() function will call the
BPoseView::SelectPose() function, which must set fSelectionPivotPose to
the selected item (or pose) because this item might be the starting (or
pivot) pose of the next multi-selection by SHIFT-click.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-04-29 18:43:55 +02:00
Dario Casalinuovo
a33c8f4c2a MediaClient: Some more consistency in args order 2017-04-28 02:13:51 +02:00
Augustin Cavalier
5d614ec377 tracker: We now target only Haiku since the layout merge, so use B_REDO. 2017-04-25 11:19:32 -04:00
Humdinger
54a37ee40f Tweak when to use black/white for icon labels on Desktop
I've felt for a long time that the Desktop's background colour had to
be much too dark for the icon labels to switch from black to white.
I came to the new values by trial and hope nobody hates those now...
2017-04-22 17:01:40 +02:00
A-star-ayush
315633e13e getaddrinfo now accepts shorthand ipv4 notation
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

As required by POSIX:
"If the specified address family is AF_INET or AF_UNSPEC, address
strings using Internet standard dot notation as specified in inet_addr
are valid." (which allows IP in a.b.c.d, a.b.c, a.b, and a forms, and
also accepts the numbers in hex and octal).

Fixes #3884.
2017-04-22 08:04:35 +02:00
Dario Casalinuovo
0cc5ecb8ca MediaClient: IDs should be signed integers
* It's very important to use a negative value to identify
non valid or uninitialized connections. Additionally, it's preferred
to don't interfere with media_kit types as long as the framework use
it in the backend.
2017-04-14 17:28:35 +02:00
Adrien Destugues
34ac7f7ac3 BListView: manage horizontal scrollbar
BListView automatically sets the vertical scrollbar range already. Do
the same for the horizontal scrollbar.

Also fix BOutlineListView to compute the preferred size taking into
account the items outline levels (it needs a little more space).

This fixes the horizontal scrollbars in Locale preferences, second part
of #6747.
2017-04-09 12:03:33 +02:00
Axel Dörfler
fe9ddedc07 BBox: Fixed broken fBounds position update.
* FrameMoved() is only for frame movements; only scrolling affects the
  bounds position.
* Thanks stippi!
2017-03-31 18:21:44 +02:00
Axel Dörfler
ff4dee1caf BView/BBox: Fixed FrameResized() handling.
* BView incorrectly passed the current width and height to
  FrameResized(), not the one from the message. Since there is such
  a call for each size change, a Draw() might have been called for
  each of those in return.
* This should also fix such problems in BMenuBar, as it used the size
  from FrameResized() as it should have.
* BBox now correctly takes the update events into account, and no
  longer ignores the size passed to FrameResized().
* This fixes bug #3037.
2017-03-24 16:33:12 +01:00
Brian Hill
ab8f11bff8 SoftwareUpdater updates
Bug fix- show correct version on package uninstall list item tooltip
Correct if else formatting
Use the BPackageManager FullSync() function instead of Update
Change warning strings in BPackageManager to sentence casing
Show list item tooltip on a mouse down (helps with touch devices)
2017-03-20 06:51:06 -04:00
Dario Casalinuovo
98f2303da5 PluginManager: Fix memory leak.
* Fixes #13126.
2017-03-10 02:00:36 +01:00
Dario Casalinuovo
5854fc4a7a MediaClient: Add remaining wiring for input/output functionality
* BufferReceived is renamed HandleBuffer.
* Update doc.
* Implement buffer production private methods.
2017-03-10 01:02:15 +01:00
Murai Takashi
adad0931a6 libtracker: add B_TRANSLATE to List view menu.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-03-08 12:37:25 -05:00
John Scipione
cc04d41c87 BString: Use safestr() to prevent strlen(NULL)
on StartsWith(), IStartsWith(), EndsWith(), and IEndsWith()
2017-02-21 19:20:02 -08:00
John Scipione
388ac82baa BString: Add IStartsWith() and IEndsWith() methods
Case-insensitive version of StartsWith() and EndsWith()
2017-02-21 18:03:03 -08:00
Augustin Cavalier
7abafe9f3f Revert "Revert "Switch from DejaVu to Noto font""
This reverts commit 2423ba8470.
2017-02-19 12:09:33 -05:00
Humdinger
d54cb434e0 Layout fixes to Tracker's Get Info window
This corrects hrev50847. Turns out we need 8 lines for normal
files and symlinks, not 7. Fixes #13308.

The "Opens with:" label used the decreased font size set in
src/kits/tracker/InfoWindow.cpp:894. Increase font size by 2 again
for the label.
2017-02-19 09:06:49 +01:00
Augustin Cavalier
2423ba8470 Revert "Switch from DejaVu to Noto font"
This reverts commit 945566ff43.

As discussed on the mailing lists and with Humdinger off-list:
 * The general design concensus tends slightly towards DejaVu, as metrics
   of DejaVu look much better (DejaVu 12 and Noto 13 are roughly the same size,
   but Noto has much wider margins with that)
 * While Noto does have a wider set of fonts with support for lots of
   different languages, DejaVu actually has built-in support for more
   Unicode languages (the default Noto has, as far as I can tell, only
   Latin/Greek/Cyrillic [2416 glyphs], while DejaVu also has Armenian, Georgian,
   and a few other scripts too [5119 glyphs].)
 * The worse rendering of DejaVu appears to have been somewhat rectified by
   disabling the average-based subpixel filter in app_server.
2017-02-18 14:36:36 -05:00
Adrien Destugues
83be289d7c netresolv: Remove rcsid
fixes gcc6 complaining about unused global variable.
2017-02-11 20:50:13 +01:00
Humdinger
cf0ba058ec Add localization to package daemon and solver
Thanks to Adrien and Rene for reviewing and guidance.
Fixes #13282.
2017-02-11 10:56:27 +01:00
Augustin Cavalier
b6f76ebe71 s/OpenBeOS License/MIT License/ universally, as they're the same thing.
Fixes #8681.
2017-02-09 22:09:56 -05:00
Augustin Cavalier
6c9415e3ca BJson: Use the normal "input, output" argument ordering instead of the reverse.
Update all in-tree consumers of the BJson API to match. Also added
const-qualifiers to the BString versions of the API, and added the leading
"_" to the header guards.
2017-02-09 13:43:26 -05:00
Augustin Cavalier
aae431375e BJson: Fixes, tweaks, and behavioral changes based on the JSON Minefield Tests.
As found on http://seriot.ch/parsing_json.php -- anything using the API
presently with valid JSON should have no troubles, but more valid JSON
that previously didn't work now does (e.g. JSON with root array nodes, not
root map nodes), and invalid JSON that silently succeeded before now fails.

Not all the bad cases from that testsuite now fail, and not all of the good
ones pass, but the few that remain are odd things that wouldn't map well to
the BMessage API (e.g. root string nodes, etc.) or are other behaviors that
make sense to leave as they are for compatibility reasons.
2017-02-08 21:35:42 -05:00
Andrew Lindesay
7407e36a10 HaikuDepot; date formatting and location header handling
The existing HTTP header date format handling code is employed
rather than using specific logic for HD.  Also the "Location"
header handling is changed to work better for non-absolute
URLs arriving in this header value on a redirect.  Both
suggestions from Adrien.
2017-01-31 23:06:20 +13:00
Murai Takashi
4ad2ad6d84 DirMenu.cpp: fix memory leak.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13118.
2017-01-30 21:09:05 +01:00
Adrien Destugues
f9e1854f19 libbnetapi: fix access to HTTP headers
The asynchronous listener had no reliable way to access HTTP result and
headers from the callbacks. As the callbacks are triggered
asynchronously, they can be run after the request has carried on and,
for example, followed an HTTP redirect, clearing its internal state.

The HeadersReceived callback now passes a reference to BUrlResult for
the request. There are two cases:
- Synchronous listener: passes a reference to the request's results
directly
- Asynchronous listener: archives a copy of the result into the
notification message, and passes a reference to the unarchived copy.

Unfortunately this comes with several ABI and API breakages:
- Change to the prototype of HeadersReceived()
- Change to the class hierarchy of BUrlResult (implements BArchivable)

All users of HTTP requests will need to be updated if they implemented
in HeadersReceived or used BUrlResult.
2017-01-30 20:27:52 +01:00
Adrien Destugues
ab880b1753 Cookie Jar: fix lock order inversion
The main lock on the cookie jar must always be locked before the rwlocks
for each domain list. This was reversed in one place, leading to a
typical deadlock pattern. Fixes one case of freeze in WebPositive: two
request threads whould interlock, and then anything trying to access the
cookie jar (including the main thread of Web+ to handle javascript
access to cookies) would also lock.
2017-01-30 20:27:52 +01:00
Jessica Hamilton
614d494afc DefaultMediaTheme: use DetachedFromWindow() for unwatching media events. 2017-01-30 12:35:07 +13:00
Kacper Kasper
c7fabe22b4 ControlLook: Fix redraw issues introduced in hrev50893.
* I was pretty sure that I didn't change the logic, but turns out
  I was wrong. Sorry about that.
* Adjusted copy-pasted comments.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13238.
2017-01-29 21:48:40 +01:00
Dario Casalinuovo
11ed4f9fa1 MediaRoster: Don't call NodeRegistered before FinishCreate
* A TimeSource need an additional hook called FinishCreate to be
able to create it's transfer area. This hook was called after the
node registration making room for potential mismatch of the transfer
buffer. Most media nodes such as an event looper call
begin to work with time related functions just once the registration
happens. It could cause shadowed timesource objects initialization
to fail too.
* Add a debugger call to prevent any node to use an unitialized
TimeSource area, that would help to identify any remaining issue.
2017-01-25 19:23:59 +01:00
Augustin Cavalier
b01e48c6fb Tracker: Warn if there is < 5% of free space left on the drive.
Previously it would warn only below 20MB of free space, if this was
less than 10% of the drive's capacity. This is obviously ridiculous now.
The first suggested patch used a simple 10% as the new criteria, but that's
a little high -- 100GB out of a 1TB drive is still a bunch of space left.
5% seems like a more appropriate choice here, and preserves a behavior
closer to the original 20MB on smaller (older) drives (5% of 500MB = 25MB.)

If this turns out to be too annoying for some users, we can make the check
more refined than it is now, but I don't think that will be necessary.

Fixes #4520.
2017-01-22 15:24:26 -05:00
Gabriel Maia
80873d1bc5 Tracker: always shrink the text input when renaming
When renaming an entry at the edge of a PoseView, the input
would not resize as usual. This change ensures the input
becomes resizable again if the text becomes small enough.
Fixes #3438.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-01-22 14:45:13 -05:00
Kacper Kasper
2332ebfd52 ControlLook: Add side parameter to tab drawing functions.
* This allows drawing tabs on any side of the view.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-01-22 09:36:38 +01:00
Kacper Kasper
88510bc040 ControlLook: Fix drawing of right bottom tab corner.`
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-01-22 09:36:33 +01:00
Dario Casalinuovo
0563e540b0 MediaClient: Remove operator overloding from private class 2017-01-20 20:52:35 +01:00
Dario Casalinuovo
991d9dbf6d MediaConnection: Implement auto release 2017-01-18 20:19:02 +01:00
Dario Casalinuovo
0844ddf4d9 MediaClient: Polish destructors
* Make Release() the only public way to destroy a connection.
2017-01-18 20:19:02 +01:00
Dario Casalinuovo
d64dd7beea MediaClient: Fix style for private methods and other cleanup
* Cleaned up some unneeded callbacks.
2017-01-18 20:19:02 +01:00
Andrew Aldridge
8b9c75d67f Fix copying special files in Tracker
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-01-17 17:31:45 +01:00
Dario Casalinuovo
7561d9ac5d Populate media/experimental with future media_kit classes
* Node implementations headers are move into src/kits/media.
2017-01-16 23:04:14 +01:00
Jessica Hamilton
9c7d2b4668 DefaultMediaTheme: improve watching for parameter value changes.
* Addresses TODO of sub-classing controls, registering with the
  media roster for parameter changes.
* Also adds support for discrete parameter controls, which didn't
  have this functionality.
* With this change, the controls no longer need to be focused or
  modified for the parameter changes to register.
2017-01-16 12:28:49 +13:00
Dario Casalinuovo
fdfd8a502e General MediaClient cleanup
* Avoid setting fRunning in different places.
* Fix SimpleMediaOutput kind mismatch.
* Other minor fixes.
2017-01-15 19:28:14 +01:00
Dario Casalinuovo
550e05af20 MediaClient: Start/Stop force argument doesn't make sense 2017-01-15 19:28:14 +01:00
Dario Casalinuovo
728c730c45 MediaClientNode: Fix little night's mixup 2017-01-15 19:28:14 +01:00
Dario Casalinuovo
2c9fa0f278 MediaClientNode: Schedule outgoing connections on start
* Add preliminary binding support.
2017-01-15 14:45:24 +01:00
John Scipione
26d4164481 AbstractSpinner: Make TextView resizable
Fixes #13168
2017-01-12 14:16:43 -08:00
John Scipione
5973288e11 BSpinner: Fix copy-pasta bug, min=>min, max=>max
fMinValue was getting set to INT32_MAX then set to INT32_MIN
fMaxValue was not getting set

now set fMinValue to INT32_MIN, fMaxValue to INT32_MAX

also in _InitObject()
2017-01-12 14:16:42 -08:00
John Scipione
3705d40cd9 BSpinner: Set min value then max value
... reverse this to avoid confusion, you'll see why in next commit.

No functional change intended in this commit, functional change is in the
next commit.
2017-01-12 14:15:44 -08:00
Adrien Destugues
bdd02e0d9d BString: rename SetCharAt to SetByteAt
Makes it clear that it operates on bytes, not unicode codepoints.
Thanks to mmlr for remembering me of this subtlety.
2017-01-12 22:03:51 +01:00
Jérôme Duval
0c5219a1d6 Restore missing symbol _ZN7BStringixEi on x86 and x86_64.
* Vision and others were broken after 3eac8208df.
* this adds BStringRef in the backward compatibility section.
* fixes #13199.
2017-01-12 21:23:50 +01:00
Adrien Destugues
3eac8208df Remove BStringRef and users.
As discussed in 2008
(http://www.freelists.org/post/haiku-development/BString-on-GCC4,1),
this class was not efficient because of lack of inlining. Implement the
suggested solution of a SetCharAt method instead. Also add a CompareAt
which covers a specific use case in KeyboardLayout.cpp.

Adjust all places which were using this feature to safer APIs.

Also fixes a copypaste error in FormattingConventions.cpp.
2017-01-11 20:50:41 +01:00
Dario Casalinuovo
e6004b7729 MediaClient: Move WIP min/max functions into BMediaConnection 2017-01-10 22:54:53 +01:00
Dario Casalinuovo
e7aa210bca MediaClient: IsRunning() status is set at handle time 2017-01-10 22:44:16 +01:00
Dario Casalinuovo
3ef4b20086 Make BMediaRecorder public
* Fills a functionality lack of the classic media_kit.
2017-01-10 21:34:20 +01:00
Tsimblist
5f8edc9c51 Fix for ticket #12978 - Tracker GetInfo window layout problem
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-01-08 23:20:57 +01:00
John Scipione
e1304871bb Revert "BWindow: CenterOnScreen a bit above center"
This reverts commit a5be1832cc.
2017-01-01 12:25:05 -08:00
John Scipione
a5be1832cc BWindow: CenterOnScreen a bit above center
BWindow docs: Document changes to CenterOnScreen()

https://68.media.tumblr.com/d8dff7a17b9d90b41e32c5a2a0312513/tumblr_oj2wg1tmKs1r0f0hfo1_1280.png

Will revert if not appreciated.
2016-12-31 18:06:55 -08:00
Adrien Destugues
1942b3b1ee Missing include.
Make gcc5 happy.
2016-12-30 17:50:06 +01:00
Adrien Destugues
f621b750f6 BSoundFile: implement most of it.
Based on the amazing work of puckipedia, this gets BePac Deluxe to play
fine on Haiku (complete with sound effects and music).

This is based on his original patch, but the irrelevent parts (working
around bugs in ffmpeg that were fixed since then) are removed.

Fixes #9939.
2016-12-30 17:32:48 +01:00
Adrien Destugues
2c26ad4b39 move BUrl to the support kit
It is used by the media kit, which created a dependency from libmedia to
libbnetapi to openssl.
It is not entirely specific to the network kit, there are some use cases
that don't involve network at all.
2016-12-29 16:38:53 +01:00
Murai Takashi
682adeb3aa IconButton.cpp: fix memory leak.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Ticket : #13127
2016-12-29 11:48:28 +01:00
Murai Takashi
b50d53dd19 NodePreloader.cpp: fix memory leak.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #13115.
2016-12-29 11:48:28 +01:00
Rene Gollent
4ee47fe9e8 BListView: Cleanup, no functional change.
- Rename _FontChanged() to _UpdateItems() to more accurately reflect its
  purpose, as discussed on commits list. Adjust callers accordingly.
2016-12-25 16:16:43 -05:00
Jessica Hamilton
4419d699ec partitioning: pass along reference to parent when uninitializing.
* Fixes problems with setting the partition name after uninitializing
  a partition in DriveSetup. Previously, UninitializeJob() was
  followed by SetStringJob(), but the kernel was updating the
  change counter for the parent partition when uninitializing a
  partition, leading to SetStringJob() having an incorrect change
  counter for the parent partition. Now the parent change counter
  will be correct when SetStringJob() runs.
2016-12-23 18:53:15 +13:00
Rene Gollent
078b08e4ed BListView: Fix missing update for list items.
- According to the Be Book, one of BListItem::Update()'s responsibilities
  is updating the item's internal height/width. However, while we were
  providing such updates in the case of the item initially being added
  to the view, or when the list view's font was changed, we were not doing
  so on frame resize. This would lead to items having a stale width field
  in such a circumstance, leading to possibly incorrect behavior in apps
  relying on that field to be correct.
2016-12-20 22:33:26 -05:00
Dario Casalinuovo
51844723d3 MediaConnection: Remove redundant IsInput/IsOutput 2016-12-18 15:15:30 +01:00
Dario Casalinuovo
75b90c42e5 MediaConnection: Fix buffer size and duration redudancy
* There's no need to supply ways to mismatch the buffer duration
and size. Anything should reflect the media_format, this is at least
fixed on API level.
2016-12-17 19:10:50 +01:00
Dario Casalinuovo
2fdc256d60 BMediaOutput: API cleanup 2016-12-17 19:10:50 +01:00
Dario Casalinuovo
a9a63d1ba5 MediaClient: First valid ID for connections is 1 2016-12-17 19:10:50 +01:00
Dario Casalinuovo
ab96594f4c MediaEncoder: Fixes CID 1347183: Control flow issues (NO_EFFECT)
* An unsigned value was checked for negative values.
2016-12-13 00:22:06 +01:00
John Scipione
3db3193290 BNode: CID 602323 explicitly ignore fCStatus return value in ctor
This is what it this whole push was all about
2016-12-12 10:36:59 -08:00
Dario Casalinuovo
83cd87d033 SimpleMediaClient: Use virtual inheritance to reduce duplication 2016-12-11 19:16:19 +01:00
Dario Casalinuovo
d1742cc336 MediaInput/Output: Inherit base virtually 2016-12-11 19:16:18 +01:00
Rene Gollent
c5dcedecae Debugger: Fix oversight.
DebugReportGenerator:
- In the case where the function was already disassembled beforehand,
  we weren't retrieving the statement, leading to a null pointer
  dereference.
2016-12-11 11:09:53 -05:00
Adrien Destugues
fda0bf77fb Revert "repo rework: Re-add compatibility url field"
Revert "repo rework: Remove stubs; Breaks repo compat."
Revert "repo rework: Remove need for repos to be self-aware"

This reverts commit a2b2f4d642.
This reverts commit 602076ef82.
This reverts commit 5ffaf72c8a.

These changes break the build on Haiku and the ability to create repo
mirrors, for the lack of a replacement for the URL (an UUID was evoked
on the mailing lists, but not implemented).

We are due for a release soon, please don't break the build.
2016-12-10 12:55:56 +01:00
Adrien Destugues
f901d7f587 Revert BNode changes resulting in non bootable system
Revert "BNode: CID 602323 explicitly ignore fCStatus return value in ctor"
Revert "BNode: Set fCStatus in SetTo() explicitly"
Revert "BNode: Style fixes, see below for details"

This reverts commit ede463195d.
This reverts commit 6e3445098a.
This reverts commit 89c0b71c9a.

We are due for a release soon. Please keep things working.
2016-12-10 12:55:06 +01:00
Rene Gollent
7bdeef54a2 Debugger: Rework parts of report generation.
Team:
- Adjust report generation event to include a final status code for listeners.

CliContext,TeamWindow,ReportUserinterface:
- Use aforementioned status code to indicate whether report generation
  succeeded or failed.

DebugReportGenerator:
- Notify listeners if report generation fails. This may have previously
  been responsible for some bug reports where it was indicated that the
  debugger hung without exiting after being asked to save a report from
  a crashed app.
- When dumping disassembly, retrieve it directly if necessary rather than
  requesting it via the user interface listener. This also fixes the quirk
  that requesting to save a crash report while looking at the source code
  of a function would trigger switching it to disassembly visually.
- When walking the list of threads to dump, acquire references to all of
  them before starting. Otherwise, it was potentially possible for a running
  but not crashed thread to exit while we were generating the report, leaving
  us with a pointer to a deleted thread. This was most likely the cause of one
  of the crashes reported in #13082.
- When receiving the notification that source code state has changed, clear
  the waiting function. Otherwise, it was potentially possible for us to get
  other state change notifications, leading to the data semaphore being
  released too often. This would then cause later potential waits such as
  the stack frame memory dump to not actually wait when they should,
  potentially leading them to dereference objects that weren't yet ready.
  This fixes another of the crashes in #13802.
2016-12-09 23:11:23 -05:00
John Scipione
ede463195d BNode: CID 602323 explicitly ignore fCStatus return value in ctor
This is what it this whole push was all about
2016-12-09 15:13:23 -08:00
John Scipione
6e3445098a BNode: Set fCStatus in SetTo() explicitly
instead of setting it in _SetTo() and then again in SetTo()

fCStatus could be set even fewer times but this is a good compromise
(logically, performance wise it is not an issue).

Update copyright, add myself to Authors
2016-12-09 15:13:23 -08:00
John Scipione
89c0b71c9a BNode: Style fixes, see below for details
Remove superfluous parens
Rename result variable to bytesWritten
Sync() Unwrap ternary style fix (for consistency)
* Shouldn't this return fCStatus instead of B_FILE ERROR?
* BeBook says "returning B_OK on success and an appropriate error message otherwise."
* Has returned B_FILE_ERROR since "it is accomplished ..."
Rename result variable to bytesWritten (again)
Remove superfluous space
explictly cast status_t to ssize_t
Remove superfluous parens, remove space, add newline
Explicitly cast status_t to ssize_t (again)
WriteAttrString() cleanup
* rename error to result
* rename sizeWritten to bytesWritten (consistency and clarity)
* check if error cede from WriteAttr and cast to status_t
* > not entirely style but functionaly same
* if length is different then written return B_FILE_ERROR
* > not a style change but a very minor functional change
* add some comments
Tiny documentation fix precede vars with \a
More style fixes
* Rename error to result
* Put parens around conditional of ternary instead of whole thing
* Compare against NULL explicitly
* Don't set fCStatus here, we're going to set it in the calling function instead
* > note that Unset() sets fCStatus to B_NO_INIT but that's ok
80 char limit style fix
More style fixes and don't set fCStatus
* remove superfluous parens
* compare ref to NULL explicitly
* > Also don't set fCStatus here since we will do that in calling function
    Unset() sets fCStatus to B_NO_INIT but that's ok
Unwrap ternary style fix (consistency)
Rename error to result (again)
2016-12-09 15:13:23 -08:00
Dario Casalinuovo
b8d4709eb9 MediaEventLooper: Remove soft real time lateness bounding
* The media_kit isn't an hard real time beast. Bounding lateness
looked like the perfect way to enable reasonable soft real time
performance and thus limiting port writes and reads between producers
and consumers. It seems to don't work very well so I just remove it.
* The result of the recent code simplification makes it equal to my
first version, before any discussion on it happened.
* Thanks to AlienSoldier for testing such issues.
* Fixes #13069.
2016-12-08 17:13:49 +01:00
Alexander von Gluck IV
a2b2f4d642 repo rework: Re-add compatibility url field
* We saw 3rd party repos break as well oddly.
* Reintroduces the url field in a little bit cleaner
  way.
* Should solve "Failed to open repository file" errors
* Once everyone updates beyond hrev50723 this is
  no longer needed.
2016-12-08 07:57:47 -06:00
Rene Gollent
67e0301477 Debugger: Adjustments to report generator.
DebugReportGenerator:
- Due to the changes made with respect to correctly handling switching to
  disassembly explicitly, the report generator needs to request loading
  source files as it walks the stack trace in order to get source-based
  line number information. Fixes crash reports having -1 as the line number
  in cases where debug information was available, but the user hadn't yet
  looked at the source file in question.

LoadSourceCodeJob:
- Cleanup.
2016-12-07 23:58:36 -05:00
Alexander von Gluck IV
602076ef82 repo rework: Remove stubs; Breaks repo compat.
* These stubbs satisfied older Haiku releases that
  required the URL
* Users running nightly images will need to upgrade
  to hrev50723 - hrev50744 before upgrading further
* Getting this out of the way now before the beta
  comes out.
* New installations shouldn't suffer any problems.
2016-12-07 21:27:56 -06:00
Rene Gollent
7cfc043e00 libdebugger: Fix a regression with ELF loading in some cases.
ElfFile:
- The refactoring in commit 2c50fbb8e1
  inadvertently introduced a failure case if a section in the ELF file
  is skipped, since it was explicitly passing in the insertion index
  to BObjectList::AddItem(). Since in the skipped case, this would be
  out of bounds for the list's current size, this would cause the whole
  operation to fail with an out of memory error, and consequently halt
  all further loading of debug information for that particular file.
  This manifested itself with libroot on at least gcc5, where no symbols
  could be seen.
2016-12-07 22:17:34 -05:00
Dario Casalinuovo
f1f0956504 MediaClient: Just some interface review 2016-12-06 21:16:36 +01:00
Rene Gollent
692fe55503 libdebugger: Add initial version of network interface.
NetworkTargetHostInterface{Info}:
- Barebones classes for implementing a target host interface over TCP.
2016-12-05 18:17:50 -05:00
Rene Gollent
25ec63dbf5 libdebugger: Add string setting type.
- Needed in order to properly implement a settings description for
  a remote interface.
2016-12-05 18:17:48 -05:00
Rene Gollent
9e4d0fd483 libdebugger: Implement remaining remote request/response pairs. 2016-12-05 18:03:14 -05:00
Rene Gollent
bcca096ae5 libdebugger: Fix header order in RemoteDebugRequest. 2016-12-05 18:03:13 -05:00
Alexander von Gluck IV
5ffaf72c8a repo rework: Remove need for repos to be self-aware
* See #12917 for details.
* Squashed to one commit to make revert easy if we
  run into any issues.
* pkgman is now pre-attached to the 'current' repo
  version within nightly images so they can be updated
  by default.
* This shouldn't impact us keeping older sets of package
  versions by commit hash for building older hrevs.
* There are XXX stubs with "Kill me". These will need
  to be dropped after users are given sufficent time to
  upgrade. We're dropping a previously required field (url)
  so making this a slowish roll out.
* Makes the repos a lot less restrictive which should
  help PM package building automation be a bit easier.
* Once this stuff smooths out, we'll add UUID's to the
  repo definitions for duplicate repo detection.
2016-12-02 00:41:06 -06:00
Axel Dörfler
852e09d61f launch_daemon: Added stop target ability.
* Before, you had to stop each job by itself.
2016-11-29 23:14:36 +01:00
Dario Casalinuovo
ecb395852e Introduce BSimpleMediaClient
* The idea is to move the callback based mechanism into a derived
class. The objects can be composed to create working systems.
* The BMediaClient class supply RegisterInput/RegisterOutput
and BeginInput/BeginOutput is moved to BSimpleMediaClient.
* Various minor fixes.
2016-11-29 01:22:35 +01:00
Humdinger
945566ff43 Switch from DejaVu to Noto font
As discussed, Noto renders much better with freetype 2.7 [1].
The DejaVu package is still in the HaikuPorts repo and can be installed
manually just like all the other available fonts.

[1] http://www.freelists.org/post/haiku-development/freetype-update-from-265-to-27
2016-11-27 19:04:26 +01:00
Dario Casalinuovo
209b520fa0 MediaClient: Add some padding and reserved functions 2016-11-26 17:30:49 +01:00
Dario Casalinuovo
05e29ea1ad MediaConnection: Remove Reset() 2016-11-26 17:24:10 +01:00
Dario Casalinuovo
9ee6577e2d MediaClient: Distribute callbacks across derived classes 2016-11-26 17:13:02 +01:00
Dario Casalinuovo
9e9655ed55 MediaClient: Use CurrentTime for both offline and performance time 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
6d0255216e MediaClient: Introduce BMediaInput and BMediaOutput 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
eebedf8f1a MediaClient: Use unique id for both inputs and outputs 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
902701e6bf MediaClient: Use higher level structs for the remaining methods 2016-11-24 21:37:14 +01:00
Dario Casalinuovo
d3523cb2ce MediaClient: Fix connection and tests
* Remove some bran related to the Faber audio engine heritage,
this fixes connections and all tests.
2016-11-24 18:21:51 +01:00
Dario Casalinuovo
a546d1f8f6 MediaClient: Rename FindConnection into FindInput/FindOutput
* The first used for destinations and the second for sources.
2016-11-24 00:54:24 +01:00
Dario Casalinuovo
300e9786ef MediaClientNode: Fix PrepareToConnect with unknown media_type. 2016-11-24 00:46:13 +01:00
Dario Casalinuovo
f506f3056f MediaClient: Improve internals and API
* Capabilities() become Kind()
* Use media_client and media_connection to better model
the different situations of the API. Reduce code duplication
and move media_kit structs/methods into private.
* Various API and beauty improvements.
* Introduce id management for media_connections.
* Fix different issues preventing to correctly begin a connection.
2016-11-24 00:27:58 +01:00
Dario Casalinuovo
23d5326e2b MediaClient: Introduce media_client and media_connection
* Those structs are provided as replacement for the classic
media_kit ones. They provide better encapsulation of the data
and the resulting code is heavily simplified. It's planned to
introduce BMediaRoster functions to provide conversion from
media_node and media_input/media_output to media_client
and media_connection.
2016-11-24 00:27:58 +01:00
Rene Gollent
a9d53d9e7e Debugger: Fix regression introduced in hrev50534.
FunctionInstance:
- Add new state FUNCTION_SOURCE_SUPPRESSED. This signals that the user
  explicitly forced disassembly to be loaded despite source code being
  available.

LoadSourceCodeJob:
- When forced to disassembly, use the above suppressed state accordingly.

SourceView/TeamWindow/TeamDebugger:
- Adjust to take new state into account as needed.

TeamDebugInfo::GetActiveSourceCode:
- When looking at a function to decide whether to return line information
  based on source or disassembly, first examine the source code state. If
  the source has never been loaded for that function, but we have it available,
  set it on the function at that point. This lazily addresses the fact that
  LoadSourceCodeJob is called on behalf of a specific function, and
  consequently only sets the source code onto that function, and not all others
  present in the same file. This allows us to differentiate between the case
  where a function doesn't have source code available at all, versus a function
  that has simply been forced to disassembly view at this point in time.

The primary symptom of the above issue was that attempting to set a breakpoint
outside of the currently active function, but within the same file would result
in the breakpoints view indicating that the breakpoint was at line 0 rather
than the appropriate line, and breakpoints would also not be drawn in the
source view for such locations.

Thanks to Humdinger for the heads up!
2016-11-22 23:06:09 -05:00
Dario Casalinuovo
2082b5d25f MediaClient: Use media_client_kind for client capabilities 2016-11-18 17:56:51 +01:00
Dario Casalinuovo
5ec9bd1eff MediaClient: general cleanup 2016-11-18 17:46:19 +01:00
Dario Casalinuovo
0253ecbd9e MediaClient: Remove BeginConnection for external connections
* While it looked like a good formalism, there's no need to add
unneeded complex steps to the user of the API.
2016-11-17 02:43:40 +01:00
Dario Casalinuovo
34619a6fd7 Revert "MediaRoster: Don't allow rosters without a BApplication"
This reverts commit f3c2f6665f.
2016-11-17 01:38:23 +01:00
Dario Casalinuovo
2740a716ea Style fixes 2016-11-14 19:21:58 +01:00
Dario Casalinuovo
f3c2f6665f MediaRoster: Don't allow rosters without a BApplication
* The BeBook states that any media_kit app should have BApplication
behind. Beware the app don't need to be running, but the object
should be present. This is because we use BApplication as a safe
exit point to free the memory allocated.
* While I was a bit reclutant in doing that, after a developer
discussion we agreed this would be the cleaner way to solve this
problem without eluding it.
2016-11-14 19:21:58 +01:00
Dario Casalinuovo
ad7255c892 MediaRoster: Use messaging instead to call Quit on exit
* As far as the bebook states loopers shouldn't be quit from
other threads, using a B_QUIT_REQUESTED message should be more
safe.
2016-11-14 19:21:58 +01:00
Dario Casalinuovo
521f41dd5a Fix typo and build 2016-11-11 15:50:32 +01:00
Dario Casalinuovo
9b410c41e8 Initial merge of the BMediaClient branch
* The BMediaClient is an higher level API to the media_kit. It
corresponds to what the layout API was for the interface_kit.
The main idea is to allow the developer concentrate only on
higher level details and avoiding handle with the tricky parts
of the media_kit. At the same time the general purpose node that
is implemented inside would allow implementing the best techniques
around thus at the same time reducing code duplication and increasing
efficiency.
* BMediaClient is WIP, this is the initial merge of the branch.
The initial development stone was set long time ago and walked
through various design/implementation phases.
2016-11-11 13:47:56 +01:00
Adrien Destugues
956c2f5fb0 Replace "All BeOS disks" with "All Haiku disks"
- In mount menu and mount preferences.

Fixes #12623.
2016-11-11 10:58:10 +01:00
Humdinger
97a5f78d9f Use driver settings API for the MIDI settings
Suggested by Adrien, to make the MIDI settings more future proof when
more settings will be added, and to make manual editing less error prone.
Moved the settings from B_USER_SETTINGS_DIRECTORY/midi to
B_USER_SETTINGS_DIRECTORY/Media/midi_settings.
2016-11-06 15:17:01 +01:00
Adrien Destugues
156b6cd596 BMediaFile: fix destruction order.
The fSource can point to a source with code inside a media plug-in (in
particular, the HTTP source from the http_streamer plugin). However,
deleting the extractor can cause the plugin to become "unreferenced" and
unloaded. If we try to call code to delete the source later, we find
that the code is already unloaded, and the app crashes.

This happens in Web+ when navigating away from Youtube or otherwise
interrupting a video while it is being played.

Fixes the crashing part of #13058.
2016-11-05 21:18:39 +01:00
Adrien Destugues
f4db7fdc68 BUrl: allow URLs without protocol or authority again.
Parsing an URL can never fail. The regexp is designed to match any
input. In the worst case, everything will end up in the "path"
component. WebPositive relies on this to generate file URLs from a plain
path.

URLs without a protocol are also possible, and can be used with an
implicit protocol. A typical example is network shares sometimes noted in
"//host.domain/path/file" form.

Add tests for these two cases and fix the parser to behave as expected.
2016-11-05 13:01:36 +01:00
Humdinger
c9275bf517 Fix loading of MIDI SoundFonts with spaces in filename 2016-11-03 10:45:09 +01:00
Adrien Destugues
1674f60dae Implement uninitialization for GPT
This makes it possible to format a GPT drive back to MBR without too
much effort.

Fixes #8823.
2016-11-02 21:57:16 +01:00
Jérôme Duval
7e9b90f7e4 Midi: use fluidlite as fluidsynth replacement.
* SF3 support.
2016-11-01 08:50:03 +01:00
Dario Casalinuovo
8023d6bafd PluginManager: Move reference counting in the MediaPlugin
* Ideally we should support this feature by default to allow
future improvements to the plugins management.
* Fixes the major memory corruption that lead to various
crashes on exit in MediaPlayer.
2016-10-31 23:39:32 +01:00
Dario Casalinuovo
42a3f9477d PluginManger: Remove BReferenceable and add locking 2016-10-31 23:39:32 +01:00
Adrien Destugues
ed31589c37 URL Disaptching/Async listeners: forward debug messages
This makes it possible for the Asynchronous listener to get the
messages. It can then process them in a more fancy way.

The default implementation will still log the messages to the console
(if debug is enabled), but it will do so from the Async listener for
asynchronous requests now. This means they will probably be logged from
the same thread, and show up in a more readable way.

This also makes it possible to listen to several requests and log them
in a nice way (in a status window or whatever).
2016-10-31 22:14:39 +01:00
Adrien Destugues
ed6d3d88c1 SecureSocket: add code to trace SSL events.
Under a #define TRACE_SSL, should you need it.

Also load error strings when initializing the SSL context, so we get
human readable errors from SSL (also in the ser reported ones).
2016-10-31 22:12:50 +01:00
Adrien Destugues
a9665fc66a HttpRequest: use data from the input buffer first
The HttpRequest protocol loop is designed using an input buffer storing
data from the socket. At each loop, we try to parse some of the data,
and then read more from the socket.

However, in some cases (in particular with chunks, which we parse only
one at a time in a loop iteration), we may not use all the data from the
buffer. Eventually, we will be left with an "empty" socket (nothing to
read from there) but the request not completed because there is still
data in the input buffer.

In that case, we would hang waiting for a read on the socket, instead of
processing data from the input buffer.

Change the code to read from the socket only if a loop iteration did not
manage to read anything from the input buffer. This means the input
buffer is too small for the next thing to process (it contains less than
one line of data, for example), and in that case we can safely read from
the socket without being blocked.

This should fix several cases where the network code was stuck doing
nothing, including https://my.justenergy.com/ reported in #13010.
2016-10-31 22:00:40 +01:00
Humdinger
05574d9b2f Tracker: Fixed alert button label for renaming of home folder
Fixed copy&paste error for button label of renaming action.
2016-10-31 10:09:49 +01:00
Andrew Lindesay
cf65729463 Url: implement same URL parsing logic in C/C++ code
- Remove uses of group matching regular expression, not available on all
  build hosts,
- Parsing is faster than our old regexp engine.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

- Fixes #13002
- Fixed some indentation (tabs vs space), please configure your editor
  properly.
2016-10-31 09:14:44 +01:00
Adrien Destugues
f004acb098 HttpDate: fix parsing of 2-digit year dates.
Fixes #13043.
Added the affected cookies to the testsuite to avoid future regressions.
2016-10-31 08:59:23 +01:00
Adrien Destugues
cec123b4de More fixes to the cookie parser.
- Fix parsing of strings shorter than 24 bytes (which can only happen if
  the year has only 3 digits, or the day in month, hour, minute or
  seconds have only 1).
- Only allow the GMT and UTC timezone specifiers, as all HTTP dates
  should use the GMT zone (but still use a format that allows specifying
  a timezone name).

All cookie tests are now passing.
2016-10-30 20:23:43 +01:00
Adrien Destugues
2215451b39 BNetworkCookie: fix overflow in date computation.
Fix one of the two failing tests from the cookie testsuite.
2016-10-30 20:23:43 +01:00
Mark Hellegers
a61218b10d Fix #13042: Make sure all cookies are saved 2016-10-30 20:23:43 +01:00
Jérôme Duval
6c2abee2f5 Debugger: use localhost if gethostname() fails. 2016-10-29 14:02:40 +02:00
John Scipione
134ed61451 ListView: Fix off-by-1 bug introduced in hrev50574
7687a6ef13

jgt^He

Fixes #12990 more better

Thanks Humdinger for noticing this bug and reporting it.
2016-10-26 13:36:49 -07:00