This codepath is only hit when we are using the GCC2 demangler,
so we should not use get_next_argument which tries to autodetect
what kind of symbol this is.
Declare and use the correct registers to define a stack frame.
Change-Id: Ice3ba8f8715313a715f6b1cb553a6883541f5cc4
Reviewed-on: https://review.haiku-os.org/c/1327
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Change-Id: Ia2a86d8814d06950ea2d2d19d966c642d26f81d6
Reviewed-on: https://review.haiku-os.org/c/1302
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
A bit of an explanation for these weirdly named functions:
LatestActivePackageInfos() returns the packages on the system that are
both installed and fully set up. When packages are in the middle of being
installed, LatestInactivePackageInfos() shows the packages in the process
of being installed. Once the installation process is done,
LatestInactivePackageInfos() returns nothing. If there are packages that
can't be fully activated without a reboot, CurrentlyActivePackageInfos()
will return the same information as LatestActivePackageInfos(), or if
everything has been installed and activated, it will return no packages.
Change-Id: Ia1814a5abda6d815c46e0b46dc812b4e7af81de3
Reviewed-on: https://review.haiku-os.org/c/1129
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Replace do...while(false) loop with while(true)... loop,
so that 'continue' at line 1968 can continue loop.
Change-Id: I4d64ff2699ad0837f29d49c63b683b134c4ccc1e
Reviewed-on: https://review.haiku-os.org/c/1149
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
This is my first commit, so bear with me if I've violated any standards here!
I've bumped a few offsets to fix text clipping in the Get Info window. The proper
long-term fix is to recreate this window with the layout library, but that's
a substantially larger job.
Patch set 1
Before: https://i.imgur.com/S7Pl5Qv.png
After: https://i.imgur.com/bd3H1Kw.png
Patch set 3
French: https://i.imgur.com/rpmUb5T.png
German: https://i.imgur.com/ca9DecW.png
Portuguese: https://i.imgur.com/dE8sKFI.png
The font size in the Permissions drop-down is fixed. I had previously bumped it to
12, to be inline with the default font size present in a new Haiku install. However,
that produced text clipping for French and other locales. I reverted it back to 10,
and now longer strings fit as-is.
Change-Id: I7f4412b10074c76eb5b023a231bdb6b230c8f35a
Reviewed-on: https://review.haiku-os.org/c/1073
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Gets the stage0 bootstrap to run.
Imlementation is probably nonsense at this point.
Change-Id: I10876efbb54314b864c0ad951152757cdb2fd366
Reviewed-on: https://review.haiku-os.org/c/1061
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The HashMap and HashSet classes are copied from userlandfs. The
HashMap one works as-is as it's already used in userlandfs; the
HashSet does not even compile yet.
Change-Id: I1deabb54deb3f289e266794ce618948b60be58c0
Reviewed-on: https://review.haiku-os.org/c/1041
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
- Colors were reversed
- Padding was not handled properly because of a roundeing error
Add a test that shows the issue (behavior confirmed against BeOS)
Change-Id: I4c6e954fb6bdab92ad4e0e96897e78b26eb4727b
Reviewed-on: https://review.haiku-os.org/c/1025
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
* This indicates the view will manage whatever scrollbars are targeted
to it.
* Use _B_RESERVED7_ for this. It's been RESERVED since BeOS R5
(I guess it was probably something on some older BeOS version?)
and we don't really care about BeOS R4 ABI compatibility, so
that should be fine.
* Update BScrollView to not touch BScrollBar range/proportion
when the target view has this set.
* Update BListView to set this flag, always.
Fixes#14871.
Change-Id: I17027f3b63ef28da1e735c5393593496c415dce3
Reviewed-on: https://review.haiku-os.org/c/998
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
No "real" functional change, but this causes GCC7 to throw errors when
these functions are declared without the image_id argument, which
in some files they were (as this commit repairs.)
This change is largely inconsequential on x86, but on callee-cleanup-args
targets, leaving out the argument would probably cause stack corruption.
It is only used as an argument to _kern_load_image directly, not to
any of the load_image functions in image.h, so it belongs in a syscall-
specific header like other such constants.
No functional change intended.
* Prevent use of uninitialized 'lon' by checking for successful
result prior call
Change-Id: Ifbd649a8c0c0c37f285cda11e307013929cefa12
Reviewed-on: https://review.haiku-os.org/c/958
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Merge two if statements that has same conditional expressions
at line 198 and 201.
Change-Id: I797a77d7f2b88ae2cacd8569fdd09c0d1a19d038
Reviewed-on: https://review.haiku-os.org/c/915
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Better performance by using a single write, and some servers may not be
happy about getting so many TCP fragments for the HTTP header.
Change-Id: If7139e2a7748ea423d470676e70bd523a89031b2
Reviewed-on: https://review.haiku-os.org/c/909
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
In removing the "GroupView" class and replacing it with a real BGroupView,
I missed that it its AttachedToWindow() implementation iterated over all
child controls and set their targets to themselves. It seems this is how
the Media Kit gets change messages from them, and so the lack of this
broke changing parameter values. Whoops.
But it seems that changing menu option values has been broken for a long time
(perhaps forever?), as in order for a BOptionPopUp to send messages to anything,
its AttachedToWindow() must be called (as this sets the BMenuItem's targets
to itself, so it can forward the messages.) So now that is fixed too.
As of the last commit, a BScrollView in layouted mode now behaves
this way by default.
Change-Id: I07bd17d6d20e494c0e2f08172c0d54b10fa5d26d
Reviewed-on: https://review.haiku-os.org/c/893
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Since we know what size the target view is / wants to be, we can automatically
set the range, steps, and proportion trivially. In non-layout mode, we retain
the old behavior. Applications or views that need custom scrolling behavior almost
certainly will be using BScrollBars directly and not this, so this should not be
"wasted computation" in pretty much any case.
Greatly improves the appearance and UX of the default case of a layouted
view inside a BScrollView.
Change-Id: Ia6ff6ee14df96799c579e15d274fd4c849675577
Reviewed-on: https://review.haiku-os.org/c/892
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The old fixed-rect method was very error-prone in corner-cases,
resulting in half-visible (cut off) parameters, incorrectly
sized controls, etc. on various devices, which often made it
impossible to use.
While there are still a few rough edges (scrollbar behavior could
be further improved, though it's already much better than it was before),
this method is much better than the previous one.
Fixes#11592 and related tickets.
Change-Id: I65175f760bda98e42d1fc68ba8e526470bf17c25
Reviewed-on: https://review.haiku-os.org/c/889
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Just use BControLook where appropriate. It already provides a nice arrow
drawing function (also used in DeskBar expander and in scrollbar
buttons).
Fix second part of #8900
Changes by John Scipione:
Update menu mark and submenu arrow color with menu text color
Use text color for checkmark and submenu arrow colors, tint less black.
This means that colored bg/white text menu item will also draw a white
checkmark and submenu arrow.
Break out BMenuItem::Draw functionality into private methods _IsActive,
_LowColor() and _HighColor() methods and use them to set the mark colors.
Scale submenu arrow and checkmark with item height (which scales with
font size.)
does not align shortcuts with submenu arrows... but if you were to do
that you'd add item->Bounds().Height() / 2.
Signed-off-by: John Scipione <jscipione@gmail.com>
Change-Id: I8299094ef88bf227510b116eb1b84c261dc94723
Reviewed-on: https://review.haiku-os.org/c/341
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
FreeBSD 12's net80211 layer contains only 2 small KPI breaks from FreeBSD 11,
so we can upgrade it, apply those 2 changes to the drivers which are affected
(as the changes are in some lesser-used functions), and then upgrade all drivers
one at a time.
* Also implemented recording DrawString(string, length,
BPoint[] locations), which was previously not recorded at all.
* Also implemented playing back recently added drawing commands
in PicturePlayer.cpp. I don't quite understand what this is
actually used for, but it seemed it was forgotten. I just followed
the pattern already established in the code.
* The other important bit in this change is to update the pen
location when it is needed while recording a BPicture. Often
the BView will use PenLocation() in order to transmit drawing
commands to the app_server which use absolute coordinates only.
This isn't actually so nice, since it means the client has to
wait for the server to transmit the current pen location. If there
were dedicated link-commands for pen-relative drawing commands,
the client could just keep sending without waiting for the server.
In any case, the app_server needs to update the pen location in
the current DrawState and even the DrawingEngine even while
recording a picture, because some next command may need up-2-date
state information, such as the font state and the pen location.
* I have not yet tried to find /all/ instances where the DrawState
needs to be updated while recording. This change should repair
/all/ font state changes, all versions of drawing a string, and
all versions of StrokeLine().
Change-Id: Ia0f23e7b1cd058f70f76a5849acb2d02e0f0da09
Reviewed-on: https://review.haiku-os.org/c/817
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
* I want to introduce a new way for plugins to
register for a format. Supporting the old FormatManager is
too painful at this point and not worth the effort.
* We don't aim to replicate this functionality. I don't
think this will be useful at all in future iterations.
Originally I planned to rewrite it on top of the new
BMediaFormat, but now I am of the hopinion this is
greatly unneeded.
* Adds some missing methods signatures.
* integer vs float framerate is a longstanging debate. In theory,
in digital a/v there should not be need for floating point framerates.
This is because unless the software is run on exoteric hardware, there
is not need for it. Unfortunately, some legacy from the past like the
29.7 hz debate (NTSC) still may need to work under floating point framerates.
Even if in pratice it'd be run at 30 hz anyway.
* In theory, to handle all those correctly we should use a rational framerate,
however most code should be rewritten to support that correctly, and
it'd add some excessive complexities.
* All integer types are reverted back to unsigned ones. There's really
no reason to use signed integers there, and more importantly the danger
for integer underflows and the attached security concerns is very big.
Remove unneed if condition, since 'error' is initialized to B_OK.
Change-Id: I2fd0edb99a3d055beafaf15f1140071a31140892
Reviewed-on: https://review.haiku-os.org/798
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
Remove unneed if conditions, since unsigned type value is never < 0.
Change-Id: I76621f79883752cd3560c6e02f18384b1ddd9cf3
Reviewed-on: https://review.haiku-os.org/797
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
FreeBSD 12 has no major changes to the ifnet KPIs that constitute a
source compatibility break, save a single one related to locking
which doesn't really apply to us, and so we don't need to create
a "freebsd12_network" directory to work through the upgrades.
Since we use sentence-cased menus, there is probably only one capital
letter in the line, so looking for only capitals won't be very useful.
Instead, accept any ASCII character (< 255) which is alphanumeric,
as these are more likely to be command-able in any given keymap.
(IsAlNum returns true for accented Latin characters also, which may
be un-command-able if they require dead keys to type.)
It is not allowed to use isspace, tolower, etc, on character outside of
the char type range (and EOF). Use BUnicodeChar instead to avoid out of
bound accesses.
Fixes the second crash in #14753.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Some changes by me to make "index" a byte instead of character index
as it needs to be.
The MoveTo() call is not restricted in any way; it can easily move the
window's titlebar offscreen, which is very confusing for users as if
they don't remember the window manipulation keyboard shortcuts,
dealing with such windows is often very tricky (or impossible
if the window is actually larger than the screen.)
Now we also call MoveOnScreen with DO_NOT_RESIZE and
MOVE_IF_PARTIALLY_OFFSCREEN set, which will simply get the size of
the decorator bar and then ensure it is entirely on-screen.
Fixes#11763.
I need this to use loopers in WebKit, which spawns threads and expects
to be able to turn them into event loops later on.
This is the pattern already used in BApplication, we may as well make it
available elsewhere.
Change-Id: I5939ca89d33cb3bcc92567b302c2038d976af598
Reviewed-on: https://review.haiku-os.org/735
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* We try to conform to what ffmpeg does, it is
unuseful to support metadata keys formats which
aren't really used anywhere.
* Add TODO with some infos for future improvements.
Fix 'true / false' value is implicitly cast to the integer type.
Change-Id: I2f72fcd34d2d97d20e2a98ed5efe25919a485c9d
Reviewed-on: https://review.haiku-os.org/739
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Move to BCodecKit namespace and make extensive use
of BCodecRoster.
* This is a first step in the right direction of
decreasing private dependencies. Some APIs are being
translated to the CodecKit. I am doing an investigation
on which APIs are really used among apps, so that the new
kit can be more slim and oriented toward easy development
and can be extended in the right direction instead to
continue maintaning unuseful code.
* BMediaFormats needs still a bit of love.
* General improvements in style and code maintainability.
Properly speaking, this is part of POSIX and not of the Be-style
"kits", and so it should live in system/ alongside libroot.
No functional change intended.
Change-Id: I0fcf78a09c76e220ad4f1719d147978ef4a3bc52
Reviewed-on: https://review.haiku-os.org/726
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Use string keys. I am still convinced we need BValue.
* Use boolean instead of status_t in return, this is
much more handy in pratical use given that there's no
really a status to check.
* Those classes are not ready for public consumption. Ideally,
I'd add a well designed BCodecRoster wrapping them. This is part
of the general cleanup I am doing to get the code in a good state
before going to finalize the design.
* I don't plan to reintroduce BMediaFile in the media2 API, and
I'd like to remove any (explicit) usage of entry_refs and things
like that.
* I plan to introduce BMetaData and BMediaFormat which is going
to be different than what we do now.
* We need to explicitly use the mime type when it's available and
it is another design consideration when CodecRoster will be introduced.
- if fText is an empty string, we would start searching past its end,
possibly leading to a crash (noticed this in HaikuDepot).
- if fText is NULL, BString would report a size of 0 lines, it makes
more sense to report a size of 1 line.
Some of these were correct as they were ... but most weren't.
There are a variety of other correct ones I didn't change over yet
that someone else probably should (GCI task?).
This fix garbage attributes on e-mail messages on status changes.
Change-Id: I5293a0e71a1b84c04889fa3375488b0075aad12e
Reviewed-on: https://review.haiku-os.org/682
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Adds max width and height arguments to
instantiate_deskbar_(item|entry).
* Old applications just stay with a 16x16 scaled icon, though.
* All used apps within the repository are converted to the new call
besides the input_server input method icon (that will need further
API changes in the input_server).
Change-Id: I29cc439396917be2c24135888459d31364997dff
Reviewed-on: https://review.haiku-os.org/656
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* This also removes the mini/large icon mode for list views; it's now
simply always matching your font size.
Change-Id: Ieedd86cc3a50dd0f950d97bbd9839384d44f8bd3
Reviewed-on: https://review.haiku-os.org/662
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Actually draw the string at the bottom of the frame.
* Unfortunately BStringList cannot be cached because there is no
space left in the class.
* Change SGI and PNG translators to use it in place of BTextView.
Change-Id: I07e12bf1a8dc956d18c9624604c7b63453ad15a2
Reviewed-on: https://review.haiku-os.org/620
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Using BDateFimeFormat avoids going through libroot and up again to ICU
throuhg the locale add-on. Moreover, it uses the Locale settings
directly instead of relying on the LC_* environment variables.
Fixes day names in Web+ history menu always showing in english. Tnaks to
Oco for noticing!
Change-Id: I0c7f321a6147e8f5ab31f82de836c5ad23bb321b
Reviewed-on: https://review.haiku-os.org/650
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This addresses some of what's reported in ticket #14637.
* Keymap preferences: Localize key labels. Translators have
to be careful not too use too long words here...
* Media preferences: Fix typo "SoundFonts" -> "SoundFont"
The two popup menus, Video input/output, both use "<none>",
which when the catkeys are collected is reduced to one item.
Apparently, Italian likes to have different tranlsations for
them. I hope to fix that by using B_TRANSLATE_COMMENT with
differing comments. Not sure if that'll work...
* Network preferences: Localize "on/off" and "Enable/Disable"
in the Services.
* Repositories preferences:
Add RepoRow.cpp to DoCatalogs.
* Shortcuts preferences: Localize "Left/Right/Both/Either/None"
* Bluetooth replicant: Localize menu items and alerts.
* DeskCalc: Localize button names.
* HaikuDepot:
- Use BStringFormat and variables to replace for the WorkStatusView.
- Put package name in single quotes; nicer if you have package names
with spaces.
- Avoid leading and trailing spaces in translatable strings. Those
can be overlooked b the translator.
- Use B_UTF8_ELLIPSIS instead of "...".
Change-Id: Ia32908f9faad5188aa87c918c31229277decbda9
Reviewed-on: https://review.haiku-os.org/631
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
In XXorRegion(), memory allocated in if statement might be leaked.
Pointed by Clang Static Analyzer.
Change-Id: I6b8b68bc5fea7b7c1fd354f05f03d3ebb0b11b62
Reviewed-on: https://review.haiku-os.org/633
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
In AddResource(), parameter 'index' is not used.
It seems AddItem() use index instead of count.
Change-Id: I997ac96b7d32c5705606cdbf23c7fd71550c9aa6
Reviewed-on: https://review.haiku-os.org/630
Reviewed-by: Rene Gollent <rene@gollent.com>
check_path_name() had NULL check of path, but its result was not used.
So, add if statement to return B_BAD_VALUE when path is NULL.
Change-Id: I8ceec5d592267bf0f00f606eba44c0ecaef5a209
Reviewed-on: https://review.haiku-os.org/628
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The "mount" command which calls fs_mount_volume direclty handled this
properly, but this class did not; which meant that user-visible error
messages about partitions failing to mount just said "general system error"
instead of the real one.
Fixes#14540.
They may still be running at the point we detach from the window, and
as we stop watching everything else at that point (and the threads
themselves depend on the window looper as the global "lock"), we
need to tear them down then.
We especially cannot do this in the destructor, as there are some
virtual methods that the threads need during their teardown which
obviously will not work in ~BPoseView.
Fixes#13371, and potentially other Tracker crashes that occured
as a result of closing the window while the add-poses tasks were
still operational.
Change-Id: Ib7ec0d1d413096be899a05887399f5b087eb8f99
Reviewed-on: https://review.haiku-os.org/574
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fixes the tests added in the previous commit, and also #8552.
Change-Id: Idf9459474bc66054f94cf66065ed6fcf9c60cece
Reviewed-on: https://review.haiku-os.org/572
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Thanks Axel and Jerome for the reviews!
Change-Id: I4f116c540cf59ba74b79d9d2f95ed40edc9c4174
Reviewed-on: https://review.haiku-os.org/557
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This depends on the previous commit to return the correct error code
from ioctl().
If there are no VAPs running (which is the case after a forced disconnect
from an access point), scans will fail. In that case, we call
IEEE80211_IOC_HAIKU_COMPAT_WLAN_UP, which will restart a VAP, and then
initiate the scan.
Change-Id: I732aefe67e386dbb0ed3d232ed9deda678132601
Reviewed-on: https://review.haiku-os.org/551
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* _VirtualWidth() ignores invisible columns
This makes the horizontal scrollbar match the width of the visible columns.
Also trigger an initial update of the scrollbars.
* Fixes#14480
Change-Id: I7d4b27a8fdca58c150ac47f9b948b127fb275fdf
Reviewed-on: https://review.haiku-os.org/543
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
This fixes the (intermittently) crashing test added in the previous commit,
and should also fix#12024 and #14348.
Note that this is a slight behavioral departure from BeOS, though since
BeOS crashed when this was done previously, it shouldn't cause any
other problems.
Change-Id: I90b6132ff7741b8d6cb601375a9b11fc3ffacb40
Reviewed-on: https://review.haiku-os.org/541
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
...if the row is present in the list, but continue to return false if the
row is not currently visible on the screen.
Part of #11675. Cherry-picked from https://review.haiku-os.org/442.
When URLs combine a base URL with a relative part, the relative part's
path component was being pre-processed. This removed any ".." from the
path and in some cases in the unit test cases, the ".." should have been
retained and then only later applied to the base URL. This changes
fixes this so that the relative part is not pre-processed and is applied
with it's path in a raw state.
Completes Fixes for #14377
Change-Id: I9cebb8599889494e11f40a3b54c87ebca3ed1a21
Reviewed-on: https://review.haiku-os.org/529
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Resetting the drawing mode to B_OP_COPY was not right, since the previous mode could be anything.
Use WritePush/PopState() instead.
Change-Id: If9cba2c46bf372fd0164d951fcc49696cf72d576
A URL in string form should be able to be parsed and then verbatim
regenerated according to 'UrlTest'. This change fixes this ability
for the case where there is a '?' initiating a query or a '//'
initiating a host/authority section.
Partly Fixes#14377
Change-Id: I6547253c3cdc22d79514edf75284e9725d1a2d17
Reviewed-on: https://review.haiku-os.org/512
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
string_for_size uses KiB, etc., and so when the two are combined (e.g.
pkgman's progress display), it looked especially strange to have two
different units.
* PRE_BETA_2 is now the default in master.
* For libbe: R1/alpha4 used internal=8, but nobody bumped master
at the same time, so now we are on internal=9.
TeamDebugger:
- When a job is aborted, instead of calling into the user interface directly
to reset the status message, post a message to do so. Also, only post the
message if we aren't already in a terminating state. Otherwise, if jobs
were still running while the team debugger is executing its destructor, it
would attempt to make calls to the already destroyed user interface. This
bug has likely been with us for quite some time, but was hidden by incorrect
ref counting in the past (see #12343).
Thanks to mmlr for spotting this. The wrong format specifier was used,
which would lead the server to get the wrong size and do strange things.
Chunked uploads should now work a lot better.
While I was at it, put the line termination in the printf to save a
write to the socket (these are unbuffered and each of them costs us a
syscall, and in some cases this has been found to confuse webservers as
we end up sending super small TCP packets).
Increase array size, since gcc8 x86_64 warns 'sprintf' output
between 2 and 20 bytes into a destination of size 16
[-Werror=format-overflow=].
Change-Id: I641db97d963b64b0c3434cd498f29f4dcb61c373
Reviewed-on: https://review.haiku-os.org/472
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Since hrev52136 holding Shift while clicking the zoom button will
ignore the Deskbar and resize the window to take whole screen area
(the original behavior).
It'd be nice if the keyboard shortcut for zooming - Ctrl+Alt+Z
recognized an additionally held Shift in the same way.
Add shortcut to window.
Fixes#14365
Change-Id: I919ff2c3e8c41e022f8c675ea631daf18ff41eb3
Reviewed-on: https://review.haiku-os.org/470
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The ICU class is named MessageFormat, but on Haiku, it sounds too much
like something related to BMessage (which it isn't in the slightest)
and not part of the Locale system. It works almost entirely with BStrings,
so naming it BStringFormat makes much more sense.
OK'ed by PulkoMandy and Humdinger.
EachItemUnder selects items that are not in fact under the superitem
passed to the method.
ticket: #13730
Change-Id: I12a2e29204e1b9bbecd5704e60a02e3613a7f4fd
Reviewed-on: https://review.haiku-os.org/52
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Since destination size equals number of characters to copy.
Pointed out by gcc8. [-Werror=stringop-truncation]
Change-Id: I8f2118129ec2324bb1f93857f5abfdf121c864f0
Reviewed-on: https://review.haiku-os.org/450
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Skipp_OSX <jscipione@gmail.com>
DIESubprogram:
- Adjust to inherit from DIENamespace, as gcc can and will use it as a
container in some circumstances.
DIEClassBaseType:
- Add accessor for member functions.
DwarfImageDebugInfo:
- Adjust recursive walking for types to take into account any DIENamespace,
not just DW_TAG_namespace specifically.
- Factor out adding function to list into a helper.
- When retrieving the list of functions, perform a similar recursive walk as is
done when building the types table, as some subprograms are apparently not
always added to the root compilation unit entry. Curiously, this behavior
seems to be relatively specific to a struct/class type declared inside a
function in GCC's case, but based on the DWARF spec, there does not appear to
be any specific restriction as far as where these can be nested, so be a bit
more paranoid to ensure we don't encounter similar cases in the future.
This function is used when serializing a BPackageInfo object, which is not
done very often, and flags are used even less often. But both of these things
are done for the system packages, as they have the "system_package" flag
set, and are processed by "update_package_requires", and so this meant
that the "system_package" flag was turned into the "approve_license" flag.
Since they were being Use'd at global scope, the FreeBSD versions
of a number of POSIX headers were being used instead of the POSIX ones,
which breaks the build on non-x86 as these headers presently do not work
elsewhere.
Instead, just include the base directory, and then include the compat
headers manually in the one place that actually requires them.
Also fix all the other files that expected errno.h and others to
be included implicitly, which they now are not.
This should fix the PowerPC and (part of the) ARM builds.
This block was originally disabled in libbind, and we enabled it
independently; and so did NetBSD. But they also made one other
fix:
From: christos <christos@netbsd.org>
Date: Thu, 28 Dec 2017 15:12:15 +0000
Subject: [PATCH] PR/52837: Michael Kaufmann: getaddrinfo() resolves "127.0.0.1
www.example.com" to 127.0.0.1. Apply the patch from FreeBSD and explain the
rationale.
I attempted to merge NetBSD's new irs code, but their changes turned
out to be too invasive to do trivially, but in the process I had to
read our commit logs to find what we've changed, so at least I can
mark that.
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: christos <christos@netbsd.org>
Date: Thu, 28 Sep 2017 23:32:01 +0000
Subject: [PATCH] PR/52578: Benjamin M. Schwartz Set the AD bit when DNSSEC is
enabled (RFC 6840 Section 5.7).
From: lukem <lukem@netbsd.org>
Date: Fri, 2 Mar 2018 06:31:53 +0000
Subject: [PATCH] PR/48585: Set errno when returning NULL for AF_INET
In inet_ntop4(), errno wasn't set before returning NULL.
Seems like an oversight in the existing fix for PR/48585.
Noticed by code inspection.
* B_MEDIA_SEEKABLE was once a flag with one bit set. Due
to the complexity of streaming mediums, I had to split
this flag into B_MEDIA_SEEK_BACKWARD and B_MEDIA_SEEK_FORWARD
and never noticed that this broke the flag check.
* Reported by Murai Takashi through gcc8.
In hrev51623 the default BWindow::Zoom() method was changed to respect
Deskbar, that is to say that the Window will zoom to screen area minus
the area taken up by Deskbar.
Some have complained that they miss the old maximize to full screen
frame behavior. This commit updates the default BWindow::Zoom() method
so that pressing Shift+zoom will maximize the window ignoring Deskbar,
the window will resize itself to take up the entire screen frame.
Note that if you override Zoom() in your app window then shift+zoom
will no longer work, this trick only works for apps which use the
default BWindow::Zoom() method.
Change-Id: Ic9f8fcb54f58663663db737103f6a7b42171ef46
This reverts commit ec1b18c58a.
This was not well enough reviewed, and it seems that at least some
consumers of the old API (e.g. WebPositive) need more than the new one provides.
Change-Id: Ie7ad1fc70dab889922424298661504b00f66d31d
* Moves list item selection logic back to MouseDown from MouseUp to improve
application compatibility and responsiveness
* Fixes multi-select drag and drop by not modifying the existing
selection if a MouseDown event is on a selected item.
Fixes#9190, #14264, #14289
Change-Id: I58050b403dac985f98e03faa72de1ebc5d24f95b
This reverts commit 11dee0444f.
This reverts commit 1641a0516d.
This reverts commit 484f64f315.
These changes break various edge-cases in BTextInput (e.g. typing off the end
of a long string, using the arrow keys to navigate while out-of-bounds),
and nobody has found any fixes for them in the nearly-a-year since they've
been instanted, so they are now being reverted.
Reopens#12608, #13796.
Fixes#9137
Move scroll bar drawing into HaikuControlLook
Added B_SCROLLABLE flag to BControlLook
Update FakeScrollBar in Appearance to also draw using HaikuControlLook.
Focus works on scroll bars again, used by FakeScrollBar... and probably
nowhere else.
Added private _ScrollingEnabled() convenience method to BScrollBar and
use it in a few places making.
Create ScrollBarPrivate.h header to share a couple of scroll bar related
enums with HaikuControlLook that come from BeOS Scroll Bar prefs.
Stuff arrow_direction enum into BScrollBar::Private as it has been
succeeded by a similar enum already present in BControlLook and is only
around now for BScrollBar::Private::DrawScrollBarButton.
Change-Id: Idc31ee41de091ba45ded2f0315a004af00143803
* Prevents crash mentioned in Trac, but also enables keyboard navigation
to 'recent items' menus such as "Open files..." in MediaPlayer and DiskProbe
* Check selected menu and submenu exist in menu tracking thread before accessing
* Update BMenu::AttachedToWindow to pass in keydown param to _AddDynamicItems
Fixes#9251
Change-Id: I3031b8e9c1b9dd4ef1187c5a6b8ab7925e3496d2
Repositories are identified with a 'url' in the
remote 'repo.info' file. There is also a
'base url' which is the URL locally with which
the system is able to access the repository
data on. There is some confusion between these
two terms in the source. This change aims to
separate the two out and consistently name them.
The settings for the repository locally also was
not storing these values and that has been fixed.
Debug info about the repositories also did not
display the two urls consistently and will now
also do so. Finally, HaikuDepot now correlates
locally configured repositories with the data in
HaikuDepotServer using the identifier URL; this
makes the use of mirrors with HaikuDepot possible.
Fixes#13888
Change-Id: I66dfe589b05c24e1ab123a6945352e0f24b60bf1
We alwasys draw text at the bottom of the calculated TextWidget
rect, that's why it needed to be centered to get the desired
placement. However, there is two places
... in list mode. Fixes#12997
This bug was introduced in hrev50528 along with new 32x32 icon size
in list mode. I'm not sure what I was thinking on this particular
line but reverting it seems to fix the problem and logically the
original code makes sense.
+ has greater operator precendence than ?, so we need parentheses when
using both in expressions. Both of these look like actual bugs.
Spotted by Clang.
joystick_info contains BLists which initialize themselves upon new(),
and Clang warned (correctly) that using memset() overwites that, as well as
RTTI and other data that they contain. So instead, only memset the first
part of the struct, and then manually initialize the other members.
Fixes#14217.
- When in non-interactive mode, i.e. saving a crash report, don't
allow the image debug info loader to automatically grab missing but
available info packages. Otherwise we potentially download very large
packages with the user being entirely unaware, i.e. the 200MB debug
information package now present by default for gcc7's libgcc. This
should eventually be made a configurable preference though.
The Flatten and Unflatten method should check the size according to the
matching FlattenedSize method, not a possibly overriden version.
May also fix#14128 since we avoid use of the vtable by doing this.
the size of BAffineTransform is architecture dependent, so we transmit
its contents in a standard array instead.
Change-Id: I907110742168846a869a48bb2d116cc5292ec7d0
my.justenergy.com allows only RSA, so we can't connect there without
this. Other websites may have a similar problem.
Also improve the handling of the error, as it was giving a generic
"general system error" to the user.
Fixes#13975.
The debug build of the packagefs kernel addon failed because user_memcpy had no type.
Using the correct headers for user_memcpy and IS_USER_ADDRESS fixed the issue.
DwarfImageDebugInfo:
- In some, but not all cases, gcc5 generates type information where the DIEType
is a child of a namespace rather than of its containing compilation unit.
This needs to be taken into account when building our name lookup table, as
we'll otherwise not find the full definition of such types when attempting to
locate them for corresponding variables. Fixes an issue reported by Axel.
* At this point we want to avoid the user calling the callbacks
in the form of BMediaConnection. Instead we force to use the
BMediaInput and BMediaOutput versions.
TypeHandler:
- Add name field for presentation purposes. Adapt subclasses accordingly.
TypeHandlerRoster:
- Add methods to count and retrieve all type handlers for a given type,
and adjust CreateValueNode to allow for passing in an explicit handler.
Adjust callers accordingly.
VariablesViewState:
- Add helpers to store an explicitly chosen type handler for a node.
TypeHandlerMenuItem:
- ActionMenuItem subclass that takes care of reference management
for its contained type handler.
VariablesView:
- Add context menu for choosing type handlers if applicable. Implement
support for invoking said type handlers in a similar manner to explicit
typecasts.
- Adjust saving/restoring the view state so that hidden nodes are taken
into account as well. This is necessary since it may be the case that
the handler had to be applied to the hidden child rather than the visible
node (i.e. the BMessage handler when applied to a pointer to a BMessage).
All together, these changes allow choosing to switch between views of a type
when the Debugger has multiple handlers for it. For example, for BMessages
this allows switching between displaying the raw underlying structure vs
the decoded message content.
AttributeClasses:
- Fix typo in get_attribute_name_classes which resulted in us not
handling DW_AT_linkage_name properly.
- Fix incorrect class specification for DW_AT_default_value due
to inconsistencies in the DWARF documentation (the table of attribute
classes indicates it is only a reference, but the detailed description
indicates it also being possible to be a flag or constant, both of
which gcc outputs).
DebugInfoEntries:
- Add accessor for DIEClassBaseType's inner types.
DwarfImageDebugInfo:
- When looking up types, create a basic target interface to pass on
to the type context. Otherwise, type lookups that required DWARF
expression evaluation would crash.
- When building the type name table, we now recursively walk a class's
inner types, and add them to the list as well. This omission would
cause the debugger to lack the type description for such classes,
and consequently be unable to display their details in the variables
view.
AbstractTable/Table/TreeTable:
- Let BColumnListView take care of deleting columns. The previous
approach was resulting in the columns being leaked.
Debugger:
- Don't detach the UI reference, as TeamDebugger will acquire its own.
GraphicalUserInterface:
- Cleanup of file panel handler.
SourceView:
- Clean up marker manager.
*Roster:
- Clean up registered objects in destructors.
GlobalTypeLookup:
- Clean up hash tables.
NetworkTargetHostInterfaceInfo:
- Fix reference handling for settings.
BListValueNode:
- BList's item count member is an int32. However, when the handler was reading
said variable, it was mistakenly reading the number of bytes corresponding to
to the address size of the architecture instead.This would cause the read to
fail, and consequently BList and/or BObjectList variables to not display
their contents properly on x86-64.
- Fix various cases where OpenHashTables weren't being cleared properly.
- Fix various reference counting errors.
- Simplify FileManager reference handling.
- Fix bug in LocatableDirectory where the directory named '/' would have its
name returned as empty. This would lead to failed lookups for entries already
in the table, and ultimately corrupted the hash table when deleting unused
entries, leading to #13939. This was previously never noticed due to the
entries not being freed properly.
- AbbreviationTable wasn't clearing its entries.
when compiled in kernel mode, BMemoryIO::WriteAt() and BBufferDataReader::ReadData()
now check the buffer to write to, and eventually call user_memcpy() instead of memcpy().
DwarfImageDebugInfo:
- Type name/info entries weren't being freed properly.
BaseUnit:
- The array of entries itself was being destroyed, but not the actual
objects. Consequently none of the DIE objects were ever being freed.
CfaRuleSet:
- The register rules array wasn't being freed.
FileManager:
- References to entries weren't being released. Some more work remains to be
done here though, as a subset of these objects still have a non-zero ref
count in the end.
Following recent changes to use libroot_build on Haiku also, it is now
actually impossible to build Haiku components on non-Haiku platforms
(BeOS R5, Dan0, BONE, Zeta), so we can remove any logic related to this.
This is only the first part; still to be removed are:
* SetSubDirSupportedPlatformsBeOSCompatible
* HOST_PLATFORM_BEOS_COMPATIBLE
* TARGET_PLATFORM_BEOS_COMPATIBLE
TeamWindow:
- Properly delete stack frame selection entries in destructor.
TeamDebugger:
- The reference to TeamDebugInfo wasn't correctly initialized to own,
leading to TeamDebugInfo never being destroyed.
FunctionInstance:
- Also clear source code reference in destructor.
ImageDebugInfo:
- Release references to specific infos in destructor. These are acquired
on our behalf when loading the image info, but were never released,
leading to the latter never being freed.
DwarfManager:
- Release references to files in destructor.
FileManager:
- Release entries in various destructors.
Somewhat improves the situation in #13800, but is still far from complete,
as a thorough review of this nature hasn't ever really been done.
TeamDebugger:
- In several cases, BReferences on thread handlers after a call to
_GetThreadHandler() weren't correctly initialized to account for
that function implicitly acquiring a reference on our behalf, leading
to the reference count to spiral out of control, and consequently the
handler would never be freed. Found while attempting to address
#13800, likely more to come.