Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#14821 closed bug (fixed)

In stand-alone window, add "Uninstall" button when applicable

Reported by: humdinger Owned by: leavengood
Priority: normal Milestone: R1/beta2
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #15154
Platform: All

Description

This is hrev52739.

When you double-click a HPKG, it's opened in a stand-alone HaikuDepot window. Here, you'll always get an "Install" button, even if the package is already installed. In that case, it should show an "Uninstall" button instead.

Change History (6)

comment:1 by taos, 6 years ago

Oh, and maybe close the window after a successful installation or give another indication (e.g. change "Install" to "Uninstall") that everything (incl. dependencies) is installed...

comment:2 by leavengood, 5 years ago

I started digging into this, and it seems when loading a package file in this way, the "state" of the PackageInfo in HaikuDepot is never initialized, and when that is the case the install button is shown.

HaikuDepot and the Package Kit is new to me but it does not seem obvious how to determine if a package is installed. The BPackageInfo from the package kit doesn't seem to contain that information. I imagine the code has to query something else to determine the state of the package but my Linux machine locked up before I could dig much further, and it is getting late for me.

I may dig into this more later this week.

comment:3 by diver, 5 years ago

Blocking: 15154 added

comment:4 by leavengood, 5 years ago

Owner: changed from stippi to leavengood
Status: newin-progress

comment:5 by leavengood, 5 years ago

Resolution: fixed
Status: in-progressclosed

Merged in hrev53354.

comment:6 by nielx, 5 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.