Depending on the locale and string length the layout could leave only a
small part of the window for the rightmost part, which is the important
thing. Force the weight of each side so we have a more balanced window.
* Fixes relevant part of #5125
* The remaining information (serial number, frequency ranges) is
"advanced" and can be hidden in the tooltip. However, the video driver
used may be important important information, if you want to know if you
are using VESA, or if you have multiple video cards (Optimus for
example).
SourceView:
- Now that we need to track the current text drawing position for syntax
purposes anyways, get rid of the previous inefficient hack to handle
tabstops, and instead adjust for them on the fly. This both avoids
quite a bit of string copying/reformatting, and eliminates the need to
adjust the syntax highlight offsets to compensate for the aforementioned
reformatting.
- Fix syntax color for string literals.
Using item->SetExpanded does not work in a BOutlineListView as the
status of the list is then out of sync. The child items are not actually
added to the visible list, and trying to select them won't work.
Using list->Expand() instead works fine, so do that.
Fixes the remaining part of #6805.
- Rearrange source_language subdir to have only the interface classes
at the top level, and devote a subdir to each language-specific
implementation of them.
SourceView:
- Request syntax highlight information when new source file is set.
- Adjust _FormatLine() to also patch raw syntax highlights to match
up with calculated tabstops.
- Draw strings in pieces corresponding to how they're broken up in
terms of syntax highlights with colors.
- Implement a basic highlighting engine for C/C++. Not yet used/tested,
as SourceView will first need some adjustments in order to acquire
and make use of the highlighter modules in the first place.
- Add recognition of several additional types of tokens that, while
not necessary for single line expressions, will be needed for
parsing/highlighting source files. Also rename tokens for open/close
paren to reflect their content more accurately, and adjust callers
accordingly.
- Add missing public keyword for SyntaxHighlightSource/SyntaxHighlightInfo.
- Add initial set of basic syntax highlight types.
- Remove SyntaxHighlightSource. Instead, add a general purpose LineDataSource
interface to the model classes. Correspondingly adjust SourceCode to inherit
from it and fixup its derivatives accordingly; also adjust SyntaxHighlighter
to take a LineDataSource rather than a SyntaxHighlightSource.
Clicking the thumbnail in the package info area will now open a
window where the full-size screenshot is downloaded and shown. There can
only be one such screenshot window open. Navigating between multiple
screenshots of a package is not yet implemented. Also, no caching, but
this may be OK as it is, since one usually looks at these only once and
doesn't want the harddrive filling up with screenshots.
* I'm not sure why this was changed back in 2006, the file panel is
reused in various cases but I don't see one where selecting a folder
would make sense.
* If I missed something, then different file panels should be used for
the different cases.
Fixes#8805.
* I went with my own graphics as the one in the preflet didn't look that
nice
* The clicked button is shown using a bold font rather than filling it
grey. I was too lazy to find the correct BShapes for all cases (1, 2 and
3 button mouses)
Fixes#6825.
gcc2 was relying on the c99 functions being there, but they are not in
the std namespace.
* Disable the C99 functions and macros in C++ mode
* Redefine them as inline functions in cmath in the std namespace.
Fixes#7396.
* There is no need to delay this to AllAttached
* Apps may want to override the SetDivider, and doing it as late as
AllAttached can be annoying.
Fixes#10734.
* Select items in the encoding list by block identifier rather than
list index (there are holes in the list)
* Scroll to the start of the list when the application starts
* Add and use IsBlockVisible to detect when we need to make a block
visible, avoiding unwanted scrollings in some cases with the previous
method of testing for only one character in the block.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
Fixes some problems with previous enhancements from #3651.
* only update if font family update is detected.
* character map can now detect new fonts or removed fonts without
restarting
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
Fixes#3651 part 7.
The computation of the graph width could overflow leading to an absurdly
high count of lines to be drawn. This would freeze with BShape trying to
realloc the array to bigger and bigger sizes as lines were added to it
(by increment of 256, but still), or trigerred a bad_alloc in
BeginLineArray which allocates them upfront after I converted the code
to use that (it is more appropriate).
Add sanity checks to avoid the overflow, now you can have hundreds of
graphs without problems (much more than I can fit on my screen anyway,
which I think is good enough).
Fixes#6841.
We allow this method to throw bad_alloc exceptions as there is no other
way to report errors. However we left the object in a broken state
(maxCount set, but array not initialized) which would crash when calling
either AddLine or EndLineArray.
Initialize the count to 0 before throwing the exception so now
EndLineArray can be called and operations resumed safely after an
allocation failure.
* The key down message is not delivered when completing a dead key, so
act on key up instead.
* Pressing a character after a dead key would leave the keymap in "dead
key" mode, and that mode would be exited only by pressing a dead key
again.
Fixes#5734.
We add a 8 pixel space between the label and the menu, but we shouldn't
do that when the label is empty. This matches BMenuField behavior.
Fixes part of #10734.
set explicit minimum width of character view to be a bit larger than
fCodeView so that there isn't jumping of the pane sizes when fCodeView's
contents are too long
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
Fixes#3651 part 9.
* Scrolling the list of characters now selects the currently visible
block in the blocks list.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
Fixes#3651, part 1
The Be Book says this is a hook method, so the default behavior should
be to do nothing (didn't test BeOS, my install is currently broken).
Showing an alert with just the application thread name is less than
helpful anyway, and this was causing crashes.
Fixes#5554.
DiskProbe, DriveSetup, Icon-O-Matic, Installer, Login,
PackageInstaller, Screenshot, Translation Inspector, BootManager,
CharacterMap, CodyCam, BPrintJob
DiskUsage: removed useless translation, used only for layouting purposes
Thanks to KapiX for spotting these problems.
According to the HIG, button labels should be verbs implying actions.
Replace the "default" button with "create public_html", which is what
will happen if you click it.
Thanks to KapiX for the suggestion.
VariablesView:
- Remove unused member variable.
- Add optional presentation name field to ModelNode, which allows
overriding the name of its underlying ValueNode for display purposes.
Used to ensure that a top-level node for an expression always shows
the expression string itself, even when the returned result is a value
node with a different name.
VariablesView:
- ModelNode now acquires a reference to its target variable. This
is necessary because in the case of expression variables, the
model node is ultimately the only one aware of it, and therefore
needs to manage its lifetime.
- AddSyntheticNode() now discriminates between the case where it
needs to create a node child on behalf of the caller versus when
it's given an already created one, as is the case when an expression
resolves to a value node. Consequently it also detects whether
it needs to request value resolution or not, and handles accordingly.
- _AddExpressionNode() now supports value node results and handles
them accordingly.
- Simplify handling of expression nodes. For primitive results, we now
construct a Variable object that represents the expression result, and
then add that as we would any other local variable. This simplifies handling,
and also allows saving/restoration of their view state to be handled the
same as other nodes. Complex expression results aren't yet handled properly,
pending some further work in progress on the evaluator.
ExpressionInfo:
- No longer stores an explicit result type (this is inferred from
evaluation of the expression itself now).
- Introduce class ExpressionResult for returning the result of an
expression computation. This can currently take the form of either
a primitive value, or a value node object.
- Adjust UserInterfaceListener and ExpressionInfo::Listener to take
the above changes into account, and correspondingly adjust all
callers/listeners.
CLanguageExpressionEvaluator:
- Introduce child class Operand. This subsumes the functionality that
was previously in the separate Number class, and can represent a
primitive value, a value node or a type. Also has functionality to
implicity handle type promotion/inferring when performing calculations
between operands.
- Adjust expression parser to operate in terms of Operands rather than
Numbers. This allows a number of improvements, most notably that an
expression can now return a value node as a result rather than only
a primitive number. This capability isn't yet fully used, but paves
the way for future uses such as an expression that evaluates to a data
member, a global variable, or an arbitrary pointer of a particular type.
- Various cleanups/simplifications that were possible as a result of the above
changes.
ExpressionEvaluationWindow/ExpressionPromptWindow:
- Remove type menu field, since the expression API no longer uses it.
Adding/removing expressions in the VariablesView is temporarily disabled,
pending some further rework there to properly handle the new result object.
We were using the same "no space available" message used when the first
partition starts too early. Be more specific here to make it clearer
what the problem is.
Fixes#7087.
Patch by Karvjorm. Picked only the code changes as it seems the Jamfile
changes were not needed or already done.
* Use BObjectList instead of BList
* Add some more directory constants to FindDirectory tests.
/system and /home/config would crash diskprobe because DataEditor would
be left in an incompletely initialized state.
Also fix a memory leak: fAttribute was never freed, but is allocated with
strdup.
Fixes#10428.
It turns out there are some people actually using it, mainly when
playing music. If you interrupt music, you often want to start listeing
from the start of the track again (unlike for video), so having a stop
button makes sense in that case.
As suggested on the mailing list by stippi and korli, it is important to
let the users know they can quit at any time, and it's sometimes the
only thing they can do.
This is harmless, the sequence of states ensures they would be
initialized when needed anyway, but Coverity decides otherwise.
Fixes#10131 / CID743879.
... when there are no installable disks.
The button is disabled anyway, and it is not useful to rename it. The
program can be exited by closing the window anyway, so a "Quit" button
is useless.
* F: toggle fullscreen (like tab)
* V: removed. Stopping the replay would lose the current position, and
we don't want non-undoable lossy operation on single keystrokes
* X: toggles play/pause instead of forcing play (like space)
* Alt+Shift+0/1/2/3 changes the aspecdt ratio to "raw", "default",
"4/3", "16/9".
Fixes remaining parts of #2495.
when the shift movement goes back. This behavior feels better to me,
but opinions are welcome. Tested with HaikuDepot package listview.
Noticed that CLV uses Ctrl whereas Tracker uses Alt for single item
selection.
This is based on Jalopeura's patch to #10191, however, there are some
changes.
From the patch:
* Make userlandfs use separate "interface definition" files for each
filesystem, so the netfs package can provide a configuration file
* Add a short document on how to use NetFS
* Various fixes to netfs to make it build again (volatile atomics)
* The netfs_mount script for easier use of NetFS
Additional fixes:
* Move netfs_mount and the interface description file to data/ in the
source tree
* Use strlcat instead of strcat to avoid a buffer overflow
* Some parts were already applied in previous commits