diff options
author | Ramiro Estrugo <ramiro@src.gnome.org> | 2001-02-12 05:49:46 +0000 |
---|---|---|
committer | Ramiro Estrugo <ramiro@src.gnome.org> | 2001-02-12 05:49:46 +0000 |
commit | 93175c51412201cd7557c6197333f750db1866e3 (patch) | |
tree | f91c373fdbcf8a82906254299e43f95967dce077 | |
parent | 8d5af6a27108c3752fa817d8bfaa2b4d8051a9a8 (diff) | |
download | nautilus-93175c51412201cd7557c6197333f750db1866e3.tar.gz |
Make toggle buttons insensitive on novice user level.
* applets/preferences-applet/nautilus-preferences-applet.c:
(user_level_changed_callback), (main):
Make toggle buttons insensitive on novice user level.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | applets/preferences-applet/nautilus-preferences-applet.c | 19 |
2 files changed, 25 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2001-02-11 Ramiro Estrugo <ramiro@eazel.com> + * applets/preferences-applet/nautilus-preferences-applet.c: + (user_level_changed_callback), (main): + Make toggle buttons insensitive on novice user level. + +2001-02-11 Ramiro Estrugo <ramiro@eazel.com> + * libnautilus-extensions/nautilus-viewport.h: * libnautilus-extensions/nautilus-viewport.c: (nautilus_viewport_draw), (nautilus_viewport_expose_event), diff --git a/applets/preferences-applet/nautilus-preferences-applet.c b/applets/preferences-applet/nautilus-preferences-applet.c index 67872609e..f9a2d36dd 100644 --- a/applets/preferences-applet/nautilus-preferences-applet.c +++ b/applets/preferences-applet/nautilus-preferences-applet.c @@ -157,6 +157,15 @@ restart_button_clicked_callback (GtkWidget *button, nautilus_gnome_shell_execute ("nautilus --restart"); } +static void +user_level_changed_callback (gpointer callback_data) +{ + g_return_if_fail (GTK_IS_TOGGLE_BUTTON (callback_data)); + + gtk_widget_set_sensitive (GTK_WIDGET (callback_data), + nautilus_preferences_get_user_level () > 0); +} + int main (int argc, char **argv) { @@ -211,6 +220,16 @@ main (int argc, char **argv) "Smooth Graphics"); gtk_box_pack_start (GTK_BOX (preference_vbox), smooth_graphics_button, TRUE, TRUE, 1); + nautilus_preferences_add_callback ("user_level", + user_level_changed_callback, + show_desktop_button); + user_level_changed_callback (show_desktop_button); + + nautilus_preferences_add_callback ("user_level", + user_level_changed_callback, + smooth_graphics_button); + user_level_changed_callback (smooth_graphics_button); + quit_button = gtk_button_new_with_label ("Quit"); nautilus_gtk_label_make_smaller (GTK_LABEL (GTK_BIN (quit_button)->child), 4); gtk_box_pack_start (GTK_BOX (command_hbox), quit_button, TRUE, TRUE, 1); |