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

The game list can't be sorted and filtered at the same time #2

Closed
wants to merge 1 commit into from
Closed

The game list can't be sorted and filtered at the same time #2

wants to merge 1 commit into from

Conversation

Letiliel
Copy link
Contributor

@Letiliel Letiliel commented Dec 6, 2013

A TreeModelSort is now parent of the TreeModelFilter, it allows for both sorting and filtering to work.

A TreeModelSort is now parent of the TreeModelFilter, it allows for both
to work.
@Letiliel
Copy link
Contributor Author

Letiliel commented Dec 6, 2013

Bah, it actually breaks the filtering in the Icon view again...
We must be doing something wrong, or GTK is definitely broken.

@Letiliel Letiliel closed this Dec 6, 2013
@strycore
Copy link
Member

strycore commented Dec 6, 2013

Haven't had the time to inspect this or test the patch, will try to find a solution for this but I don't promise anything.

@Letiliel
Copy link
Contributor Author

Letiliel commented Dec 6, 2013

I don't know if you'll get notified of this comment..
So I'm trying to solve this problem. The issue was that making the store both filtered and sortable works for the TreeView but not the IconView which gets glitchy when using the search field. The error reported is
"Gtk-CRITICAL **: gtk_cell_area_render: assertion `GTK_IS_CELL_AREA_CONTEXT (context)' failed"

But in this tutorial it reads "Instead of using cell renderers, Gtk.IconView requires (blablabla)". So, is your use of a cell renderer in the IconView at fault? Well, not so sure. I've got rid of that text label using a cell renderer and it didn't change a thing.

Maybe it's just that sortable and filtered IconViews are not meant to exist...

A workaround is to only apply the TreeModelSort model to the TreeView. But we'll certainly want to sort the IconView too in the future (e.g. sort by 'last played' would be relevant for the icon view).

@strycore
Copy link
Member

strycore commented Dec 7, 2013

I still haven't had the time to have a look at this but the CellRenderer is, if I remember correctly, the way to fix the extra large padding between icons. This trick comes from Rhythmbox's Cover Art browser plugin https://github.com/fossfreedom/coverart-browser, it also uses an icon view so there may be some more code snippets to pick from this project.

@strycore strycore reopened this Dec 7, 2013
@strycore
Copy link
Member

strycore commented Dec 7, 2013

Damette, how do I convert this from a pull request into an issue ?

@Letiliel
Copy link
Contributor Author

Letiliel commented Dec 8, 2013

I believe by opening a new issue and pasting the above conversation in the comments. images

@Letiliel
Copy link
Contributor Author

Letiliel commented Dec 9, 2013

I'm doing it, so I can continue the conversation.

@Letiliel Letiliel closed this Dec 9, 2013
@strycore
Copy link
Member

strycore commented Dec 9, 2013

👍

strycore pushed a commit that referenced this pull request Oct 4, 2020
* [ImgBot] Optimize images

*Total -- 316.85kb -> 269.88kb (14.82%)

/share/lutris/media/default_icon.png -- 1.83kb -> 1.11kb (39.58%)
/share/icons/hicolor/scalable/apps/lutris.svg -- 13.21kb -> 9.05kb (31.51%)
/share/lutris/media/logo.svg -- 13.21kb -> 9.05kb (31.51%)
/share/lutris/media/default_banner.svg -- 73.71kb -> 59.25kb (19.61%)
/share/lutris/media/unavailable.png -- 0.88kb -> 0.74kb (15.26%)
/share/lutris/media/logo.png -- 18.90kb -> 16.08kb (14.91%)
/share/lutris/media/mask.png -- 186.09kb -> 166.26kb (10.65%)
/share/icons/hicolor/128x128/apps/lutris.png -- 9.02kb -> 8.33kb (7.61%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

* Restyled by whitespace (#3)

Co-authored-by: Restyled.io <commits@restyled.io>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
strycore pushed a commit that referenced this pull request Jun 12, 2021
* fix typo

* Restyle style: fix typo (#3)

* Restyled by black

* Restyled by reorder-python-imports

* Restyled by yapf

Co-authored-by: Restyled.io <commits@restyled.io>

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
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

Successfully merging this pull request may close these issues.

None yet

2 participants