After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 534228 - Drop librsvg dependency
Drop librsvg dependency
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
2.23.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-21 17:57 UTC by Cosimo Cecchi
Modified: 2008-11-21 10:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (35.61 KB, patch)
2008-05-21 17:58 UTC, Cosimo Cecchi
none Details | Review
patch v2 (35.96 KB, patch)
2008-05-22 00:12 UTC, Cosimo Cecchi
none Details | Review

Description Cosimo Cecchi 2008-05-21 17:57:17 UTC
I made a patch that drops librsvg dependency. I think the dependency is useless, as Gdk has its own pixbuf loader for SVGs, so it's not useful for us to depend on that directly.
While removing the dependency, I saw some related FIXMEs in the nautilus-icon-container.c and nautilus-icon-canvas-item.c about a funky implementation of the icon that appears when previewing a file (which is an SVG file). I refactored the code, moving some parts to FMIconView as suggested in the relevant bug report, so that it will be easy in the future to change the icon used for the preview.
Comments are welcome, I saw no regressions in my testing.
Comment 1 Cosimo Cecchi 2008-05-21 17:58:02 UTC
Created attachment 111286 [details] [review]
patch
Comment 2 Cosimo Cecchi 2008-05-22 00:12:17 UTC
Created attachment 111310 [details] [review]
patch v2

Only emit preview signals once.
Comment 3 Christian Neumair 2008-07-01 21:44:07 UTC
Dear Cosimo,

thanks for your efforts. I like how you try to clean up our architecture, however maybe you should provide two patches.

Regarding the combined "librsvg dependency removal" and "preview refactoring" patch:

a) regarding explicit librsvg dependency removal:

Due to lack of experience, I'd like to get some feedback by the librsvg maintainers first, so I'm CCIng them: Is it OK to remove the explicit calls to rsvg_pixbuf_from_file_at_zoom_with_max(), and instead use the GDK pixbuf loader? We call it after gdk_pixbuf_new_from_file returned NULL.

b) regarding refactoring of preview:

It's working perfectly - why should we change it?
Comment 4 Dominic Lachowicz 2008-07-01 21:56:07 UTC
If librsvg is installed sanely, it will have added a GdkPixbuf plugin. So you should be able to get away with just using plain GdkPixbufLoader calls.
Comment 5 Christian Neumair 2008-07-01 22:05:39 UTC
Dom: OK, thanks a lot for that uber-fast response. You're elegible for a hug and an olympic chocholate gold medal:
  http://www.honestfoods.com/chocolate-gold-medal.html

Cosimo: Please split out the librsvg dependency removal code, and commit it to trunk. Maybe you could close this bug report afterwards, and - if you insist on the preview refactoring - open a new bug report for it?
Comment 6 Cosimo Cecchi 2008-07-01 23:41:59 UTC
(In reply to comment #3)
> 
> b) regarding refactoring of preview:
> 
> It's working perfectly - why should we change it?

AFAIR (it has been some time ago and I dived in my SoC project since then ;-) ) I did that mainly because those parts of code had a lot of FIXMEs and was screaming loud "refactor me!!" :)
Also, I think the refactored code provides much more flexibility if we want to add some kind of other preview by pixbufs.
If committing the two parts separately is the way you want me to do this, I'll go for it, but I've lost my git history for this patch and it will be some work splitting the two patches :(
Comment 7 Cosimo Cecchi 2008-11-21 10:05:03 UTC
This is obsolete as well...we don't depend on rsvg directly anymore in trunk.