calendar, dateMenu: Allow focus on menu items
https://bugzilla.gnome.org/show_bug.cgi?id=667434
This commit is contained in:
parent
654f1dd055
commit
c1240d3f2c
@ -443,14 +443,16 @@ const Calendar = new Lang.Class({
|
|||||||
this.actor.add(this._topBox,
|
this.actor.add(this._topBox,
|
||||||
{ row: 0, col: 0, col_span: offsetCols + 7 });
|
{ row: 0, col: 0, col_span: offsetCols + 7 });
|
||||||
|
|
||||||
let back = new St.Button({ style_class: 'calendar-change-month-back' });
|
let back = new St.Button({ style_class: 'calendar-change-month-back',
|
||||||
|
can_focus: true });
|
||||||
this._topBox.add(back);
|
this._topBox.add(back);
|
||||||
back.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
|
back.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
|
||||||
|
|
||||||
this._monthLabel = new St.Label({style_class: 'calendar-month-label'});
|
this._monthLabel = new St.Label({style_class: 'calendar-month-label'});
|
||||||
this._topBox.add(this._monthLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE });
|
this._topBox.add(this._monthLabel, { expand: true, x_fill: false, x_align: St.Align.MIDDLE });
|
||||||
|
|
||||||
let forward = new St.Button({ style_class: 'calendar-change-month-forward' });
|
let forward = new St.Button({ style_class: 'calendar-change-month-forward',
|
||||||
|
can_focus: true });
|
||||||
this._topBox.add(forward);
|
this._topBox.add(forward);
|
||||||
forward.connect('clicked', Lang.bind(this, this._onNextMonthButtonClicked));
|
forward.connect('clicked', Lang.bind(this, this._onNextMonthButtonClicked));
|
||||||
|
|
||||||
@ -590,7 +592,8 @@ const Calendar = new Lang.Class({
|
|||||||
// nRows here means 6 weeks + one header + one navbar
|
// nRows here means 6 weeks + one header + one navbar
|
||||||
let nRows = 8;
|
let nRows = 8;
|
||||||
while (row < 8) {
|
while (row < 8) {
|
||||||
let button = new St.Button({ label: iter.getDate().toString() });
|
let button = new St.Button({ label: iter.getDate().toString(),
|
||||||
|
can_focus: true });
|
||||||
let rtl = button.get_text_direction() == Clutter.TextDirection.RTL;
|
let rtl = button.get_text_direction() == Clutter.TextDirection.RTL;
|
||||||
|
|
||||||
if (this._eventSource.isDummy)
|
if (this._eventSource.isDummy)
|
||||||
|
@ -90,12 +90,10 @@ const DateMenuButton = new Lang.Class({
|
|||||||
|
|
||||||
this._openCalendarItem = new PopupMenu.PopupMenuItem(_("Open Calendar"));
|
this._openCalendarItem = new PopupMenu.PopupMenuItem(_("Open Calendar"));
|
||||||
this._openCalendarItem.connect('activate', Lang.bind(this, this._onOpenCalendarActivate));
|
this._openCalendarItem.connect('activate', Lang.bind(this, this._onOpenCalendarActivate));
|
||||||
this._openCalendarItem.actor.can_focus = false;
|
|
||||||
vbox.add(this._openCalendarItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
vbox.add(this._openCalendarItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
||||||
|
|
||||||
this._openClocksItem = new PopupMenu.PopupMenuItem(_("Open Clocks"));
|
this._openClocksItem = new PopupMenu.PopupMenuItem(_("Open Clocks"));
|
||||||
this._openClocksItem.connect('activate', Lang.bind(this, this._onOpenClocksActivate));
|
this._openClocksItem.connect('activate', Lang.bind(this, this._onOpenClocksActivate));
|
||||||
this._openClocksItem.actor.can_focus = false;
|
|
||||||
vbox.add(this._openClocksItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
vbox.add(this._openClocksItem.actor, {y_align: St.Align.END, expand: true, y_fill: false});
|
||||||
|
|
||||||
Shell.AppSystem.get_default().connect('installed-changed',
|
Shell.AppSystem.get_default().connect('installed-changed',
|
||||||
@ -105,7 +103,6 @@ const DateMenuButton = new Lang.Class({
|
|||||||
item = this.menu.addSettingsAction(_("Date & Time Settings"), 'gnome-datetime-panel.desktop');
|
item = this.menu.addSettingsAction(_("Date & Time Settings"), 'gnome-datetime-panel.desktop');
|
||||||
if (item) {
|
if (item) {
|
||||||
item.actor.show_on_set_parent = false;
|
item.actor.show_on_set_parent = false;
|
||||||
item.actor.can_focus = false;
|
|
||||||
item.actor.reparent(vbox);
|
item.actor.reparent(vbox);
|
||||||
this._dateAndTimeSeparator = separator;
|
this._dateAndTimeSeparator = separator;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user