Try your apps in locked-down mode
- From: Havoc Pennington <hp redhat com>
- To: desktop-devel-list gnome org
- Subject: Try your apps in locked-down mode
- Date: 22 Mar 2002 11:49:28 -0500
Hi,
When writing preferences-related code, you want to test by editing
/etc/gconf/2/path and comment out the readwrite database:
# Give users a default storage location, ~/.gconf
# xml:readwrite:$(HOME)/.gconf
Now gconftool-2 --shutdown so gconfd will restart, and restart your
app.
When the app is restarted, it should not let you do anything that
results in changing a gconf key. If it does, you should get the
libgnomeui error dialog (I just put in a fix so you'll only get one,
previously you would have gotten spammed with them).
Typically the way you fix these bugs is by calling
gtk_widget_set_sensitive (widget_controlling_a_key,
gconf_client_key_is_writable (client, key));
If you want to be bad-ass you can redo the sensitivity when you get a
notify, since notifies may indicate that writability changed, but
currently gconf won't reliably change the writable bit at runtime
anyway.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]