Skip to content

Add To Menu does not turn into Remove From Menu until the window is reopened #233

Description

@kacperpaczos

In the applications window, clicking Add To Menu on an app exports it and the heading says "App Exported!" - but the row still shows Add To Menu. The button that offers the reverse, Remove From Menu, only appears after closing the window and opening it again: which of the two buttons a row gets is decided once, when the list is built, from whether ~/.local/share/applications/<box>-<app>.desktop exists at that moment, and nothing updates it afterwards. So right after adding an app to the menu there is no way to take it out again from the same row, and a second click on the still-visible Add To Menu just exports it a second time.

after clicking Add To Menu on Text Editor: the heading says App Exported! while the row still offers Add To Menu

Expected: the row reflects the menu straight away - one button that reads Add To Menu or Remove From Menu depending on whether the exported desktop file is there now, and flips after each click. Reading the state back from the host directory after the command, rather than assuming the export worked, also means the button never claims something the menu doesn't have.

I have a fix for this together with the row layout from #232, since it is the same few lines; PR to follow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions