1
Index: gnome-control-center-2.30.1/capplets/accessibility/at-properties/at-enable-dialog.ui
2
===================================================================
3
--- gnome-control-center-2.30.1.orig/capplets/accessibility/at-properties/at-enable-dialog.ui 2010-08-20 20:10:39.451730011 -0400
4
+++ gnome-control-center-2.30.1/capplets/accessibility/at-properties/at-enable-dialog.ui 2010-08-20 20:14:55.139510013 -0400
6
<property name="position">2</property>
10
+ <object class="GtkCheckButton" id="at_visual_bell_toggle">
11
+ <property name="visible">True</property>
12
+ <property name="can_focus">True</property>
13
+ <property name="label" translatable="yes">Enable _visual system bell</property>
14
+ <property name="use_underline">True</property>
15
+ <property name="draw_indicator">True</property>
19
+ <child internal-child="accessible">
20
+ <object class="AtkObject" id="a11y-at_visual_bell_toggle1">
21
+ <property name="AtkObject::accessible_description" translatable="yes">Changes to visual system bell take effect immediately.</property>
26
+ <property name="expand">False</property>
27
+ <property name="fill">False</property>
28
+ <property name="position">3</property>
33
<property name="position">1</property>
34
Index: gnome-control-center-2.30.1/capplets/accessibility/at-properties/main.c
35
===================================================================
36
--- gnome-control-center-2.30.1.orig/capplets/accessibility/at-properties/main.c 2010-08-20 20:15:08.126000011 -0400
37
+++ gnome-control-center-2.30.1/capplets/accessibility/at-properties/main.c 2010-08-20 20:28:08.716100014 -0400
39
#define ACCESSIBILITY_KEY_DIR "/desktop/gnome/interface"
40
#define GKSU_NO_GRAB_KEY "/apps/gksu/disable-grab"
41
#define GKSU_NO_GRAB_KEY_DIR "/apps/gksu"
42
+#define VISUAL_BELL_KEY "/apps/metacity/general/visual_bell"
43
+#define VISUAL_BELL_KEY_DIR "/apps/metacity/general"
45
static gboolean initial_state;
48
g_object_unref (client);
52
+at_visual_bell_update (GConfClient *client,
53
+ GtkBuilder *builder)
55
+ gboolean is_enabled = gconf_client_get_bool (client, VISUAL_BELL_KEY, NULL);
56
+ GObject *button = gtk_builder_get_object (builder, "at_visual_bell_toggle");
58
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
64
+at_visual_bell_changed (GConfClient *client,
69
+ at_visual_bell_update (client, user_data);
74
+at_visual_bell_toggled (GtkToggleButton *toggle_button,
75
+ GtkBuilder *builder)
77
+ GConfClient *client = gconf_client_get_default ();
78
+ gboolean is_enabled = gtk_toggle_button_get_active (toggle_button);
80
+ gconf_client_set_bool (client, VISUAL_BELL_KEY,
83
+ g_object_unref (client);
88
setup_dialog (GtkBuilder *builder)
94
+ // Visual bell toggle
95
+ gconf_client_add_dir (client, VISUAL_BELL_KEY_DIR,
96
+ GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
98
+ object = gtk_builder_get_object (builder, "at_visual_bell_toggle");
100
+ g_signal_connect (object, "toggled",
101
+ G_CALLBACK (at_visual_bell_toggled),
104
+ peditor = gconf_peditor_new_boolean (NULL, VISUAL_BELL_KEY,
105
+ GTK_WIDGET (object),
108
+ at_visual_bell_update (client, builder);
110
+ gconf_client_notify_add (client, VISUAL_BELL_KEY_DIR,
111
+ at_visual_bell_changed,
112
+ builder, NULL, NULL);
115
gconf_client_add_dir (client, ACCESSIBILITY_KEY_DIR,
116
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);