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

Proposed by Luke Yelavich
Status: Merged
Approved by: Sebastien Bacher
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 Approve
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.
Revision history for this message
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
=== modified file 'panels/universal-access/cc-ua-panel.c'
--- panels/universal-access/cc-ua-panel.c 2014-03-28 12:57:57 +0000
+++ panels/universal-access/cc-ua-panel.c 2016-02-17 06:56:15 +0000
@@ -58,6 +58,7 @@
58 GSettings *mouse_settings;58 GSettings *mouse_settings;
59 GSettings *application_settings;59 GSettings *application_settings;
60 GSettings *mediakeys_settings;60 GSettings *mediakeys_settings;
61 GSettings *a11y_profile_settings;
6162
62 ZoomOptions *zoom_options;63 ZoomOptions *zoom_options;
63 guint shell_watch_id;64 guint shell_watch_id;
@@ -155,6 +156,12 @@
155 priv->mediakeys_settings = NULL;156 priv->mediakeys_settings = NULL;
156 }157 }
157158
159 if (priv->a11y_profile_settings)
160 {
161 g_object_unref (priv->a11y_profile_settings);
162 priv->a11y_profile_settings = NULL;
163 }
164
158 if (priv->zoom_options)165 if (priv->zoom_options)
159 {166 {
160 g_object_unref (priv->zoom_options);167 g_object_unref (priv->zoom_options);
@@ -496,6 +503,16 @@
496 cc_ua_panel_set_shortcut_label (self, "seeing_reader_enable_keybinding_label", "screenreader");503 cc_ua_panel_set_shortcut_label (self, "seeing_reader_enable_keybinding_label", "screenreader");
497}504}
498505
506static void
507cc_ua_panel_init_profiles (CcUaPanel *self)
508{
509 CcUaPanelPrivate *priv = self->priv;
510
511 settings_on_off_editor_new (priv, priv->a11y_profile_settings,
512 "always-show-universal-access-status",
513 WID (priv->builder, "profiles_indicator_switch"),
514 NULL);
515}
499516
500/* hearing/sound section */517/* hearing/sound section */
501static void518static void
@@ -723,6 +740,7 @@
723 priv->mouse_settings = g_settings_new ("org.gnome.desktop.a11y.mouse");740 priv->mouse_settings = g_settings_new ("org.gnome.desktop.a11y.mouse");
724 priv->application_settings = g_settings_new ("org.gnome.desktop.a11y.applications");741 priv->application_settings = g_settings_new ("org.gnome.desktop.a11y.applications");
725 priv->mediakeys_settings = g_settings_new ("org.gnome.settings-daemon.plugins.media-keys");742 priv->mediakeys_settings = g_settings_new ("org.gnome.settings-daemon.plugins.media-keys");
743 priv->a11y_profile_settings = g_settings_new ("org.gnome.desktop.a11y");
726744
727 if (is_unity_session ())745 if (is_unity_session ())
728 priv->unity_interface_settings = g_settings_new ("com.canonical.Unity.Interface");746 priv->unity_interface_settings = g_settings_new ("com.canonical.Unity.Interface");
@@ -731,6 +749,7 @@
731 cc_ua_panel_init_mouse (self);749 cc_ua_panel_init_mouse (self);
732 cc_ua_panel_init_hearing (self);750 cc_ua_panel_init_hearing (self);
733 cc_ua_panel_init_seeing (self);751 cc_ua_panel_init_seeing (self);
752 cc_ua_panel_init_profiles (self);
734753
735 widget = (GtkWidget*) gtk_builder_get_object (priv->builder,754 widget = (GtkWidget*) gtk_builder_get_object (priv->builder,
736 "universal_access_box");755 "universal_access_box");
737756
=== modified file 'panels/universal-access/uap.ui'
--- panels/universal-access/uap.ui 2012-09-13 10:37:35 +0000
+++ panels/universal-access/uap.ui 2016-02-17 06:56:15 +0000
@@ -2536,6 +2536,105 @@
2536 <property name="tab_fill">False</property>2536 <property name="tab_fill">False</property>
2537 </packing>2537 </packing>
2538 </child>2538 </child>
2539 <child>
2540 <object class="GtkVBox" id="profiles_vbox">
2541 <property name="visible">True</property>
2542 <property name="can_focus">False</property>
2543 <property name="border_width">12</property>
2544 <property name="spacing">12</property>
2545 <child>
2546 <object class="GtkGrid" id="grid5">
2547 <property name="visible">True</property>
2548 <property name="can_focus">False</property>
2549 <property name="orientation">vertical</property>
2550 <property name="row_spacing">18</property>
2551 <property name="column_spacing">24</property>
2552 <child>
2553 <object class="GtkBox" id="box14">
2554 <property name="visible">True</property>
2555 <property name="can_focus">False</property>
2556 <property name="valign">start</property>
2557 <property name="orientation">vertical</property>
2558 <property name="spacing">6</property>
2559 <child>
2560 <object class="GtkBox" id="box20">
2561 <property name="visible">True</property>
2562 <property name="can_focus">False</property>
2563 <property name="orientation">vertical</property>
2564 <child>
2565 <object class="GtkLabel" id="typing_sticky_label16">
2566 <property name="visible">True</property>
2567 <property name="can_focus">False</property>
2568 <property name="label" translatable="yes">Show accessibility profiles indicator</property>
2569 <property name="mnemonic_widget">profiles_indicator_switch</property>
2570 <property name="xalign">0</property>
2571 <attributes>
2572 <attribute name="weight" value="bold"/>
2573 </attributes>
2574 </object>
2575 <packing>
2576 <property name="expand">False</property>
2577 <property name="fill">True</property>
2578 <property name="position">0</property>
2579 </packing>
2580 </child>
2581 </object>
2582 <packing>
2583 <property name="expand">False</property>
2584 <property name="fill">True</property>
2585 <property name="position">0</property>
2586 </packing>
2587 </child>
2588 <child>
2589 <placeholder/>
2590 </child>
2591 </object>
2592 <packing>
2593 <property name="left_attach">0</property>
2594 <property name="top_attach">0</property>
2595 </packing>
2596 </child>
2597 <child>
2598 <object class="GtkSwitch" id="profiles_indicator_switch">
2599 <property name="use_action_appearance">False</property>
2600 <property name="visible">True</property>
2601 <property name="can_focus">True</property>
2602 <property name="halign">end</property>
2603 <property name="valign">start</property>
2604 <property name="hexpand">True</property>
2605 </object>
2606 <packing>
2607 <property name="left_attach">1</property>
2608 <property name="top_attach">0</property>
2609 </packing>
2610 </child>
2611 </object>
2612 <packing>
2613 <property name="expand">True</property>
2614 <property name="fill">True</property>
2615 <property name="position">0</property>
2616 </packing>
2617 </child>
2618 </object>
2619 <packing>
2620 <property name="position">4</property>
2621 <property name="tab_fill">False</property>
2622 </packing>
2623 </child>
2624 <child type="tab">
2625 <object class="GtkLabel" id="profiles_tab_label">
2626 <property name="visible">True</property>
2627 <property name="can_focus">False</property>
2628 <property name="label" translatable="yes">Profiles</property>
2629 <attributes>
2630 <attribute name="scale" value="1"/>
2631 </attributes>
2632 </object>
2633 <packing>
2634 <property name="position">4</property>
2635 <property name="tab_fill">False</property>
2636 </packing>
2637 </child>
2539 </object>2638 </object>
2540 <packing>2639 <packing>
2541 <property name="expand">False</property>2640 <property name="expand">False</property>

Subscribers

People subscribed via source and target branches