Merge lp://qastaging/~gue5t/midori/icon-pixbuf into lp://qastaging/midori

Proposed by gue5t gue5t
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 7108
Merged at revision: 7109
Proposed branch: lp://qastaging/~gue5t/midori/icon-pixbuf
Merge into: lp://qastaging/midori
Diff against target: 94 lines (+61/-1)
1 file modified
midori/midori-view.c (+61/-1)
To merge this branch: bzr merge lp://qastaging/~gue5t/midori/icon-pixbuf
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+287704@code.qastaging.launchpad.net

Commit message

Fix segfaults and type errors introduced in r7105 by incorrect downcasts from GIcon to GdkPixbuf in midori-view.c

Description of the change

Fix segfaults and type errors introduced in r7105 by incorrect downcasts from GIcon to GdkPixbuf in midori-view.c

Specifically, midori-view.c was downcasting a GIcon (which is an interface implemented by both GdkPixbuf and GThemedIcon) to a GdkPixbuf in several places where it isn't always true that the icon actually is a GdkPixbuf—for example, there's no pixbuf underlying GThemedIcons. This led to GObject cast failures and segfaults.

This adds code that explicitly converts GThemedIcon instances to GdkPixbufs to allow storing them in the GdkPixbuf* icon field of MidoriView. I've checked it against GTK2/GTK3 to make sure our scaling behavior for icons is unchanged and checked that extensions work without crashes again.

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: