[gnome-control-center] universal-access: implement the zoom setting



commit af882e85ce2170bfd5106e7506ad8de868aa8453
Author: Thomas Wood <thos gnome org>
Date:   Sat Feb 12 18:55:59 2011 +0000

    universal-access: implement the zoom setting
    
    Bind the zoom radio buttons to the "show-magnifier" key of the magnifier
    settings.

 panels/universal-access/cc-ua-panel.c |   12 ++++++++++++
 panels/universal-access/uap.ui        |    1 -
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/panels/universal-access/cc-ua-panel.c b/panels/universal-access/cc-ua-panel.c
index 6120732..9d9219c 100644
--- a/panels/universal-access/cc-ua-panel.c
+++ b/panels/universal-access/cc-ua-panel.c
@@ -45,6 +45,7 @@ struct _CcUaPanelPrivate
   GSettings *kb_settings;
   GSettings *mouse_settings;
   GSettings *font_settings;
+  GSettings *magnifier_settings;
 
   GSList *notify_list;
 };
@@ -132,6 +133,12 @@ cc_ua_panel_dispose (GObject *object)
       priv->font_settings = NULL;
     }
 
+  if (priv->magnifier_settings)
+    {
+      g_object_unref (priv->magnifier_settings);
+      priv->magnifier_settings = NULL;
+    }
+
   G_OBJECT_CLASS (cc_ua_panel_parent_class)->dispose (object);
 }
 
@@ -541,6 +548,10 @@ cc_ua_panel_init_seeing (CcUaPanel *self)
   g_settings_bind (priv->kb_settings, "togglekeys-enable",
                    WID (priv->builder, "seeing_enable_toggle_keys_checkbutton"), "active",
                    G_SETTINGS_BIND_DEFAULT);
+
+  settings_on_off_editor_new (priv, priv->magnifier_settings, "show-magnifier",
+                              WID (priv->builder, "seeing_zoom_on_radiobutton"),
+                              NULL);
 }
 
 
@@ -789,6 +800,7 @@ cc_ua_panel_init (CcUaPanel *self)
   priv->kb_settings = g_settings_new ("org.gnome.desktop.a11y.keyboard");
   priv->mouse_settings = g_settings_new ("org.gnome.desktop.a11y.mouse");
   priv->font_settings = g_settings_new ("org.gnome.settings-daemon.plugins.xsettings");
+  priv->magnifier_settings = g_settings_new ("org.gnome.desktop.a11y.magnifier");
 
   cc_ua_panel_init_keyboard (self);
   cc_ua_panel_init_mouse (self);
diff --git a/panels/universal-access/uap.ui b/panels/universal-access/uap.ui
index 1b7de21..ea9f5a8 100644
--- a/panels/universal-access/uap.ui
+++ b/panels/universal-access/uap.ui
@@ -419,7 +419,6 @@
                 <child>
                   <object class="GtkFrame" id="frame4">
                     <property name="visible">True</property>
-                    <property name="sensitive">False</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]