History log of /haiku/src/apps/haikudepot/ui/PackageListView.cpp
Revision Date Author Comments
# 13bbb4d8 06-Dec-2023 Andrew Lindesay <apl@lindesay.co.nz>

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 <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 6a4c3457 19-Oct-2022 Augustin Cavalier <waddlesplash@gmail.com>

HaikuDepot: Adjust some hard-coded font sizes.


# 8d18358c 14-Aug-2022 Andrew Lindesay <apl@lindesay.co.nz>

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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 7d137fd9 23-May-2022 Andrew Lindesay <apl@lindesay.co.nz>

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 <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 925b83a8 25-Apr-2022 Augustin Cavalier <waddlesplash@gmail.com>

HaikuDepot: Fix scrolling the list triggering "looping."

If two PACKAGE_SELECTED messages were queued at once, then we would
wind up in a loop between the two, triggering the "looping" behavior.
Instead, do not send a PACKAGE_SELECTED message when programatically
changing what package is selected, which is more efficient anyway.

Fixes #11732.


# 1e709456 18-Feb-2022 Augustin Cavalier <waddlesplash@gmail.com>

HaikuDepot: Fix typo.


# 0d4fa3e5 23-Oct-2021 Andrew Lindesay <apl@lindesay.co.nz>

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 <humdingerb@gmail.com>
Reviewed-by: Andrew Lindesay <apl@lindesay.co.nz>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 564de192 09-Mar-2021 Andrew Lindesay <apl@lindesay.co.nz>

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 <pulkomandy@gmail.com>


# 779ab335 09-Dec-2020 X512 <danger_mail@list.ru>

use .IsSet() instead if .Get() != NULL

Change-Id: Ia2b7a719fd398e78cc3b11d4f7b02cb81179f65f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3488
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# f0e491d3 28-Jul-2020 Andrew Lindesay <apl@lindesay.co.nz>

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 <pulkomandy@gmail.com>


# a688d43f 17-Apr-2020 Paradoxon <two4god@gmail.com>

HaikuDepot: Add a version column.

Makes it easier to find the latest version of a app.

Fixes #15668.

Change-Id: I26e939cd7ac4c590d856a2b093cc52098fa14301
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2488
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# e00a489b 28-Oct-2018 Augustin Cavalier <waddlesplash@gmail.com>

HaikuDepot: Replace the "featured packages" checkbox with tabs.

As discussed in #14598, there are now two tabs instead of the
checkbox: "Featured packages" and "All packages". It otherwise
behaves as before.

Also fixes #12428.


# 6d18e980 03-Oct-2018 Andrew Lindesay <apl@lindesay.co.nz>

HaikuDepot : Performance for Package List Updates

Performance improvements for the application updating
lists of packages when the user is operating with the
locale set to Russian.

fixes #14513

Change-Id: I1e2514a2afbd43503ac0edfe280a856411738026
Reviewed-on: https://review.haiku-os.org/612
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 42b6e527 20-Sep-2018 Kacper Kasper <kacperkasper@gmail.com>

Revert "HaikuDepot: don't scale bitmaps"

This reverts commit 2ba2d603518c6d00c8de4ab00b7f39726ba5f02c.

...and properly fix the scaling issue.

Change-Id: I2c7ef833c1ff592dd95ea7d83d3f7beced42f209
Reviewed-on: https://review.haiku-os.org/589
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 2ba2d603 18-Sep-2018 Kacper Kasper <kacperkasper@gmail.com>

HaikuDepot: don't scale bitmaps

* There was an off-by-one error in initialization code;
BRect(0, 0, 15, 15) does not create 16x16 bitmap - it is 15x15.
As a result vector icons were rendered at 15x15 and then scaled to
16x16.

Change-Id: If1b57148e5a887a4bf71e01606d3d0d6fd0ed149
Reviewed-on: https://review.haiku-os.org/585
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 7457ccb4 13-Aug-2018 Augustin Cavalier <waddlesplash@gmail.com>

BMessageFormat: Rename to BStringFormat.

The ICU class is named MessageFormat, but on Haiku, it sounds too much
like something related to BMessage (which it isn't in the slightest)
and not part of the Locale system. It works almost entirely with BStrings,
so naming it BStringFormat makes much more sense.

OK'ed by PulkoMandy and Humdinger.


# e5c4ce4f 21-Jul-2018 David Murphy <murphman@gmail.com>

HaikuDepot: Fix package list icon size for regular and featured views

Fixes #13399
Change-Id: I9a372d467e2056c6985fdc43b4629aa8fecd7535


# 4e6fbe03 27-Dec-2017 Julian Harnath <julian.harnath@rwth-aachen.de>

HaikuDepot: notify work status from main window

* Update the work status view with package state changes from
MainWindow instead of PackageListView, because PackageListView
does not always show all packages that are going to be installed
(e.g. dependencies that are not shown when a search filter is
active).

* Fixes the bug that prevented pending/download status to show up
for dependencies when filters are used.


# 97844417 24-Nov-2017 Julian Harnath <julian.harnath@rwth-aachen.de>

HaikuDepot: faster row lookup in PackageListView

* Use a hash table to find PackageRows by package name in
PackageListView, instead of doing linear search over all rows.
Improves performance of populating the list, since every
AddPackage() checks if a row for the package already exists.


# 125d42d9 23-Nov-2017 Julian Harnath <julian.harnath@rwth-aachen.de>

HaikuDepot: add work status view

* Add new WorkStatusView which keeps the user informed about what's
happening. It's a status bar at the bottom of the window which
shows on the left side either a spinning barber pole (for
operations without a progress), or a progress bar (for download
progress). Next to that is a text view showing a descriptive
status text.

* Currently, it will notify of the following operations:
- Repository refresh (barber pole)
- Background packet actions, like preparation of install or uninstall
(barber pole)
- Package downloads, including downloads of dependencies (progress
bar). Status text indicates the name of the package currently
being downloaded (if any), and how many more packages are queued
for download after it (if any).

* Hooks into PackageListView to be notified of package status changes
(such as becoming pending or download progress)

* When the package currently being downloaded is also selected in the
list view, the user sees the progress bar in WorkStatusView
as well as the one in the PackageInfoView, which is redundant. This
still needs a good solution...


# d90412cb 20-Nov-2017 Julian Harnath <julian.harnath@rwth-aachen.de>

HaikuDepot: add repository column in package list view

* As requested in #12538

* Hidden by default to not clutter up the view with information that
isn't important in the default setup. Like the state of other
columns, the visibility is remembered.


# fa19dd44 10-Dec-2015 looncraz <looncraz@looncraz.net>

apps: Convert to using Set*UIColor.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Patches 0045-0075, 0077-0087 from looncraz, unmodified.


# 6612ea4f 08-Sep-2015 Axel Dörfler <axeld@pinc-software.de>

HaikuDepot: use better min/max widths for columns.

* Use a scale factor depending on the font size.
* Be more generous when it comes to the max width.
* Use StringWidth() for the default size of the size and status columns.


# d31c2a42 13-Jun-2015 Janus <janus2@ymail.com>

HaikuDepot: fix wrong type for member fSize


# 2358bb28 13-Jun-2015 Janus <janus2@ymail.com>

HaikuDepot: column "size" sorted as a number not as a string

* Fixes #12128.


# c2bc2649 11-May-2015 Axel Dörfler <axeld@pinc-software.de>

HaikuDepot: use at least strcasecmp() for sorting.

* With localized/pretty titles, the formerly used strcmp() is not
adequate anymore.


# 47c5baac 08-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

HaikuDepot: Apply logic from 2a36368 to PackageListView fields.

Rename BBitmapStringField to SharedBitmapStringField and make it
reference the SharedBitmap.


# f67071b9 04-Apr-2015 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Re-activated Size-column

Noticed that HaikuDepotServer info now contains "payloadLength", which is
the package size. Populate that in the list view.


# 72992391 04-Apr-2015 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Title versus Name distinction

* The name is the static package name. The title is either that name,
or a translated pretty version of the name.
* Adjust package info retrieval to server API changes. Unbreaks package
translations.


# 15eb4c43 11-Jan-2015 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Added RemovePackage() method...

... to PackagedListView.


# 7b206268 28-Dec-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Hide Size column until it can be implemented

Fixes #10394.


# b2843dae 26-Dec-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Added PackagesListView::Select(PackageInfo)

which also scrolls the row into view (if it exists).


# ca747629 23-Dec-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Fix drawing bugs of count view

The packages count view centers its label. It therefore needs a full update
on resize. Also optimize SetItemCount() by trying to avoid unneccessary
layout invalidations.


# a3056e41 01-Nov-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Move selection message constant to MainWindow.h


# 961fdd8c 08-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

BMessageFormat: parse the pattern at construction

* Instead of parsing the pattern everytime Format() is called, parse it
only once when the object is created.
* Adjust all callers to make use of the feature and reuse the instance
as much as possible. This also allows calling B_TRANSLATE only once
instead of everytime the formatting needs to be done. We use either a
static instance (when the message pattern is constant) or a field (when
it is not known to be constant).
* Since the BMessageFormat instances are now reused, add locking to
avoid race conditions (ICU itself is thread safe, but the format pattern
is recreated when the locale is changed)


# 7fe7ce67 08-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Another use of BMessageFormat for plural support.

Spotted by Diver. Thanks!


# 04c9d578 27-Sep-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Organized source into sub-folders


# 6612ea4f299d72da5712bb24db9ecb574ae5130b 08-Sep-2015 Axel Dörfler <axeld@pinc-software.de>

HaikuDepot: use better min/max widths for columns.

* Use a scale factor depending on the font size.
* Be more generous when it comes to the max width.
* Use StringWidth() for the default size of the size and status columns.


# d31c2a427a8e76d0cca9b2c04e6ed97b2d8713c8 13-Jun-2015 Janus <janus2@ymail.com>

HaikuDepot: fix wrong type for member fSize


# 2358bb281176dd3c41af5dd4010f5c480a76f311 13-Jun-2015 Janus <janus2@ymail.com>

HaikuDepot: column "size" sorted as a number not as a string

* Fixes #12128.


# c2bc264987488c3f8419aa1b06b7d0bd014c5cad 11-May-2015 Axel Dörfler <axeld@pinc-software.de>

HaikuDepot: use at least strcasecmp() for sorting.

* With localized/pretty titles, the formerly used strcmp() is not
adequate anymore.


# 47c5baac63e74b67d315a86f2bfe3eb4ba733530 08-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

HaikuDepot: Apply logic from 2a36368 to PackageListView fields.

Rename BBitmapStringField to SharedBitmapStringField and make it
reference the SharedBitmap.


# f67071b98ca57efd722b4603fcfe1c899fd2c4ce 04-Apr-2015 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Re-activated Size-column

Noticed that HaikuDepotServer info now contains "payloadLength", which is
the package size. Populate that in the list view.


# 72992391bb6f9351f80367604d64c5da21a9f4a9 04-Apr-2015 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Title versus Name distinction

* The name is the static package name. The title is either that name,
or a translated pretty version of the name.
* Adjust package info retrieval to server API changes. Unbreaks package
translations.


# 15eb4c43c99fb96c5a78383f5b82ecb4b15b33b4 11-Jan-2015 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Added RemovePackage() method...

... to PackagedListView.


# 7b206268ab32f60b2a64c84a3c914651dcdfc570 28-Dec-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Hide Size column until it can be implemented

Fixes #10394.


# b2843daed790d3cc97dde22679473b7e8fbebf14 26-Dec-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Added PackagesListView::Select(PackageInfo)

which also scrolls the row into view (if it exists).


# ca747629f9a7bbb3382604ac01085153211873d6 23-Dec-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Fix drawing bugs of count view

The packages count view centers its label. It therefore needs a full update
on resize. Also optimize SetItemCount() by trying to avoid unneccessary
layout invalidations.


# a3056e412a838cccf2968e660262128bfabe0f56 01-Nov-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Move selection message constant to MainWindow.h


# 961fdd8cc3a4f138449895445e0b4531e98b1eb2 08-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

BMessageFormat: parse the pattern at construction

* Instead of parsing the pattern everytime Format() is called, parse it
only once when the object is created.
* Adjust all callers to make use of the feature and reuse the instance
as much as possible. This also allows calling B_TRANSLATE only once
instead of everytime the formatting needs to be done. We use either a
static instance (when the message pattern is constant) or a field (when
it is not known to be constant).
* Since the BMessageFormat instances are now reused, add locking to
avoid race conditions (ICU itself is thread safe, but the format pattern
is recreated when the locale is changed)


# 7fe7ce67487516f39aa10b8857726e97dee031f2 08-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

Another use of BMessageFormat for plural support.

Spotted by Diver. Thanks!


# 04c9d578d85baa79584c1c40c61cc73ca58d527b 27-Sep-2014 Stephan Aßmus <superstippi@gmx.de>

HaikuDepot: Organized source into sub-folders