~robert-ancell/unity-greeter/session-badges

« back to all changes in this revision

Viewing changes to src/menubar.vala

Merge a11y shortcut branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
    public Background? background {get; construct; default = null;}
69
69
    public bool high_contrast {get; private set; default = false;}
70
70
 
71
 
    public MenuBar (Background bg)
 
71
    public Gtk.AccelGroup? accel_group {get; construct;}
 
72
 
 
73
    public MenuBar (Background bg, Gtk.AccelGroup ag)
72
74
    {
73
 
        Object (background: bg);
 
75
        Object (background: bg, accel_group: ag);
74
76
    }
75
77
 
76
78
    public void set_layouts (List <LightDM.Layout> layouts)
200
202
        a11y_item.submenu.append (item);
201
203
        high_contrast_item = new Gtk.CheckMenuItem.with_label (_("High Contrast"));
202
204
        high_contrast_item.toggled.connect (high_contrast_toggled_cb);
 
205
        high_contrast_item.add_accelerator ("activate", accel_group, Gdk.KEY_h, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);
203
206
        high_contrast_item.show ();
204
207
        a11y_item.submenu.append (high_contrast_item);
205
208
        item = new Gtk.CheckMenuItem.with_label (_("Screen Reader"));
206
209
        item.toggled.connect (screen_reader_toggled_cb);
 
210
        item.add_accelerator ("activate", accel_group, Gdk.KEY_s, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE);
207
211
        item.show ();
208
212
        a11y_item.submenu.append (item);
209
213
        return a11y_item;