Commit Graph
100 Commits
Author SHA1 Message Date
Andrew Lindesay 363fc60bf3 HaikuDepot: Factor out Filters from Model
Non-functional change to factor the package filters
from the main model for the application.

Change-Id: I58f741c4491baba8afd5dd6e32bb0f7cdf64938f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7896
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-07-22 16:57:28 +00:00
Andrew Lindesay 3dbcc10023 HaikuDepot: Unified Rating Star Drawing
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]>
2024-07-19 12:35:21 +00:00
Andrew Lindesay 05bd1a31dc HaikuDepot: Resize Shutdown Window
The shutting down window should scale with the
layout manager.

Closes #17916

Change-Id: I3ec86af91d13de9fb7feae338dfcb35c2ae119ca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7880
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-07-18 15:00:12 +00:00
Andrew Lindesay 2060f156e8 HaikuDepot: UI ScrollView Scaling
Fixes #7844

Change-Id: I70d1e4980bbcc10f68e264d35c5dc77bff981200
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7876
Reviewed-by: nephele nephele <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2024-07-18 09:24:49 +00:00
Andrew Lindesay c3cad23617 HaikuDepot: UI Scaling
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]>
2024-07-17 22:32:57 +00:00
Andrew Lindesay 66ee6532aa HaikuDepot: Image loading
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]>
2024-07-02 18:04:03 +00:00
Andrew Lindesay 50fc99b8a5 HaikuDepot: Ratings scroller
Fix an issue where the scrollbar on user ratings
was not adjusting to the length of the ratings.

Change-Id: I690f4cbef0cdd88dd7540b47889166e0b3bf513d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7819
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-06-28 15:27:08 +00:00
Andrew Lindesay 6a0e78e576 HaikuDepot: Fix vertical scroller
The package rating comment field was not adjusting
the vertical scroller as the text was being edited.

Change-Id: Ic84c72a126fae5ce9a9ab8930fa13d426b513ed9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7782
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: Axel Dörfler <[email protected]>
2024-06-15 08:41:46 +00:00
Andrew Lindesay 6846b8ea7c HaikuDepot: Fix crash on early quit
Change-Id: Ic3173f9be7cf2dd387f5f1e4fc67333399ea0595
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7778
Reviewed-by: Jérôme Duval <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-06-14 20:19:48 +00:00
Andrew Lindesay c4e439b5a5 HaikuDepot: Allow paste into text view
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]>
2024-06-14 11:11:00 +00:00
Andrew Lindesay c1cc7751a7 ColumnListView: Status view w/ scaling
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]>
2024-06-12 16:34:24 +00:00
Andrew Lindesay 75a70554d9 HaikuDepot: Pkg name on window
When HaikuDepot is opened to view a specific HPKG file,
then show the name of the package in the window title.
Closes issue #18909.

Change-Id: Ib8095ef818dd3dc62b06cbc217f2056f36c8ac46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7721
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-06-10 16:33:06 +00:00
Andrew Lindesay 6498155189 HaikuDepot: Add rating; escape
Simplify logic around escape closing the add
rating window

Change-Id: I74dd5bf29e462d6b06deef3977acf30b033d5c71
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7722
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-06-10 16:32:43 +00:00
Andrew Lindesay 7a5148b345 HaikuDepot: Remove email
The email on the program listing has never been used.
This change removes this. Closes issue #18274.

Change-Id: I45c679059b334d25c892bfbb6010e0821a84ac38
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7720
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-06-10 16:30:52 +00:00
Andrew Lindesay b982aa1d99 HaikuDepot: Version bump
Change-Id: I55bbf400c3db822e71253cf8e94520e5d0423f9c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7538
Reviewed-by: Jérôme Duval <[email protected]>
2024-03-21 10:35:39 +00:00
Andrew Lindesay 43e19c4715 HaikuDepot: Fixes for Language Handling
Change-Id: Ic6d5a59396f778f684985fad0e39985197c380b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7524
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-03-18 04:10:28 +00:00
Andrew Lindesay 866b1c0efe Locale : Tests for lang parsing
Additional tests for parsing the language from
an ID.

Change-Id: Ia22b5e528a0dd9bdf10f3f060b01429fc95a799b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7517
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-03-11 14:13:29 +00:00
Andrew Lindesay bf866d5ef7 HaikuDepot : Improve Language Code Handling
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]>
2024-03-02 20:55:05 +00:00
Andrew Lindesay 23cfed803a HaikuDepot : Fix Compile Warning
Change-Id: I210da9a98a7e97398c4a1789683392864b16f3ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7405
Reviewed-by: Jérôme Duval <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-02-17 21:32:04 +00:00
Andrew Lindesay 88af15cfbd HaikuDepot : Refactor Screenshots
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]>
2024-01-21 09:26:50 +00:00
Andrew Lindesay b72cc7f405 HaikuDepot : Fix Compile Warnings
Change-Id: I3f44eb33d26c1236de2b132a27ca3ad4ddb0bbc1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7298
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-01-11 09:20:37 +00:00
Andrew Lindesay 2af0f027cb HaikuDepot : Rename Depot Url to Identifier
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]>
2023-12-08 10:09:36 +00:00
Andrew Lindesay 13bbb4d8f2 HaikuDepot : Break Out Pkg Model
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]>
2023-12-07 19:01:54 +00:00
Andrew Lindesay ba1465cc86 HaikuDepot : Faster DTO Models
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]>
2023-11-30 19:22:03 +00:00
Andrew Lindesay 2174e23fcb HaikuDepot : New Parser Generation Script
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]>
2023-11-27 20:00:16 +00:00
Andrew Lindesay 45f8be4190 HaikuDepot : New Model Generation Script
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]>
2023-11-24 16:34:08 +00:00
Andrew Lindesay 916c6d9492 Shared : Larger buffer increments
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]>
2023-11-20 08:34:54 +00:00
Andrew Lindesay 35c4600e21 Shared: JSON Parse Perf
Improve the mechanics for JSON parsing by reusing
text buffers during the parse.

Change-Id: I7fb2cae31e6558a5a0c63fd02e1fc6fec4f9e4b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7106
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2023-11-16 20:38:21 +00:00
Andrew Lindesay 4cd60e77fe HaikuDepot: Buffered Reads for JSON Parse
Reduce the number of small reads into a file
for JSON parse by buffering the data.

Change-Id: Iae8030a72daec358968cd2edf5f95510194a2f68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7096
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-11-08 18:11:10 +00:00
Andrew Lindesay c110a5ebf9 HaikuDepot: Loading Pkg File Size
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]>
2023-11-06 13:37:28 +00:00
Andrew Lindesay 3538133f9f HaikuDepot: Log Process Report
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]>
2023-10-29 23:29:42 +00:00
Andrew Lindesay e526b61813 HaikuDepot: Avoid Corrupt Username (2)
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]>
2023-10-27 11:15:07 +00:00
Andrew Lindesay b02777c1a8 HaikuDepot: Avoid Corrupt Username
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]>
2023-10-26 16:44:38 +00:00
Andrew Lindesay 08a5804d6f HaikuDepot: resolve occasional segfault in logging
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]>
2023-10-19 15:41:20 +00:00
Andrew Lindesay bf697877c1 HaikuDepot: fix issue for user check
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]>
2023-10-19 15:40:52 +00:00
Andrew Lindesay 338b492e0e HaikuDepot: minor performance improvement
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]>
2023-10-19 15:23:00 +00:00
Andrew Lindesay 4b347fccb2 HaikuDepot: Token Based Authentication
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]>
2023-09-25 06:20:32 +00:00
Andrew Lindesay 86ee86f5a9 HaikuDepot: Nickname Length
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]>
2023-04-08 15:55:28 +00:00
Andrew Lindesay b6356b9116 HaikuDepot: Password Requirements
Obtains HDS's password requirements and displays
those to the user when creating a new account.

Relates to #13986

Change-Id: I1b76181e17bc03e9baf915dadcd3c45f9eb89b3f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6203
Tested-by: Automation <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-03-21 21:04:16 +00:00
Andrew Lindesay ffc2227f28 HaikuDepot: Fix Changelog
Fixes #17968

Change-Id: I9952f0eddb751f0355beb1f9b020fd47be8e7f2d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5717
Reviewed-by: Axel Dörfler <[email protected]>
2022-10-06 09:23:28 +00:00
Andrew Lindesay 8d18358cdf HaikuDepot: Fix Image Rendering
Resolve an issue with rendering package
icons when "Disable user addons" is
turned off.

Relates to #17862

Change-Id: Ic2d17626c40a97598613b8f21218d6829de97bbf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5556
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jacob Secunda <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2022-08-31 01:16:37 +00:00
Andrew Lindesay 8467457050 HaikuDepot: Delayed Increment View Counter
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]>
2022-06-06 07:29:17 +00:00
Andrew Lindesay 409af93462 HaikuDepot: Fix Crash on Shutdown
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]>
2022-05-31 06:15:02 +00:00
Andrew Lindesay 7d137fd96a HaikuDepot: Issue with Version Dates
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]>
2022-05-23 20:25:23 +00:00
Andrew Lindesay f6e2256327 HaikuDepot: Send Repository Code on API
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]>
2022-03-29 15:44:52 +00:00
Andrew Lindesay f67e053883 HaikuDepot: Size Package Files
Obtain the size of local package files.

Fixes #17445

Change-Id: Ica15d3f7c1e80bcf9b3b23d6af851cc33b5b6253
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5016
Reviewed-by: Andrew Lindesay <[email protected]>
2022-03-16 00:31:52 +00:00
Andrew Lindesay c580ec7312 HaikuDepot: Fix Scrollbar
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]>
2022-01-11 20:09:35 +00:00
Andrew Lindesay 0d4fa3e526 HaikuDepot: Show Publish Date
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]>
2021-10-27 05:27:53 +00:00
Andrew Lindesay 7f86c21945 HaikuDepot: Fix language selection
Fixes a problem that can arise with the
selection of language when adding or
editing user ratings.

Fixes #11316

Change-Id: I85625cdc156458d88f4d1ca01ae889d954364ffd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4511
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2021-09-29 15:48:38 +00:00
Andrew Lindesay afe7affb47 HaikuDepot: Fix Local Pkg Install
Fixes #17186

Change-Id: I85e54c0261a7338ec2baeaff6b0905f77087171a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4358
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2021-08-24 08:27:34 +00:00
Andrew Lindesay 95c7b01864 HaikuDepot: Shutdown Handling
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]>
2021-08-08 08:09:05 +00:00
Andrew Lindesay 21df7324c9 HaikuDepot: Switch to v2 API
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]>
2021-07-21 07:52:13 +00:00
Andrew Lindesay 0ebb9177d8 HaikuDepot: reflect package install changes
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]>
2021-07-14 18:23:10 +00:00
Andrew Lindesay f32d5c5ca5 Packages: signal added|removed packages
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]>
2021-07-03 21:01:37 +00:00
Andrew Lindesay a18f873f8b HaikuDepot: Background Processing
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]>
2021-06-25 09:20:23 +00:00
Andrew Lindesay 133ebab62c HaikuDepot: Increment Pkg View Counter
Closes #16814

Change-Id: Idf451628b4680fb33563dbf4817bd11049c326b5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3803
Reviewed-by: Jérôme Duval <[email protected]>
2021-03-22 07:13:43 +00:00
Andrew Lindesay 564de1924a Locale: Support for Percent Formatting
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]>
2021-03-13 00:29:32 +00:00
Andrew Lindesay dfbcbde1e1 HaikuDepot: Remove Custom List
Closes #15534

Change-Id: I23fa60145607c3e8f25552f24c5e2c630b940537
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3758
Reviewed-by: Adrien Destugues <[email protected]>
2021-03-11 08:34:16 +00:00
Andrew Lindesay 0b69420bc8 HaikuDepot: Fix Redraw Featured Pkgs
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]>
2021-03-08 10:50:36 +00:00
Andrew Lindesay d13981d199 HaikuDepot: Fix Open Button
Resolves #16826

Change-Id: Id7d32a1a4c7d776f462817f72bcb80377452f5f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3763
Reviewed-by: Adrien Destugues <[email protected]>
2021-03-06 10:30:24 +00:00
Andrew Lindesay 3d2fd2acaf HaikuDepot: Remove Custom List
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]>
2021-02-28 11:17:30 +00:00
Andrew Lindesay 64a0ec2d3e HaikuDepot: Add HTTP Header for JSON-RPC
Change-Id: Ibdc112378870cb29770b7938bc8d80631009c03e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3750
Reviewed-by: Jérôme Duval <[email protected]>
2021-02-26 19:04:34 +00:00
Andrew Lindesay 02ccdc6fa1 HaikuDepot: Drop Caches on Version Change
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]>
2021-02-23 18:19:52 +00:00
Andrew Lindesay 1403313c7f HaikuDepot: Remove Custom List
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]>
2021-02-10 08:22:34 +00:00
Andrew Lindesay 6f07fead0c HaikuDepot: Remove Custom List
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]>
2021-02-07 08:54:48 +00:00
Andrew Lindesay d75b4d610d HaikuDepot: Remove Custom List
Further removal of the use of custom list class;
this time with the package lists.

Relates To #15534
Change-Id: I1f01ed9d5ddbd7754097ce0adbf505d6ba17fd2f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3732
Reviewed-by: Adrien Destugues <[email protected]>
2021-02-06 19:45:53 +00:00
Andrew Lindesay 9984ca59f6 HaikuDepot: Remove Custom List
Further removal of the use of custom list class.

Relates To #15534

Change-Id: I1d84b562b334e5e52ed4772bad3a6aea7b715562
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3657
Reviewed-by: Adrien Destugues <[email protected]>
2021-01-28 07:20:04 +00:00
Andrew Lindesay cb8472235b HaikuDepot: Screenshot List
Remove the use of custom list class related to
screenshots on a package.

Relates To #15534

Change-Id: I8289c25ef0ab5a6715dd9c6c83b6602a25d2f544
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3549
Reviewed-by: Adrien Destugues <[email protected]>
2020-12-27 19:32:57 +00:00
Andrew Lindesay 5b1ae51c6b HaikuDepot: Memory Leak Fix
Change-Id: Ibd311d10009484ba834843149740c5a11f283202
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3500
Reviewed-by: Stephan Aßmus <[email protected]>
2020-12-13 10:07:22 +00:00
Andrew Lindesay 027d608682 HaikuDepot: LRU Cache for Icons
Only keep a fixed number of icons in memory at once.

Completes To #15370

Change-Id: I23e3a4fa7559894034f45afb3b536910ea037078
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3367
Reviewed-by: Rene Gollent <[email protected]>
2020-11-15 20:16:14 +00:00
Andrew Lindesay 4cd33fec63 HaikuDepot: Fix x86gcc2 Build
Change-Id: I06c94f6c09f9a4fdec3dc22a2da704225a7845c5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3345
Reviewed-by: Jérôme Duval <[email protected]>
2020-10-22 20:39:17 +00:00
Andrew Lindesay a5e4976d39 HaikuDepot: Lists; Categories + Stabilities
Remove use of custom list class where it is not
really required in the area of Categories.  Also
introduces stabilities relayed over from the
Server and used in the HD user interface instead
of being hard-coded.

Relates To #15534

Change-Id: Ib71141e71cd4a0b4882827e2e59b62072de01b4b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3331
Reviewed-by: Jérôme Duval <[email protected]>
2020-10-22 08:51:25 +00:00
Andrew Lindesay 05880d133e HaikuDepot: Custom List Removal (Depots)
Remove use of custom list class where it is not
really required in the area of Depots.  Also
convert the use of Depots to be wrapped in
BReference to match other model objects. At the
same time some data-loading logic has been
simplified.

Relates To #15534

Change-Id: Ie6fcc35f258a0c69c44990e4b09f6c32ec79945d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3225
Reviewed-by: Rene Gollent <[email protected]>
2020-09-21 20:49:37 +00:00
Andrew Lindesay 4af3fbf906 HaikuDepot: Lists & Prominences
Use BStringList instead of bespoke List class for
lists of strings.

Also fix the prominences so that the sort
ordering in the featured packages uses the sorting
algorithm properly.

Relates To #15534

Change-Id: I56e67931aa08e6bfee6d2be21a459152216790e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3232
Reviewed-by: Adrien Destugues <[email protected]>
2020-09-18 11:59:16 +00:00
Andrew Lindesay 963ebbca4f HaikuDepot: Icon / Tarball Handling - Fix
Resolves #16523

Change-Id: Ied52904da51455fe164cda93daecde6dc3e051d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3219
Reviewed-by: Adrien Destugues <[email protected]>
2020-09-15 08:22:47 +00:00
Andrew Lindesay f0e491d390 HaikuDepot: Icon / Tarball Handling
Instead of exploding the tar-ball of icons from
HDS, keep it as a tar-ball, index it and read
data directly out from specific indicies on demand.

This will speed up the process of downloading
the icons by removing the unpack.  Also updates
will be faster by avoiding the need to delete the
old icon files.

Because icons are loaded on-demand, the start
time is faster by avoiding all the icon loads.
There are also savings on memory consumption.

Indexing on each load is surprisingly fast so
no external index is maintained.  Likewise for
the tar-balls's meta-data.

This commit does not cover the implementation
of an LRU cache of the icons in memory.

Relates to #15370

Change-Id: Ia1647d8c805be89618f493d2592bf7877fca3f14
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3205
Reviewed-by: Adrien Destugues <[email protected]>
2020-09-12 23:06:24 +00:00
Andrew Lindesay fa5c8097c9 HaikuDepot: Languages List
Abstacts the list of supported languages into
the LanguageModel class preventing use of
List.  Also; fix a few cases where newer
logging techniques may have caused incorrect
logic flow.

Relates To #15534

Change-Id: I144fe4788abdaf0d93e53eeabc97b3f7aa2ec710
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3085
Reviewed-by: Adrien Destugues <[email protected]>
2020-07-30 07:09:55 +00:00
Andrew Lindesay f96d1f4d92 HaikuDepot: Better Logging
Changes the logging in HD to use a macro for the
various log levels to declutter the code and to
make it easier to more systematically log.

Change-Id: I025970707a0a11e7e3aaa4b52fc91288af0183f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3018
Reviewed-by: Adrien Destugues <[email protected]>
2020-07-15 08:34:22 +00:00
Andrew Lindesay 9295c1f645 HaikuDepot: Url -> Identifier
This change will rename the confusing "url" within
HaikuDepot to be "identifier" in line with
corresponding changes in pkg kit and HDS.  Also at
the same time support is introduced for HDS
repos' meta-data to artificially match against
multiple repos; as requested for the future R1B3
release process.  Some tidy-ups and extensions have
been made to the JSON schema-to-model and the
schema-to-parser scripts.

Change-Id: I402e7d610986039f58d72028bda7de977e9115e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2986
Reviewed-by: Adrien Destugues <[email protected]>
2020-07-05 09:41:54 +00:00
Andrew Lindesay 66a4cd11c2 HaikuDepot: Custom List Removal
Remove use of custom list class where it is not
really required.

Relates To #15534

Change-Id: I4bdc258a64055b6e36c7be93672c52d0499e512b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2991
Reviewed-by: Adrien Destugues <[email protected]>
2020-07-05 09:13:38 +00:00
Andrew Lindesay dc8d6e73f8 HaikuDepot: Custom List Removal
Remove use of custom list class in the python-
generated model classes for interaction with
HDS; use STL container classes instead.

Relates To #15534

Change-Id: Ib8f4942b55859c1af38da816591e911174ba52ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2957
Reviewed-by: Adrien Destugues <[email protected]>
2020-06-28 08:39:20 +00:00
Andrew Lindesay 991d1a2097 PackageKit: HPKR BMessage Format Fix
Some older repositories are having problems because
they are configured with a `url` (identifier) form
that is not actually a well-formed URL.  This caused
problems when it was then interpreted as the
base-url because it did not start with "http".  I
have changed this so that the base-url is not
derived from the url and can be missing.

Resolves #16149

Change-Id: I10acd8db65082ff6c72fcff1550eb63475e86133
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2931
Reviewed-by: waddlesplash <[email protected]>
2020-06-20 18:30:20 +00:00
Andrew Lindesay 82f985c036 PackageKit: HPKR BMessage Format Fix
Some older repositories are having problems because
they are configured with a `url` (identifier) form
that is not actually a well-formed URL.  This caused
problems when it was then interpreted as the
base-url because it did not start with "http".  I
have changed this so that the base-url is not
derived from the url and can be missing.

Resolves #16149

Change-Id: Ic972fde43f99466db9d5ea2325c0e77cf7d4aad5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2886
Reviewed-by: Adrien Destugues <[email protected]>
2020-06-09 08:32:30 +00:00
Andrew Lindesay 16f2f8eb81 HaikuDepot: Contents for Local Pkg (b)
Fixes a bug where contents are not displayed
for local files that are not installed.

Resolves #16161
Change-Id: I27abfd78bf7882b1961f8d9c6ade30d4c15ec2ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2865
Reviewed-by: waddlesplash <[email protected]>
2020-06-02 23:02:29 +00:00
Andrew Lindesay 6178aeb315 HaikuDepot: Contents for Local Pkg
Enables the content tab for showing contents of
on-disk, but not yet installed package.

Resolves #16161

Change-Id: I5e4764cf3e9f1e46eafb3d98917a357fece854dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2853
Reviewed-by: waddlesplash <[email protected]>
2020-06-01 00:32:16 +00:00
Andrew Lindesay d309d94089 HaikuDepot: Refresh Repo Cache
When HD first loads in a new install, it will experience
a near-empty set of repositories.  This is because only
build-time repo caches are present.  This change will
cause HD to pull data from remotes on first load, in the
case that the cache is somehow missing and on a user-
initiated update.

Resolves #14840

Change-Id: I4f0e6c9fdba4141841cc167d7953967edb526033
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2821
Reviewed-by: waddlesplash <[email protected]>
2020-05-30 02:33:19 +00:00
Andrew Lindesay 8c6ebdec76 HaikuDepot: Changelog & Contents Tabs
Disable the changelog tab in the case that a package
has no changelog.  Also disable the contents tab and
do not attempt to load the package contents in the
case where a package is not installed on the host.

Resolves #15299

Change-Id: Id17daf46aba6709f35438db2ee30f3485fc251ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2749
Reviewed-by: humdinger <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2020-05-28 02:46:54 +00:00
Andrew Lindesay 548467a97d HaikuDepot: Alert Naming
Change capitalization in the titles of alerts.  Change
alerts' warnings to avoid the word "Haiku".

Resolves #16117

Change-Id: Id9aacf83d7e8364a1e9b0bfa9a98532108f906e3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2808
Reviewed-by: waddlesplash <[email protected]>
2020-05-25 16:04:12 +00:00
Andrew Lindesay f95ec23e95 HaikuDepot: Fix Crash on Quit During Load
If the system is currently loading-up and populating
data and the user quits then it was crashing because
of a call to a deleted ProcessCoordinator object.
This change implements the reference as BReference
ensuring that the ProcessCoordinator object is only
deleted after it is not used anywhere.

Resolves #16109

Change-Id: If535c151819da37d502283af3745e4148da69026
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2797
Reviewed-by: waddlesplash <[email protected]>
2020-05-24 15:51:40 +00:00
Andrew Lindesay 87016f8f49 HaikuDepot: Single Package Crash
In single package mode there was a crash owing to the
status bar not being present.  This may as well be
added because it provides some feedback that the
application is actually doing something.  The
behaviour of this is not ideal because the feedback
could be better, but it will resolve the crash
issue this ticket is raising.

Resolves #15964

Change-Id: I603a7b163139859f0c46a35ead0809e5d82e0f8d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2791
Reviewed-by: waddlesplash <[email protected]>
2020-05-23 21:58:09 +00:00
Andrew Lindesay c419919252 HaikuDepot: Performance
This change removes two mistakes I made a long time ago
that caused unnecessarily copying of lists of data. This
fix speeds up the UI alot.

This change also clears data in UI list elements when a
bulk load is requested.  It stops clearing otherwise and
instead uses "add" and "remove" operations in the lists
which is OK now because the UI list elements are much
faster than they have been in the past.  This removes
the strange clean-and-reload that was visible in the UI
previously.

A threaded package loading system was put in place a long
time ago, but with these performance improvements this
mechanism is no longer necessary; it has been removed to
simplify the code.

Fixes #16012

Change-Id: I393cee929695726539602b51630ae285fb8384f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2748
Reviewed-by: Adrien Destugues <[email protected]>
2020-05-22 10:08:11 +00:00
Andrew Lindesay 9d8d114499 Packages: Local Repo Config Formats
The local storage of the various repositories' config
needs to cater for different generations of storage
formats and also needs to be able to swap out legacy
repository identifiers.

Change-Id: Ib4b3857254b7b703858eff6815e2d6c54d69da3c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1963
Reviewed-by: Adrien Destugues <[email protected]>
2020-05-22 10:04:51 +00:00
Andrew Lindesay 9883929b9c HaikuDepot: Featured Pkgs View
This change will move the display of the featured packages
from a dynamic layout to one that is static.  This should
improve layout consistency and ui performance as well as
introduce keyboard navigation in the featured packages
list.

Resolves #11675, #15012
Helps #14675

Change-Id: Iddac7a9562763c7a890ec5dcf633e94f84684f43
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2708
Reviewed-by: Adrien Destugues <[email protected]>
2020-05-18 06:39:21 +00:00
Andrew Lindesay 1f3909ade1 HaikuDepot: Referencable Fixes
Some misuse of BReferencable / BReference are causing the
debugger to fire while debugging another issue.  This
should fix some of it.

Change-Id: I895e209afe9e350e35b111739140c85133107227
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2556
Reviewed-by: Adrien Destugues <[email protected]>
2020-05-03 09:47:43 +00:00
Andrew Lindesay 5ad0160882 HaikuDepot: Disable System Pkg Updates
HaikuDepot reacts to changes in packages installed in the
running system, but is currently reloading everything
which is too slow with the quantity of data involved.
Short term; disable this function in this commit so the
application can be used and then come back to it later
with a better solution.

Relates to #15879

Change-Id: I96a17c01e8b1ae1443fb6242a5b53a22b1e44416
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2483
Reviewed-by: Adrien Destugues <[email protected]>
2020-05-01 10:44:25 +00:00
Andrew Lindesay eaf026de4a HaikuDepot: Fix Label on User Rating
Resolves #11639

Change-Id: I45d3952d1dd0fc998cf589b5180c0a81ab1f63b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2501
Reviewed-by: Adrien Destugues <[email protected]>
2020-04-20 07:15:44 +00:00
Andrew Lindesay 30bd2c8c29 HaikuDepot: Fix Icon Backgrounds
Some icons are not correctly observing the color
of the background view they are drawing on.  This
commit will fix that problem.

Resolves #14587

Change-Id: Icdd3eda915c985eba3517f888f29ccb2f8278487
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2500
Reviewed-by: waddlesplash <[email protected]>
2020-04-19 22:24:04 +00:00
Andrew Lindesay a6a45d1b92 HaikuDepot: Fix Oscillating Pkg Selection
The views for prominent and list packages were both
getting mouse click events and they were both sending
the "package changed" to the MainWindow which, with
the two queued messages, ended up in a feedback loop
constantly oscillating between the two packages from
the two views.  This problem is resolved in this
commit by stopping one of the views processing the
events if it is hidden -- because it is not the
selected tab.

Resolves #15884

Change-Id: I38f75baba26b26183fd0cd1a6909e404f9f37b9b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2498
Reviewed-by: waddlesplash <[email protected]>
2020-04-19 03:52:50 +00:00
Andrew Lindesay 296183eb6f HaikuDepot: UI Colouring Fix
Some text displayed was not using the system
standard colors.

Resolves #11689

Change-Id: Ia415a32f47dff6aa86d343d1acc154527300e924
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2493
Reviewed-by: waddlesplash <[email protected]>
2020-04-18 18:17:05 +00:00
Andrew Lindesay ccf707d0bb HaikuDepot: Fixes for Tabs
Cleans up the code around tab-switching and
also improves some logic around inserting
packages into the list of 'prominent'
packages by using a binary search.

If Haiku is installed into an environment with no
networking then it won't be able to talk to HDS
and so won't know which packages are promoted.
In this case switch the user to the "all packages"
tab so they are not shown a blank panel by default.

Relates to #14675, #14927

Change-Id: I14dd3be4af09a98245ddd0a9704bd8d53ed64a53
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2478
Reviewed-by: waddlesplash <[email protected]>
2020-04-16 00:58:30 +00:00