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

GetGroups does not return the id = icon name for categories #9

Open
kkofler opened this issue Nov 15, 2016 · 2 comments
Open

GetGroups does not return the id = icon name for categories #9

kkofler opened this issue Nov 15, 2016 · 2 comments

Comments

@kkofler
Copy link

kkofler commented Nov 15, 2016

For categories, the GetGroups D-Bus API (implemented in DnfDaemonBase.get_groups in python/dnfdaemon/server/__init__.py) returns the name instead of the id, the id is lost. This is a problem because the id is needed to look up the correct icon in GUIs, both for the category itself, and for groups within the category that do not have their own icons (where, according to https://fedorahosted.org/comps/ , we are supposed to fall back to the category's icon).

@kkofler kkofler changed the title GetGroups does not return the id = icon name for environments GetGroups does not return the id = icon name for categories Nov 15, 2016
kkofler added a commit to kkofler/dnfdragora that referenced this issue Nov 16, 2016
New file dnfdragora/compsicons.py, similar to groupicons.py, but for
comps.

New tool tools/gen-comps-category-list.sh: Generates a map from category
name to ID for dnfdragora/compsicons.py, as a workaround for
manatools/dnfdaemon#9.

dnfdragora/ui.py (mainGui._getAllGroupIDList): Remember the UI names for
                                               each ID in an
                                               id_to_name_map.
                 (mainGui._fillGroupTree): Handle comps separately, use
                                           compsicons.py to get the
                                           icons (manatools#2) and use the
                                           id_to_name_map to get the UI
                                           name (manatools#3).

Fixes manatools#2.
Fixes manatools#3.
kkofler added a commit to kkofler/dnfdragora that referenced this issue Nov 16, 2016
New file dnfdragora/compsicons.py, similar to groupicons.py, but for
comps.

New tool tools/gen-comps-category-list.sh: Generates a map from category
name to ID for dnfdragora/compsicons.py, as a workaround for
manatools/dnfdaemon#9.

dnfdragora/ui.py (mainGui._getAllGroupIDList): Remember the UI names for
                                               each ID in an
                                               id_to_name_map.
                 (mainGui._fillGroupTree): Handle comps separately, use
                                           compsicons.py to get the
                                           icons (manatools#2) and use the
                                           id_to_name_map to get the UI
                                           name (manatools#3).

Fixes manatools#2.
Fixes manatools#3.

The only remaining issue is that the UI names are not translated, which
I filed as manatools/dnfdaemon#10 because Yumex-DNF is also affected (and
thus it is clearly dnfdaemon's fault).
Conan-Kudo pushed a commit to manatools/dnfdragora that referenced this issue Nov 16, 2016
New file dnfdragora/compsicons.py, similar to groupicons.py, but for
comps.

New tool tools/gen-comps-category-list.sh: Generates a map from category
name to ID for dnfdragora/compsicons.py, as a workaround for
manatools/dnfdaemon#9.

dnfdragora/ui.py (mainGui._getAllGroupIDList): Remember the UI names for
                                               each ID in an
                                               id_to_name_map.
                 (mainGui._fillGroupTree): Handle comps separately, use
                                           compsicons.py to get the
                                           icons (#2) and use the
                                           id_to_name_map to get the UI
                                           name (#3).

Fixes #2.
Fixes #3.

The only remaining issue is that the UI names are not translated, which
I filed as manatools/dnfdaemon#10 because Yumex-DNF is also affected (and
thus it is clearly dnfdaemon's fault).
@kkofler
Copy link
Author

kkofler commented Nov 22, 2016

If Yumex-DNF really needs the current behavior of the [0] entry, we need another array entry that reliably contains the ID.

@kkofler
Copy link
Author

kkofler commented Jan 2, 2017

Any update on this issue? I would really like to get rid of this hardcoded map:
https://github.com/anaselli/dnfdragora/blob/master/dnfdragora/compsicons.py#L17
that maps the category names back to the IDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant