Age | Commit message (Collapse) | Author |
|
There's no need to leave the cell dirty when not updating it, and
there's definitely no need to update the cells as we're selecting them.
This makes navigating a sheet and selecting cells significantly faster
as we no longer update unrelated cells just because they appear to have
a cyclic update dependency :^)
|
|
|
|
...and don't let them leak out of their evaluation contexts.
Also keep the exceptions separate from the actual values.
This greatly reduces the number of assertions hit while entering random
data into a sheet.
|
|
|
|
Hide private members, and make the odd update() -> sheet->update(cell)
-> update(Badge<Sheet>) -> update_data() less odd by removing the
update(Badge<Sheet>) step.
|
|
The save functionality omits these when the names are standard, so just
ignore them if they don't exist (or are not valid).
|
|
|
|
This implements a number of changes related to time:
* If a HPET is present, it is now used only as a system timer, unless
the Local APIC timer is used (in which case the HPET timer will not
trigger any interrupts at all).
* If a HPET is present, the current time can now be as accurate as the
chip can be, independently from the system timer. We now query the
HPET main counter for the current time in CPU #0's system timer
interrupt, and use that as a base line. If a high precision time is
queried, that base line is used in combination with quering the HPET
timer directly, which should give a much more accurate time stamp at
the expense of more overhead. For faster time stamps, the more coarse
value based on the last interrupt will be returned. This also means
that any missed interrupts should not cause the time to drift.
* The default system interrupt rate is reduced to about 250 per second.
* Fix calculation of Thread CPU usage by using the amount of ticks they
used rather than the number of times a context switch happened.
* Implement CLOCK_REALTIME_COARSE and CLOCK_MONOTONIC_COARSE and use it
for most cases where precise timestamps are not needed.
|
|
|
|
New serenity_app() targets can be defined which allows application
icons to be emedded directly into the executable. The embedded
icons will then be used when creating an icon for that file in
LibGUI.
|
|
Problem:
- `(void)` simply casts the expression to void. This is understood to
indicate that it is ignored, but this is really a compiler trick to
get the compiler to not generate a warning.
Solution:
- Use the `[[maybe_unused]]` attribute to indicate the value is unused.
Note:
- Functions taking a `(void)` argument list have also been changed to
`()` because this is not needed and shows up in the same grep
command.
|
|
You can now set the "autosize" property on a GUI::Label and it will
automatically update its width preference to fit the text.
|
|
|
|
This was pretty straightforward although it does expose a bunch of
missing functionality (mostly properties.)
|
|
This patch replaces the UI-from-JSON mechanism with a more
human-friendly DSL.
The current implementation simply converts the GML into a JSON object
that can be consumed by GUI::Widget::load_from_json(). The parser is
not very helpful if you make a mistake.
The language offers a very simple way to instantiate any registered
Core::Object class by simply saying @ClassName
@GUI::Label {
text: "Hello friends!"
tooltip: ":^)"
}
Layouts are Core::Objects and can be assigned to the "layout" property:
@GUI::Widget {
layout: @GUI::VerticalBoxLayout {
spacing: 2
margins: [8, 8, 8, 8]
}
}
And finally, child objects are simply nested within their parent:
@GUI::Widget {
layout: @GUI::HorizontalBoxLayout {
}
@GUI::Button {
text: "OK"
}
@GUI::Button {
text: "Cancel"
}
}
This feels a *lot* more pleasant to write than the JSON we had. The fact
that no new code was being written with the JSON mechanism was pretty
telling, so let's approach this with developer convenience in mind. :^)
|
|
|
|
Let's make SelectionBehavior a view concept where views can either
select individual items (row, index) or whole rows. Maybe some day
we'll do whole columns, but I don't think we need that now.
|
|
|
|
|
|
|
|
This makes it look nice regardless of wallpaper or background color.
|
|
Now that we store each partial path with the segments, we can just
open up the path of the segment you clicked on.
|
|
|
|
Currently we only print a backtrace. In the future, we could do something nice in the GUI.
|
|
The dynamic loader is now stable enough to be used everywhere in the
system - so this commit does just that.
No More .a Files, Long Live .so's!
|
|
This command outputs the memory contents of a given address as an
unsigned int.
LibDebug already had support for this, so just a matter of intergating
it in sdb.
Very useful :)
|
|
Previously, we only accepted addresses that started with digits
'0'-'9', which was not correct because we expect addresses to be in
base 16.
We now expect addresses to be written with '0x' prefix, e.g 0xdeadbeef.
|
|
FileManager windows now alternate between the old-style location text
box and a new-style breadcrumb bar. The location bar shows up when you
try to edit the location (with Ctrl+L) and disappears once the textbox
loses focus.
The textbox and breadcrumb bar are mutually exclusive to keep it tidy.
|
|
Almost everyone using this API actually wanted String instead of a
ByteBuffer anyway, and there were a bunch of slightly different ways
clients would convert to String.
Let's just cut out all the confusion and make it return String. :^)
|
|
It was previously not possible to unset the wallpaper once set,
since loading an image from the path "" would always fail.
|
|
|
|
Since we're putting this on top of the wallpaper preview, let's make
it white with a black shadow to ensure that it's always readable.
|
|
The buffer returned by read_line() used to be null-terminated, however
that was changed in 129a58a, resulting in some line strings containing
garbage data. Explicitly telling the String constructor the buffer's
size fixes that.
Fixes #4397.
|
|
50px is a bit extreme, it's down to 26px high now. Still a bit larger
than a regular GUI::TextBox but enough to look decent, even with the
help button in there.
Closes #3905.
|
|
Moved the same copy/paste/properties/delete functionality used in the
run_in_windowed_mode() method to the run_in_desktop_mode() method.
|
|
The focus_dependent_delete_action that sits in the file manager's
toolbar would always remain enabled, even if nothing was selected,
activating it if nothing was selected would then crash the application.
The action is now correctly enabled/disabled, but due to the way
selection works in TreeViews, something is always selected, what really
matters is if the TreeView has something selected, and it has focus.
As it currently stands, there is no way to know when the TreeView's
is_focused status changes. In order for this to work I added a callback
to the Widget class which fires when a widget receives or looses focus.
In that callback, the focus_dependent_delete_action's enabled value is
recalculated.
|
|
|
|
If loading the WindowServer config fails or we get a value other than
"simple", "center", "tile", or "scaled", DisplaySettings would crash
when changing the wallpaper image.
Fixes #4360.
|
|
|
|
TreeViews using FileSystemModels collapse whenever the file system is
changed in anyway. This includes creating, dragging, deleting or
pasting any files/folders. This commit updates the refresh_tree_view()
lambda, which seems to have stopped working at some point, and calls it
whenever any of the actions mentioned above are activated.
|
|
They should only receive focus when tabbed to. This matches what we
already do for other toolbar buttons.
|
|
|
|
Files can now be dragged into the window and loading errors will be
handled more gracefully.
|
|
|
|
I was looking through the proc folder, noticed this and thought
"why not?"
It's setup as an updating model because of the call count, however,
the call count doesn't appear to be working right now.
|
|
|
|
Make drag-selection the default behaviour, allowing (almost) any part of
the cell to initiate a select.
a small 5x5 rect at the corners of a cell can be used to initiate a
drag-copy instead.
Fixes #4268.
|
|
To initiate drag-to-select, the user can move the mouse to near the edge
of a cell, and click-and-drag when the cursor changes to a crosshair.
Fixes #4167.
|
|
Otherwise changes to the widgets would cause all sorts of updates on
half-deleted cells.
Fixes #4171.
|
|
...as the initial stroke that begins an edit.
This is still imperfect, as it completely ignores selections.
Fixes #4168 (sort of).
|