[gnome-shell] calendar, dateMenu: Allow focus on menu items



commit c1240d3f2c9c3418ab22096e8f6f83fea6c4db2b
Author: Tanner Doshier <doshitan gmail com>
Date:   Thu Mar 14 10:30:38 2013 -0500

    calendar, dateMenu: Allow focus on menu items
    
    https://bugzilla.gnome.org/show_bug.cgi?id=667434

 js/ui/calendar.js |    9 ++++++---
 js/ui/dateMenu.js |    3 ---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index ed10f60..f182fe2 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -443,14 +443,16 @@ const Calendar = new Lang.Class({
         this.actor.add(this._topBox,
                        { 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);
         back.connect('clicked', Lang.bind(this, this._onPrevMonthButtonClicked));
 
         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 });
 
-        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);
         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
         let nRows = 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;
 
             if (this._eventSource.isDummy)
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index 2613e58..fa550be 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -90,12 +90,10 @@ const DateMenuButton = new Lang.Class({
 
         this._openCalendarItem = new PopupMenu.PopupMenuItem(_("Open Calendar"));
         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});
 
         this._openClocksItem = new PopupMenu.PopupMenuItem(_("Open Clocks"));
         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});
 
         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');
         if (item) {
             item.actor.show_on_set_parent = false;
-            item.actor.can_focus = false;
             item.actor.reparent(vbox);
             this._dateAndTimeSeparator = separator;
         }


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