The save panel adjustment has been kept and modified a bit to position the
window nicely. It too uses the BWindow::CenterIn() method that adjusts based
on the screen edges.
BAlert::AlertPosition() has been superceded by the new BWindow method and should
be considered deprecated. Note that the alert position is not in the direct center of the
screen, it is offset vertically like before.
* These methods now return the new point after centering.
* But more importantly CenterIn() does some new adjustments to keep the window
position inside the screen edge. If you pass the screen frame into CenterIn()
it skips these adjustments.
* moved the inlined BRect constructor of IntRect to the cpp file. GCC will inline the method
anyway.
* impacted methods were both AGGTextRenderer::RenderString() in
src/servers/app/drawing/Painter/AGGTextRenderer.cpp, calling the StringRenderer constructor
with a BRect reference.
* unless someone comes up with an explanation, I'll try to come with a smaller testcase to
submit this problem upstream.
Return as many dirents as fit into the provided buffer. The readdir()
implementation in libroot tries to get many dirents and caches them to
reduce the amount of syscalls and the associated overhead.
This reduces the syscall count dramatically for use cases where a lot
of directories are enumerated. A "git status" on a Haiku repository for
example goes from over 50k read dir syscalls down to just under 7k.
The performance gain is only around a moderate 5% in that use case
though.
This usually wasn't a problem as the key buffer is generally large
enough to hold a single value. Still on short buffers or very long
it could have silently overrun before.
This replaces waiting a fixed time of 300ms for the device power to
stabilize. In the ideal case this reduces the boot time by 200ms per
connected device (including internal hubs).
This is very similar to what Linux implements and we use the same time
values. An interval of 25ms is used to check for connection state
changes, the stable time is at least 100ms as per the USB specs and the
whole process times out after 1.5 seconds.
- Sometimes the return type doesn't appear to have a
an associated byte size attribute. If so, simply
revert to using the architecture's register width,
since at least empirically all such cases appear
to be primitive types that fit into one anyways.
- If a node was already expanded, and we then removed/replaced
its children, those wouldn't automatically get their value nodes
added. Consequently, value retrieval for them would fail until
the parent was collapsed/re-expanded. If we encounter such a
model node when receiving a value request, notify the table model so
it can construct the value node appropriately.
- When removing a value node in response to ValueNodeChildrenDeleted,
we need to recurse down and ensure that each node's children are
likewise notified/removed. Otherwise we end up with deleted child
nodes in the node table, which in turn led to potential crashes when
either adjusting a node's type and/or its visible array range.
- Objects that act as ranged containers now expose a menu option
which allows the user to input a comma-separated list of ranges to
show. These need not be contiguous, ergo one can show only
the first and last elements of an array, or some random set of
indices in the middle as well.
* For some reason the code in acpi_processor_init() assumed that the
CPU index returned by ACPI was 1-based. On my machines it is 0-based
and the syslogs on Trac from the last months don't show any
exception. The code even contained a hack to force satisifying that
assumption for a single-CPU machine.
* Instead of calling intel_cpuidle_init()/acpi_cpuidle_init() when
initializing the driver for the device node for CPU 0 -- thus
depending on the order the device manager iterates through the CPU
device nodes -- rather check whether all CPU nodes have indeed been
encountered.
* acpi_cpuidle_init_driver(): Don't leak the cookie in error case.
* acpi_cpuidle_uninit_driver(): Clear the sAcpiProcessor element for
the uninitialized CPU node. We'd also have to unregister the idle
callback when acpi_cpuidle_uninit_driver() is called for the first
CPU device node, but there isn't any API for it ATM.
Fixes a crash on machines with multiple CPUs where acpi_cpuidle_setup()
wouldn't already fail early (apparently only mine).
Casting the difference of the two off_t values to size_t may truncate
the result. Doing so before the comparison will therefore break it.
Instead cast the size to off_t to get around the signed versus unsigned
integer expression comparison and then cast the result of the comparison
to size_t again. Should fix#9714.
This reverts commit f7176b0ee5. Citing Ingo:
"off_t is the correct type to use for addressing pages in a cache/file,
which page_num_t should only be used for physical pages." I'll see how to
fix the GCC 4.7 warnings differently :)
* GCC 4.7 warning: narrowing conversion of '(int)(((ColorPickerView*)this)->ColorPickerView::r * 2.55e+2f)'
from 'int' to 'uint8 {aka unsigned char}' inside { } is ill-formed in C++11 [-Werror=narrowing]
* error message: error: cannot bind packed field
'args->kernel_args::platform_args.platform_kernel_args::apm' to 'apm_info&'
* the reason would be that the reference doesn't have alignment information anymore.
* changed the reference to const for read access, and use the long form for setting a field.
- If the given type had no modifiers specified, the base type string
wasn't being moved out of the input buffer, leading to it mistakenly
being parsed as a modifier. This would result in errors for simple
cases such as a cast to size_t. Thanks Axel for reporting.
- Make GetToolTipInfo() sensitive to the column being hovered over.
If hovering over the variable name, we display its value location
information as before. However, if hovering over the value column,
the tooltip now displays the full value of the variable, if
available.
- Areas, images and semaphores are now presented in a more readable
tabular format.
- Areas: Columns now include base address, end address and size to
make it easier to determine if e.g. an address easily falls within
a given area, and are also sorted by base address. Protection flags
and locking have been made more concise, with a corresponding key.
Name has been moved to the last column to allow for a more compact
format.
- Images: Name moved to last column for improved column formatting,
purposes, and sorted by load address.
- Threads are now sorted such that all threads in exception states
come at the tail end of the list, and the format has been revised
to make them a bit easier to parse. State is only indicated if
something other than running, along with any available exception
state messages.
- Instead of implicitly registering and unregistering a service
instance on construction/destruction, DefaultNotificationService
now exports explicit Register()/Unregister() calls, which subclasses
are expected to call when they're ready.
- Adjust all implementing subclasses. Resolves an issue with deadlocks
when booting a DEBUG=1 build.
Use BNetworkDevice instead of using the driver settings api to get the
associated wireless network.
Also got rid of Settings::_PrepareRequest(), since it's no longer needed.
- Rename the current RangeSetting -> BoundedSetting and add an
appropriate setting type enum, since that one actually describes
a single value clamped to a range, rather than an actual range.
- Add RangeSetting class that has both a lower/upper bound and a pair
of values representing the lower and upper ends of the range currently
selected.
- Add several new optional hook functions to ValueNode. These
allow implementing subclasses to specify that they're a container
type that can export a range of items (i.e. arrays, lists, etc.),
and expose several operations on said ranges of child items.
Use BNetworkInterface and BNetworkInterfaceAddress in the Settings class
instead of using ioctls. This works for everything except the default
route, for which there is no API yet.
* Fix GB18030 Chinese encoding support for two and four bytes long
characters. This finally resolves issue described in #6227;
* Processing of multi-byte characters was slightly refactored too;
* Remove the multi-byte 94/96 graphsets designation support for
Japanese encodings. That looks like MuTerm rudiment, it had incomplete
implementation and looked like abandoned. On the other hand multi-byte
designation must be implemented in the same way as designation for
single-byte graphsets was done. Note that this multi-byte graphsets
designation has nothing to do with the normal encoding support for
usual data flow conversion - so you will be on the safe side when
use terminal encoding menu switch.
The removed feature is the ancient technique to achieve different charsets
support on 8-bit serial lines by assigning (designating) predefined
sets of characters to G0, G1, G2 and G3 and selecting them during
program life-time into GL (x20-x07E) or GR (xA0-xFF) areas by using LS
or SS functions.
For example xterm has no support for designation multi-byte graphsets
at all. Anyway if this feature is required and you can provide the
test environment - please let me know and I will be glad to implement
this feature in more easy and consistent way;
* Remove unreferenced gSmbcsTable and gScsTable parsing tables that
looks like is not used anymore;
* Remove gCS96GroundTable and gMbcsTable parsing tables that were used
by multi-byte 94/96 Japanese graphsets support and now obsoleted by
removing mentioned feature;
* Remove some obsoleted #defines, like HW statusline support for
example, from parse tables definition.
- Factored out CppLanguage::ParseTypeExpression() into one that could
be used in CLanguageFamily, with some hooks to help differentiate
what's allowed in C vs C++. Makes the type parsing available for
C files as well, and consequently allows typecasting to work for
those.
Implement MemoryBlockRetrievalFailed() hook in
DebugReportGenerator. Use it to report failure to dump the
stack memory region instead of hanging forever waiting for
the request to succeed.
- Fix operator prefix/suffix reversal that caused the first
argument to be evaluated twice.
- Track if we managed to find a name match for the team at all.
If not, print an error indicating such.
This is a follow up on the fix for #9632.
Now that the group list in Deskbar never deals with background apps or the Deskbar app itself we can simplify the code by eliminating the checks, especially in Switcher.cpp (Twitcher).
Checking for background apps and Deskbar has also been eliminated from TExpandoMenuBar and TTeamMenu. The single point of entry for these checks is in TBarApp::AddTeam().
In Switcher.cpp remove OKToUse() since the list is assumed to contain only valid entries. TSwitchManager::CountVisibleGroups() also got removed because all groups are visible. TSwitchManager::_FindNextValidApp(), TSwitchManager::QuitApp(), TIconView::ItemAtPoint(), TIconView::ScrollTo(), and TIconView::FrameOf() all got simplified significantly.
We can't depend specifically on a generic array type of a primitive
being available in the global type cache, because there might not have
been a DIE for it. As such, simply look up the type for the character
primitive and then derive an array type from that instead.
Thanks mmlr! I went with "The easiest solution". Perhaps the OKToUse() could be simplified by removing the checks for background apps and Deskbar but I prefer to keep it as is in case there someone changes the code in the future.
During DefaultNotificationService's constructor, we get registered
with the NotificationManager, which acquires a reference. When
uninitializing the module we need to release this reference before
calling the destructor in order to balance the books, as it were.
* make runtime_loader a dynammically linked object
* add kernel support for loading user images that need to be relocated
* load runtime_loader at random address
If the current node is an address type and has as its only child an array type,
use the same approach we do for pointers to objects and hide the intermediate
dereference.
Since a C/C++ array is essentially pointer math, the derived type
needs to take this into account, otherwise the array indices wind
up being based off the address of the variable itself rather than
the array it points to.
Looks like switching to declare "xterm-256color" terminal emulation was
made a bit early: there are lot of servers that still do not know about
this terminal. As was discussed in #9636 the only acceptable way is to
switch back to "xterm" and adjust corresponding entry in our local
termcap database to support 256 colors. So this changeset:
* Declare emulated terminal as "xterm";
* Change the colors and color pairs of "xterm" termcap entry to support
256 colors;
Workarounds the #9636. Should be upgraded to "xterm-256color" some time
in the future.
* Encoding cell of the StyledEdit StatusView is visible now only in case
the currently opened file encoding is not equal to default UTF-8 one;
* The Encodings menu that was opened by click on this cell is removed;
* Cmd-Opt-PgDn/PgUp shortcuts are added for quick iteration through the
list of encodings.
In sake of consistency with other Windows CP encodings:
* print_name is expanded to "Windows Central European (CP 1250)";
* B_MS_WINDOWS_1250_CONVERSION id looks like should be added into UTF8.h;
* mime_name set to NULL as other windows codepages have. That prevents
at least from duplicating too much 1250's in the Terminal, Mail and
StyledEdit encodings menus.
This case happens when you are scrolled to the end of the list and
you do an action that causes the view to shrink but not enough for
the scroll arrows to be detached such as remove a team or unexpand
an application. Before it would keep you where you were showing an
extra grey area, now it scrolls you back to the new scroll limit.
... then resize it and move it to the desired size and location on update.
* Create an fBarApp pointer and use it, this is easier than having to keep casting to TBarApp.
Actually, the Deskbar menu was sized correctly but the separator item was not,
so, I've replaced the separator item with a new TSeparatorItem class that is derived
from BSeparatorItem but does it's own drawing. This neatly avoids the bug since
the TSeperatorItem doesn't need to be resized explicitly.
Also, there were some instances of AddSeperatorItem (with an e) that I renamed to
AddSeparatorItem (with an a). I also eliminated includes in the header which means
I added them in some cpp files where they were needed.
- Extend CppLanguage::ParseTypeExpression() to also grok array
specifiers. This theoretically lets one now typecast to array types
as well as pointer types, though things don't entirely work as expected
yet.
- Added GetSystemInfo() to DebuggerInterface. Use that from
DebugReportGenerator instead of calling get_system_info()/utsname()
directly since otherwise we'd get the information for the wrong system
in the eventual case when we have remote debugging support.
When clearing the filter state, don't disable filtering entirely if we
have a ref filter present. Otherwise, it won't be invoked again
until the next time a typeahead filter is engaged.
BUnicodeChar::ToUTF8() had the same regression as ::FromUTF8() as far as
not advancing the input string pointer, which broke building
case-insensitive queries.
In the Terminal data model every full width character occupies two cells
in the data buffers. The second cell of such characters is not drawn and
used mainly to differentiate between full width and half width
characters.
Proposed fix zeroes the attributes of the second cell in the
HistoryBuffer::GetTerminalLineAt() that prevents the potential endless
loops in the BasicTerminalBuffer::_ResizeRedraw(). Those loops were
result of the random attributes in full width character's second cells.
Currently there are two generators. The fast one is the same one the scheduler
is using. The standard one is the same algorithm libroot's rand() uses. Should
there be a need for more cryptographically PRNG MD4 or MD5 might be a good
candidates.
I fear that perhaps the fBarView variable may be accessed before it has a
chance to be set in AttachedToWindow(). By setting it in the constructor there
is no chance of this. Might fix#9656
- Fix regression introduced in hrev45462: BUnicodeChar::FromUTF8 was no
longer advancing the passed in string pointer, resulting in endless
loops in functions relying on that behavior such as the locale kit's
CoerceFormatTo*() functions.
This address specification is actually not needed since PIC images can be
located anywhere. Only their size is restriced but that is the compiler and
linker concern. Thanks to Alex Smith for pointing that out.