Re: Way to remove a GConf dir ?
- From: Alexandre Jousset <mid gtmp org>
- To: gtk-perl-list gnome org
- Subject: Re: Way to remove a GConf dir ?
- Date: Tue, 13 Sep 2005 10:15:15 +0200
Hello,
Emmanuele Bassi a écrit :
The method is Gnome2::GConf::Client::remove_dir.
But I actually don't think that those methods actually do what you think
they actually do.
Ehr...
Okay, let's start again. Gnome2::GConf::Client::unset does *not* delete
a key from the GConf database: it merely puts it in an "unset" state -
which will result in having the value fetched from the default value (if
any) specified in the attached schema (if any).
Gnome2::GConf::Client::remove_dir removes a GConf "directory" from the
list of the watched directories - it does *not* remove the directory
from the GConf database.
I'm sorry, I should have said that I tried this before...
The only way to actually delete a directory would be to use the
Gnome2::GConf::Engine::remove_dir method - but you should never ever do
this, under any circumstances, unless you really know what you're doing.
And unless you say "klaatu barada nikto" while you're doing it,
otherwise things could get really messy.
[ Just looking at the code, anyway, it seems that no check is performed
on the owner of the engine, so it could be possible to get away with it
- but it's not guaranteed to work now or in the future.]
I tried anyway to use the remove_dir from GConf::Engine but I get a
message in the terminal saying "Échec: L'opération de suppression de
répertoire n'est plus supportée, enlevez juste toutes les valeurs dans
le répertoire" -> "Error: the directory delete operation is no more
supported, just remove all values from the directory"... But I don't
know and I don't find any way to do that... And as you say, unset don't
remove them totally... I checked the C API, the GConf mailing list
archives and googled but I find nothing... Any clue ? I tried
$client->remove, $client->remove_key, $client->delete and
$client->delete_key but none are recognized...
Thanks Emmanuele !
--
\^/
-/ O \----------------------------------------
| |/ \| Alexandre (Midnite) Jousset |
-|___|----------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]