Ticket #32 (closed enhancement: wontfix)
Common function for loading GdkPixbuf
| Reported by: | mickey@… | Owned by: | mickey@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | openmoko-libs | Version: | unspecified |
| Severity: | minor | Keywords: | |
| Cc: | buglog@…, thomas@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | PatchReviewResult: | ||
| Reproducible: |
Description
libmokoui needs a function that loads a GdkPixbuf? from
- DATADIR w/ fallback to
- some common pixmap directory
Optionally scaling it to a size would be nice.
Change History
comment:2 Changed 6 years ago by jluebbe@…
- Milestone set to Phase 1
We need this for Phase 1 to keep the API changes to a minimum.
comment:3 Changed 6 years ago by thomas@…
If this is for loading icons, we should be using GtkIconTheme?.
comment:6 Changed 6 years ago by mickey@…
not everything will be an icon, so it's still a good thing to have.
comment:7 Changed 6 years ago by ross@…
IMHO, 99% of artwork should be icons, and thus part of the icon theme. I can't
think of anything off the top of my head which doesn't count as a themeable icon.
For the rest, the image is either installed in /usr/share/[appname]/ or it
isn't. If it isn't the packaging is buggy, and fallbacks are pointless.
All you need for the 1% of non-icons is gdk_pixbuf_new_from_file_at_size
(APPDATADIR "filename.png", width, height, &error).

optionally make it return a default image, if searched image not found