summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2001-02-12 05:49:46 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2001-02-12 05:49:46 +0000
commit93175c51412201cd7557c6197333f750db1866e3 (patch)
treef91c373fdbcf8a82906254299e43f95967dce077 /applets
parent8d5af6a27108c3752fa817d8bfaa2b4d8051a9a8 (diff)
downloadnautilus-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.
Diffstat (limited to 'applets')
-rw-r--r--applets/preferences-applet/nautilus-preferences-applet.c19
1 files changed, 19 insertions, 0 deletions
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);