[PATCH 2/2] Set initially focused widgets for storage spoke and dialogs.

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

 



In dialogs, focus goes to the rightmost button on the bottom. In the
spoke, it goes to the first DiskOverview.

Also, call each DiskOverview's show_all method after adding it.
---
 pyanaconda/ui/gui/spokes/storage.py |    5 +++++
 pyanaconda/ui/gui/spokes/storage.ui |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 28e92a8..51d50e6 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -428,6 +428,7 @@ class StorageSpoke(NormalSpoke):
         Gdk.threads_enter()
 
         # properties: kind, description, capacity, os, popup-info
+        first = True
         for disk in self.disks:
             if disk.removable:
                 kind = "drive-removable-media"
@@ -449,6 +450,10 @@ class StorageSpoke(NormalSpoke):
             overview.set_chosen(disk.name in self.data.ignoredisk.onlyuse)
             overview.connect("button-press-event", self._on_disk_clicked)
             overview.connect("key-release-event", self._on_disk_clicked)
+            overview.show_all()
+            if first:
+                overview.grab_focus()
+                first = False
 
         self._update_summary()
 
diff --git a/pyanaconda/ui/gui/spokes/storage.ui b/pyanaconda/ui/gui/spokes/storage.ui
index 652b0ca..07a7df9 100644
--- a/pyanaconda/ui/gui/spokes/storage.ui
+++ b/pyanaconda/ui/gui/spokes/storage.ui
@@ -57,6 +57,7 @@
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="halign">center</property>
                 <property name="border_width">6</property>
@@ -211,6 +212,7 @@
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="halign">center</property>
                 <property name="border_width">6</property>
@@ -472,6 +474,7 @@
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="halign">center</property>
                 <property name="border_width">6</property>
@@ -677,6 +680,7 @@
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
                 <property name="receives_default">True</property>
                 <property name="halign">end</property>
                 <property name="use_action_appearance">False</property>
-- 
1.7.8.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux