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 513852 - Port (Migrate) Yelp from gnome-vfs to gio / gvfs
Port (Migrate) Yelp from gnome-vfs to gio / gvfs
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-02 10:14 UTC by Alon Zakai (kripken)
Modified: 2008-05-23 18:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
migration to gio (9.71 KB, patch)
2008-02-02 13:00 UTC, Alon Zakai (kripken)
none Details | Review
Improved patch to migrate to gio (9.65 KB, patch)
2008-02-12 06:45 UTC, Alon Zakai (kripken)
committed Details | Review

Description Alon Zakai (kripken) 2008-02-02 10:14:05 UTC
(I can't find an open bug for this, so I'm posting this one.) Like other GNOME projects, Yelp should be migrated from gnome-vfs to gio/gvfs.

I thought I might try to help out by doing this. Please tell me if someone is already working on it.

Note: Perhaps the wiki page http://live.gnome.org/GioPort should have a link to this bug (or to another, more appropriate one, if I missed it)? Other projects have such links there.
Comment 1 Don Scorgie 2008-02-02 10:55:22 UTC
After the recent thread on d-d-l, I looked a little at this.  It doesn't seem too bad to do.  The only places we use gnome-vfs (as far as I can tell) are in yelp-utils.c (to determine the mime type of files) and in yelp-window.c (to read and process html files).

If you want to give it a go, we'd be more than happy with a patch.  Though, it won't go in until after 2.22 as this would be considered a new feature (to me at least).
Comment 2 Alon Zakai (kripken) 2008-02-02 11:36:41 UTC
Ok, good, I'll give it a shot.
Comment 3 Alon Zakai (kripken) 2008-02-02 13:00:29 UTC
Created attachment 104253 [details] [review]
migration to gio
Comment 4 Alon Zakai (kripken) 2008-02-02 13:02:04 UTC
I attached a patch for this bug, I hope this is helpful.
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2008-02-12 03:09:55 UTC
Hey Alon,

I'm not a maintainer but I read your patch and thought I could add some comments, in some lines you do:

+        g_object_unref (G_OBJECT (stream));

I think the cast is not necessary, just unref (stream) is good. (someone correct me if I'm wrong).

Also in src/yelp-toc-pager.c you seem to not be including <gio/gio.h>, just removing gnome-vfs:

--- src/yelp-toc-pager.c	(revision 3060)
+++ src/yelp-toc-pager.c	(working copy)
@@ -32,7 +32,6 @@
 #include <glib.h>
 #include <glib/gstdio.h>
 #include <glib/gi18n.h>
-#include <libgnomevfs/gnome-vfs.h>
Comment 6 Alon Zakai (kripken) 2008-02-12 06:45:04 UTC
Created attachment 105012 [details] [review]
Improved patch to migrate to gio

Diego,

You are right about both of these, I think, thanks. I attach a fixed patch.

Regarding the casts, I saw them in other code, and I assumed they were meant to prevent a warning... but it turns out no warning is generated, so I guess they are unnecessary.

Regarding yelp-toc-pager.c, yes, I forgot to add the include. The compiler didn't remind me, because for some reason yelp-toc-pager.c isn't actually compiled... I'm not sure why. (Perhaps some ./configure option is needed in order for it to be used, or something?)
Comment 7 Don Scorgie 2008-02-12 07:51:38 UTC
yelp-*-pager files are dead code and will never be used.  I should really remove them from SVN at some point.

Anyway, the patch looks good to my untrained eyes.  If there are no objections, I'll commit this as soon as we branch 2.22.  Thanks for the work :)
Comment 8 Don Scorgie 2008-05-23 18:39:41 UTC
Patch committed.  Many thanks.

2008-05-23  Don Scorgie  <dscorgie@svn.gnome.org>

	* configure.in:
	* src/test-resolver.c (main):
	* src/test-uri.c (main):
	* src/yelp-base.c:
	* src/yelp-main.c (main):
	* src/yelp-search-pager.c:
	* src/yelp-search-parser.c:
	* src/yelp-toc-pager.c (process_omf_pending):
	* src/yelp-utils.c (resolve_process_ghelp), (resolve_full_file):
	* src/yelp-window.c (window_do_load_html), (window_print_page_cb):
	Port to use gio instead of gnome_vfs
	bug #513852 - patch from Alon Zakai