This change will remove any string-literal keys from
non-API `BMessage` assembly and interpretation logic.
It will also make the keys consistently use lower-
snake string format and will setup the key constants
in a common style.
Change-Id: I246613d1e88a54fd275f45c55a52c4e9b2ac67e9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10216
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This change addresses a number of issues around the synchronization
of data from the server when the user is viewing a package.
Handling of issues when the server is not network accessible is
improved. The user is also given the option is disable network
communications as problems are reported to them.
Resolves#19802
Change-Id: Iaa8214ba279a6bbf0f196643468d0f86a23ead1c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9714
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
This commit is a large "big bang" commit of a composite of changes
that would have been challenging to put in place over a PR train.
The changes yield a significant performance improvement in general
but also lay the foundation for being able to make further smaller
gains over time. The changes should also improve stability of the
application. This commit is a high-risk change and would ideally
be coupled with testing.
The key things which have changed in this commit;
- Code reformatting has been applied at the same time.
- Data models are now largely immutable with builder-style
constructors.
- The code base was previously handling locking of data obtained
from the central model manually in many places which was
prone to mistakes. Now accessing data is, from the clients'
perspective, largely lock-free.
- The removal of locks now removes lock-contention in various
areas of the application including startup which helps with
improving performance.
- Repositories of data such as categories and languages are
now also immutable.
- To simplify data immutability, packages' data is stored in the
central model separately from depots' data.
- Large package data mutations are now done in chunks of packages
rather than package-by-package which means reduced messaging
within the application; especially around the GUI.
- The resolution of data / mutations' notifications is larger
so that changes are not being considered on each property of
a package which simplifies the processing logic in a number of
places.
- Package change-notification is driven out of the central model
rather than from each and every package. There is scope for
further simplification in this space.
- Where logic already knows what data is changed, it is able to
control the change-notification process rather than cause a
large number of object-comparisons to be required.
- The data-loaders from the local package manager and from HDS
have been re-written to work with immutable models.
- The icon repositories have been re-written to make a one-time
notification that icons have changed rather than notify for
every package.
- Data updates reflection in the UI has been changed to work in
chunks of packages rather than package by package which
reduces the quantity of UI window-invalidation / redraws and
also reduces the quantity of re-calculation of scrollbars and
other UI elements.
- Some UI elements have their metrics calculated lazily rather
than up-front which yields a significant performance gain.
Change-Id: Iefaf4a137411e379e4c461ebc8c783fd1646bcf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9093
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Andrew Lindesay <[email protected]>
This change will allow the BColumnListView to have
multiple rows added or removed at the same time.
Without this, applications using the BColumnListView
will need to add and remove rows one by one which,
for longer lists with complex columns, is a
performance problem; an example being HaikuDepot.
Note that this change does not amend the formatting
style on the class's source.
Change-Id: I72303c8b069b686251c3a65af7ae45c8884d5637
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9056
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Andrew Lindesay <[email protected]>
Breaks out some of the core data about a
package into a sub-model to later support
immutable models.
Change-Id: Ib75ba24c6848829c835199130fe58b0f2d6ebcde
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8587
Reviewed-by: Andrew Lindesay <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Changes to the package model to factor-out
screenshots, to adjust the notifications and to
adjust depots so that packages cannot be added
more than once under the same name.
Change-Id: I2f9219a1cbc0f42631bddff00852c447fd66c929
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8563
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
The HaikuDepot application has an icon to show
that it is installed. This has a transparent
tick inside which in this commit is changed to
be a white filled tick.
Change-Id: Ib36c43d9ca63244d8409889e760d0f38e0016f4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8509
Reviewed-by: humdinger humdinger <[email protected]>
A recent change was merged prematurely before
the server component was rolled out. This
will disable the change with some side-effects
but can be easily re-instated once 1.0.166 of
the server is deployed.
Change-Id: Idbd429a94e63cbe401b85698f82fe027d6212854
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8471
Reviewed-by: Jérôme Duval <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
The user rating summary should be calculated
on the server and not in the client and the
model should be factored out of the main
package model for later performance
improvements.
Change-Id: Ia2e4e5f9d98051ff3a64006c642fef8de9149c3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8468
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
The drawing code in the package list view is now
unified with other places where the rating stars are
being displayed.
Change-Id: I6a8fef51a6ddc57d10cd62a98a26a65de9cd91c6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7879
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Fix aspects of HaikuDepot's UI that do not scale when
the font size changes to accommodate a high resolution
monitor.
Change-Id: I105ebfe5a8f501cd7ffc22822438147ba07382a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7844
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
HaikuDepot had an image loading system that was well
suited to handling standard icon sizes on standard
unscaled resolution displays. The new mechanism
introduced in this commit will better support UI
scaling in the application.
Change-Id: I23a4c31387fa35f62d8ed18e411b89444c966a2f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7794
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
HaikuDepot has its own text-engine. This change will allow
the text-engine to have text pasted into its view.
Change-Id: I639cf0ba4fa42a0130af0a4dc169f0f2e585765d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7723
Reviewed-by: Jérôme Duval <[email protected]>
Visible in HaikuDepot when the font is scaled, the placement
of the BColumnListView is broken owing to the calculation of
the height of the scrollbar being based on a constant.
Fixes#17900.
Change-Id: Id34138feb491618a4c685b7cdb88b875e3ec5329
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7726
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
HDS is soon going to be enhanced to deal with more than
just the two-character ISO language codes that it
currently supports. The logic in HD is currently expecting
that HDS will only supply these two character codes. This
change is about making adjustments to be able to cater to
any ICU language IDs from HDS.
The naming in HDS is still going to continue to use the
terminology that it currently does; it will call the
identifier for a language a "natural language code". The
HD source will instead reflect the nomenclature of ICU
and call the same thing a language ID.
Change-Id: Ib138c2e3b7b667edf15cd497c2f710f80b3c29f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7424
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Niels Sascha Reedijk <[email protected]>
Rework the way in which the application deals
with screenshots so that there is a repository
of screenshots that is referenced from
identifiers on the package model and not that
the screenshot bitmaps are stored with the
model and not cleaned up.
Change-Id: I632def96852a518b3f6b1c8b81909de117bbbc54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7296
Reviewed-by: Andrew Lindesay <[email protected]>
The old depot / repository "url" was renamed as
"identifier" some years ago. This field seemed
to remain as "url" and is now corrected.
Change-Id: Icd1390745311030e3fd57b852de91ed69b326496
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7190
Reviewed-by: Adrien Destugues <[email protected]>
The data model for packages contains a number
of components which all reside in a single
source header and implementation file making
maintenance and modifications difficult. This
change will break the sub-models out into
separate files without making any functional
changes.
Change-Id: I9c2557bc1e5a33661145c55290a0baad4084fd49
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7181
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This change includes some changes to the
generated DTO models between HaikuDepotServer
and HaikuDepot which should improve
performance.
Change-Id: I74c6014f8115aa0a55907a24b6115dd48d341794
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7165
Reviewed-by: Jérôme Duval <[email protected]>
Without functionally changing the generated
code, create a new mechanic for generation
in order that improvements can be later made.
Change-Id: Ieb420f2eb0fee51c266ab2e0734ec5c298640cfa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7156
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Without functionally changing the generated
code, create a new mechanic for generation
in order that improvements can be later made.
Change-Id: If5b755ebd257658ab0e0a0045dd21a464b429c09
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7135
Reviewed-by: Adrien Destugues <[email protected]>
This change will reduce the quantity of small requests
to increment the character assembly buffer when parsing
JSON.
Change-Id: I0998f6fb403bf6dc4736585bb69a103f3976a448
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7115
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This change will move the loading of packages' file size
to a latter phase as HaikuDepot starts up as a separate
step. This way it can only load sizing for those packages
which do not have a size from HaikuDepot Server -- which
should be very few. This gives a circa 10-15% performance
improvement on the phase where the local HPKR catalogue
of packages is populated.
Change-Id: I52055ecaa79f9819e70b469134e5b94636f02b13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7095
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
To make it easier to understand what process
elements are taking a long time to run, a
small simple report is output as debug log
at completion of a process.
Change-Id: I09b93c494961e7abbbd22a3c58c64631f08025af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7075
Reviewed-by: Jérôme Duval <[email protected]>
Previous changes removed the ability to supply
control characters at the start and end of a
nickname; this change removes them from anywhere
in the nickname when supplied.
Change-Id: I0631fffa8aaf2c0e267c777892044c53faa4334e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7071
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
If the user happened to enter control characters into
their username when authenticating then the username
may cause problems later when communicating back to
the server. This is a hard problem to diagnose and
this commit will remove the problem.
Change-Id: Iad3c24f16cc6799ad8ddad634b8621a0aaadb921
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7067
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
From time to time there is a segfault seemingly coming from the log
macros. This seems to be coming from some logic to get a single
character to denote the level of the log line. This commit simplifies
that expression which seems to have resolved the problem.
Change-Id: I8d5325feb6d534ec38c653397585318b5dcbad39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7057
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
On startup the application will check a users' credentials work; if
not then it will log them out. This was broken after the move to
token-based authentication and this commit will fix that.
Change-Id: Ic9460b668422312ed5a856a92c5b99d9bd724801
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7056
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Owing to the larger number of files involved, reducing the `stat`
operations from two to one seems to make some difference to the
performance.
Change-Id: Ia4f92e23a90967bbd12735a81be8ceecc605e385
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7055
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This switches the application over from using basic
authentication to using token-based authentication in
preparation for later using Open-ID based
authentication flows. The application version is also
bumped in order that the server can detect this version
at some later date in the future when it no longer
supports basic authentication itself.
Change-Id: I7addde1d57503c58d6bcd54908f22f66830c0c59
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6944
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
HDS has increased the length of the nickname to
32 characters on version 1.0.147 and this change
supports that change in the desktop client.
Resolves to #18343
Change-Id: Iae07acc165165e91b04cef7ebc1190d241d9a053
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6307
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Performs the increment of the view counter
after a delay of three seconds; otherwise
a number of "false views" can be stored as
people use keyboard navigation.
Relates to #16879
Change-Id: I6f3440e1e3132c832cd807e48105022d22df9abf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5356
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
The MainWindow itself was a BReferencable via a listener
virtual class. It looks like the error has come from a
conflict between the MainWindow's own deletion and the
state of the reference count. This change moves the
listener / BReferencable out of the MainWindow so that
the lifecycle of the BReferenable can be managed
correctly.
A further problem here is that the new listener
was leaked from the MainWindow class on shutdown.
To resolve this problem requires a considerable
change to the "process coordinator" system.
Fixes#17689
Change-Id: I7230843ba05537015f4a597b4a616b96c6db3dde
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5285
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Andrew Lindesay <[email protected]>
Resolves an issue where package version dates are not
updated in the UI as they are updated in the model.
Change-Id: Ic21954f91abb9c6f9bf0907500e189215adb70de
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5333
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Some APIs will require the repository source
code to be sent in the future instead of the
repository code. This change prepares for
this.
Change-Id: Iccf0baca077ab81356ed81c18d14122a5b0dacec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5137
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
The scrollbar on some areas is misaligned
with the window frame. This change will fix
this. The class that implements the scroll-
view is also shaded by two class definitions.
This is also fixed by breaking the definition
into its own file.
Fixes#16169
Change-Id: I71372906e165672c9b697ab98181ecfb1b09fb43
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4849
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Add a column to the table to show the publish
date. Also add text on the featured packages
view to show the publish date. Supports
sorting.
Fixes#13006
Change-Id: I19d9bc5bf7f44b5673c2ade5d00de8fdadbe1b06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4649
Reviewed-by: humdinger <[email protected]>
Reviewed-by: Andrew Lindesay <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Improvements to the shutdown handling mechanics so that
if there is an install etc... happening when the
application is quit that it will wait until the process
is complete before actually terminating.
Change-Id: I8d3c4fbd9de0abc9382d55f0a6955b7f63a36637
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4322
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This switches to a new API format "v2" being introduced
on HDS. The version of the application is also bumped
at the same time in order to make a later cut-off point
possible for compatibility.
Change-Id: I577fd143ac9d001171bca7213c82e3280af1c4de
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4217
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This update will mean that HaikuDepot is able to detect
install / uninstall actions on packages at the system
level and reflect this in the user interface.
Fixes#15879, #15994 and #15046.
Relates to #11674.
Also cleans up disused code in the WorkStatusView.
Change-Id: Ide2d5d93c2f71915bc7cfe7d3628e5f343e43f35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4145
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Update the package server so that it reports the
added and removed packages when it commits a
change so that clients are able to pickup and
act on the changes without iterating over all of
the packages.
Change-Id: I6feb52c34fc51a78e2282d8d5ca6cb6775b221ca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4141
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Unify the background processing in the
application to one system and refactor
the package actions. This won't fix
any specific current issues with this
area, but lays the ground for later
fixes.
Change-Id: I098b81e7afc4aeb883bddf1acfc01f7888134257
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3997
Reviewed-by: Andrew Lindesay <[email protected]>
Updates BNumberFormat to be able to format
percentages. Also re-introduces some unit
tests and updates the BNumberFormat ones.
This doesn't actually fix#16312 as the
defaults for percentage formatting don't seem
to track the selected language, but goes part
way there.
Related to #16312
Change-Id: Id6ddf426ce5571f4e8513c0eb1663cf42ac53cb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3767
Reviewed-by: Adrien Destugues <[email protected]>
The invalidation logic for when packages are
added or removed from this view was broken. The
new approach involves demarcating the mutation
of the data with a begin operation and
terminating it with an end operation with the
view invalidation happening in the end operation.
Resolves#16260
Change-Id: I012610c72714323cc2f7471ad05cc758d9127ef0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3764
Reviewed-by: Adrien Destugues <[email protected]>
Further removal of the use of custom list class;
this time part of the test engine inside HD.
Relates To #15534
Change-Id: Ia1f1d7c2577f92bba96da392fd48949a13b5a169
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3745
Reviewed-by: Adrien Destugues <[email protected]>
To avoid having to upgrade cache-data formats,
drop the caches when the application starts with
a different version from last time the
application launches.
Change-Id: I2f5b831b6a4fc570457bc633fd440a9021648b02
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3749
Reviewed-by: Jérôme Duval <[email protected]>
Further removal of the use of custom list class;
this time with the generic undo functionality.
Relates To #15534
Change-Id: I804a31abc07f42f4f1695562b6f948feb465db0c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3739
Reviewed-by: Adrien Destugues <[email protected]>
Further removal of the use of custom list class;
this time with the package action lists.
Also resolve an error created by a last minute
change in the last pull request for this ticket.
Relates To #15534
Change-Id: I85dd40b7ef664f93b24ca5041fa58cca17d72299
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3735
Reviewed-by: Adrien Destugues <[email protected]>