Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon manager: Save the last sort order in a hidden preference #4409

Open
wants to merge 1 commit into
base: master
from

Conversation

@jostephd
Copy link
Member

commented Sep 30, 2019

Is this okay? I assume there's a better way to do the conversions from SORT_ORDER to int and back.

@jostephd jostephd self-assigned this Sep 30, 2019
@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2019

maybe we coudl implement this in the listbox widget so that is applies to all of them? like add a 'perfernce_id' field to the listboxs wml and if its present the code will automaticially save the sorting order.

@jostephd

This comment has been minimized.

Copy link
Member Author

commented Sep 30, 2019

Good idea, but unfortunately, it's not a listbox. It's an addon_list, that's actually a separate class:

class addon_list : public container_base

What do you suggest then? Maybe we do what you propose for the menu_button. Or maybe we can make the addon_list a subclass of listbox, or of a superclass of listbox, I haven't looked into that.

@jostephd jostephd added the Question label Sep 30, 2019
@gfgtdf

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2019

Good idea, but unfortunately, it's not a listbox. It's an addon_list, that's actually a separate class:

but the addon_list contains a listbox, so it might still work?

return find_widget<listbox>(&get_grid(), "addons", false);

@jostephd

This comment has been minimized.

Copy link
Member Author

commented Oct 1, 2019

but the addon_list contains a listbox, so it might still work?

In this case, which widget do you think the preference_id facility should be added to, listbox or menu_button?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.