Merge lp:~themuso/unity-control-center/add-a11y-profile-indicator-toggle into lp:unity-control-center

Proposed by Luke Yelavich on 2016-02-17
Status: Merged
Approved by: Sebastien Bacher on 2016-02-29
Approved revision: 12846
Merged at revision: 12852
Proposed branch: lp:~themuso/unity-control-center/add-a11y-profile-indicator-toggle
Merge into: lp:unity-control-center
Diff against target: 167 lines (+118/-0)
2 files modified
panels/universal-access/cc-ua-panel.c (+19/-0)
panels/universal-access/uap.ui (+99/-0)
To merge this branch: bzr merge lp:~themuso/unity-control-center/add-a11y-profile-indicator-toggle
Reviewer Review Type Date Requested Status
Sebastien Bacher 2016-02-17 Approve on 2016-02-29
Review via email: mp+286259@code.launchpad.net

Commit message

Add switch to allow the toggling of the accessibility profiles indicator

Description of the change

Add switch to allow the toggling of the accessibility profiles indicator

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

looks fine to me, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panels/universal-access/cc-ua-panel.c'
2--- panels/universal-access/cc-ua-panel.c 2014-03-28 12:57:57 +0000
3+++ panels/universal-access/cc-ua-panel.c 2016-02-17 06:56:15 +0000
4@@ -58,6 +58,7 @@
5 GSettings *mouse_settings;
6 GSettings *application_settings;
7 GSettings *mediakeys_settings;
8+ GSettings *a11y_profile_settings;
9
10 ZoomOptions *zoom_options;
11 guint shell_watch_id;
12@@ -155,6 +156,12 @@
13 priv->mediakeys_settings = NULL;
14 }
15
16+ if (priv->a11y_profile_settings)
17+ {
18+ g_object_unref (priv->a11y_profile_settings);
19+ priv->a11y_profile_settings = NULL;
20+ }
21+
22 if (priv->zoom_options)
23 {
24 g_object_unref (priv->zoom_options);
25@@ -496,6 +503,16 @@
26 cc_ua_panel_set_shortcut_label (self, "seeing_reader_enable_keybinding_label", "screenreader");
27 }
28
29+static void
30+cc_ua_panel_init_profiles (CcUaPanel *self)
31+{
32+ CcUaPanelPrivate *priv = self->priv;
33+
34+ settings_on_off_editor_new (priv, priv->a11y_profile_settings,
35+ "always-show-universal-access-status",
36+ WID (priv->builder, "profiles_indicator_switch"),
37+ NULL);
38+}
39
40 /* hearing/sound section */
41 static void
42@@ -723,6 +740,7 @@
43 priv->mouse_settings = g_settings_new ("org.gnome.desktop.a11y.mouse");
44 priv->application_settings = g_settings_new ("org.gnome.desktop.a11y.applications");
45 priv->mediakeys_settings = g_settings_new ("org.gnome.settings-daemon.plugins.media-keys");
46+ priv->a11y_profile_settings = g_settings_new ("org.gnome.desktop.a11y");
47
48 if (is_unity_session ())
49 priv->unity_interface_settings = g_settings_new ("com.canonical.Unity.Interface");
50@@ -731,6 +749,7 @@
51 cc_ua_panel_init_mouse (self);
52 cc_ua_panel_init_hearing (self);
53 cc_ua_panel_init_seeing (self);
54+ cc_ua_panel_init_profiles (self);
55
56 widget = (GtkWidget*) gtk_builder_get_object (priv->builder,
57 "universal_access_box");
58
59=== modified file 'panels/universal-access/uap.ui'
60--- panels/universal-access/uap.ui 2012-09-13 10:37:35 +0000
61+++ panels/universal-access/uap.ui 2016-02-17 06:56:15 +0000
62@@ -2536,6 +2536,105 @@
63 <property name="tab_fill">False</property>
64 </packing>
65 </child>
66+ <child>
67+ <object class="GtkVBox" id="profiles_vbox">
68+ <property name="visible">True</property>
69+ <property name="can_focus">False</property>
70+ <property name="border_width">12</property>
71+ <property name="spacing">12</property>
72+ <child>
73+ <object class="GtkGrid" id="grid5">
74+ <property name="visible">True</property>
75+ <property name="can_focus">False</property>
76+ <property name="orientation">vertical</property>
77+ <property name="row_spacing">18</property>
78+ <property name="column_spacing">24</property>
79+ <child>
80+ <object class="GtkBox" id="box14">
81+ <property name="visible">True</property>
82+ <property name="can_focus">False</property>
83+ <property name="valign">start</property>
84+ <property name="orientation">vertical</property>
85+ <property name="spacing">6</property>
86+ <child>
87+ <object class="GtkBox" id="box20">
88+ <property name="visible">True</property>
89+ <property name="can_focus">False</property>
90+ <property name="orientation">vertical</property>
91+ <child>
92+ <object class="GtkLabel" id="typing_sticky_label16">
93+ <property name="visible">True</property>
94+ <property name="can_focus">False</property>
95+ <property name="label" translatable="yes">Show accessibility profiles indicator</property>
96+ <property name="mnemonic_widget">profiles_indicator_switch</property>
97+ <property name="xalign">0</property>
98+ <attributes>
99+ <attribute name="weight" value="bold"/>
100+ </attributes>
101+ </object>
102+ <packing>
103+ <property name="expand">False</property>
104+ <property name="fill">True</property>
105+ <property name="position">0</property>
106+ </packing>
107+ </child>
108+ </object>
109+ <packing>
110+ <property name="expand">False</property>
111+ <property name="fill">True</property>
112+ <property name="position">0</property>
113+ </packing>
114+ </child>
115+ <child>
116+ <placeholder/>
117+ </child>
118+ </object>
119+ <packing>
120+ <property name="left_attach">0</property>
121+ <property name="top_attach">0</property>
122+ </packing>
123+ </child>
124+ <child>
125+ <object class="GtkSwitch" id="profiles_indicator_switch">
126+ <property name="use_action_appearance">False</property>
127+ <property name="visible">True</property>
128+ <property name="can_focus">True</property>
129+ <property name="halign">end</property>
130+ <property name="valign">start</property>
131+ <property name="hexpand">True</property>
132+ </object>
133+ <packing>
134+ <property name="left_attach">1</property>
135+ <property name="top_attach">0</property>
136+ </packing>
137+ </child>
138+ </object>
139+ <packing>
140+ <property name="expand">True</property>
141+ <property name="fill">True</property>
142+ <property name="position">0</property>
143+ </packing>
144+ </child>
145+ </object>
146+ <packing>
147+ <property name="position">4</property>
148+ <property name="tab_fill">False</property>
149+ </packing>
150+ </child>
151+ <child type="tab">
152+ <object class="GtkLabel" id="profiles_tab_label">
153+ <property name="visible">True</property>
154+ <property name="can_focus">False</property>
155+ <property name="label" translatable="yes">Profiles</property>
156+ <attributes>
157+ <attribute name="scale" value="1"/>
158+ </attributes>
159+ </object>
160+ <packing>
161+ <property name="position">4</property>
162+ <property name="tab_fill">False</property>
163+ </packing>
164+ </child>
165 </object>
166 <packing>
167 <property name="expand">False</property>

Subscribers

People subscribed via source and target branches