SV: Using: g_key_file_load_from_file() in homedir
- From: Nikolaj Kiær Thygesen <Nikolaj Thygesen ciber dk>
- To: "Christian Neumair" <chris gnome-de org>, "Santhosh" <santhoshmani gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: SV: Using: g_key_file_load_from_file() in homedir
- Date: Tue, 28 Feb 2006 12:26:23 +0100
Yep, that worked - thanx. I never knew that "~" was a shell thing :o) "g_get_home_dir()" is a good thing, so
all we need now is a way to find the installation path of a binary like "progdir:" on the Amiga :o) Yes, I
know about the "search path" function in glib, but it just ain't quite as cool :o)
br - N :o)
-----Oprindelig meddelelse-----
Fra: Christian Neumair [mailto:chris gnome-de org]
Sendt: 22. februar 2006 16:40
Til: Santhosh
Cc: Nikolaj Kiær Thygesen; gtk-app-devel-list gnome org
Emne: Re: Using: g_key_file_load_from_file() in homedir
Am Mittwoch, den 22.02.2006, 19:52 +0530 schrieb Santhosh:
everything works, but when changing the path to
"~/.DiamondBOX/Diamond.settings"
I think "~/..." is converted to "home-dir" by the shell.. it may not
be supported by the GLIB API...
Instead you can use glib functions to get the home directory... I
couldn't exactly recall the function... it could be
"g_...get_homedir()"
char *path;
path = g_build_filename (g_get_home_dir (),
".DiamondBOX/Diamond.settings",
NULL);
/* GKeyFileCode ... */
g_free (path);
--
Christian Neumair <chris gnome-de org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]