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 318753 - more documentation in the about.sgml file
more documentation in the about.sgml file
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Docs
2.12.x
Other All
: Normal minor
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2005-10-13 10:02 UTC by Thomas Wabner
Modified: 2005-11-08 11:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
more example and infos for the brief example program (2.44 KB, patch)
2005-10-13 10:04 UTC, Thomas Wabner
none Details | Review
add more examples (2.58 KB, patch)
2005-10-13 12:07 UTC, Thomas Wabner
none Details | Review
changed example (1.97 KB, patch)
2005-11-02 09:02 UTC, Thomas Wabner
none Details | Review

Description Thomas Wabner 2005-10-13 10:02:38 UTC
Version details: gnome 2.10.2, gentoo
Distribution/Version: gentoo

The documentation in the about section of gnome-vfs should short describe how to
use an gnome-vfs uri with the small example program and that you have to be
aware to know about the relatice path and absolute path problem.

A small example is introduce to make a relative url absolute. See the attached
patch.
Comment 1 Thomas Wabner 2005-10-13 10:04:47 UTC
Created attachment 53409 [details] [review]
more example and infos for the brief example program 

Because english is not my native language, please review the patch before using
it. Thanks.
Comment 2 Thomas Wabner 2005-10-13 12:07:52 UTC
Created attachment 53414 [details] [review]
add more examples
Comment 3 Christian Neumair 2005-10-13 14:47:48 UTC
Thanks for your efforts!
Maybe you could submit this patch to the gnome-vfs mailing list [1] for review?

[1] http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
Comment 4 Alexander Larsson 2005-10-17 11:21:17 UTC
The example should use gnome_vfs_make_uri_from_shell_arg instead.
Comment 5 Thomas Wabner 2005-11-02 09:02:09 UTC
Created attachment 54212 [details] [review]
changed example

This patch includes some documentation and hints how to use the example in the
about section and how to make your path in the filesystem absolute.
Comment 6 Alexander Larsson 2005-11-08 11:19:22 UTC
This example doesn't look right:
/* using input uri as string from commandline */
char* input_uri_string = argv[1];
/* make uri absolute from relative */
if(gnome_vfs_uri_is_local(input_uri)) {
  /* if the uri exists we can open it.. no need for more tests */
  if(gnome_vfs_uri_exists(input_uri))
  {
  /* do somthing with the uri */ 
  } else {
    /* uri is not absolute */
    absolute_uri_string = gnome_vfs_make_uri_from_input_with_dirs
(input_uri_string, GNOME_VFS_MAKE_URI_DIR_CURRENT);
    absolute_uri = gnome_vfs_uri_new(absolute_uri_string);
  }
}

It doesn't even compile (gnome_vfs_uri_is_local(input_uri) will fail because
there is no input_uri variable), and it shouldn't be doing the checking on the
uri at all, just call gnome_vfs_make_uri_from_input_with_dirs() on the supplied
argument. And for the case of an program argument like this it should use
gnome_vfs_make_uri_from_shell_arg(). 

Also, i think the change overempazises the uri part of the vfs. I commited a
much smaller change that just allows the example to take normal unix filenames
as arguments.