[dconf-editor] Fix some focus problems.



commit 7b166835e11179da20cc4ec432b3c6e18fa6d49d
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sun Dec 16 19:09:52 2018 +0100

    Fix some focus problems.

 editor/about-list.vala  | 10 ++++++++--
 editor/base-window.vala |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/editor/about-list.vala b/editor/about-list.vala
index 65ae5db..ec04bd6 100644
--- a/editor/about-list.vala
+++ b/editor/about-list.vala
@@ -83,7 +83,8 @@ private class AboutList : OverlayedList
     {
         main_list_store.remove_all ();
         main_list_store.append (new AboutListItem.from_icon_name    (AboutDialogInfos.logo_icon_name, 
AboutDialogInfos.program_name));
-        main_list_store.append (new AboutListItem.from_label        (AboutDialogInfos.program_name, 
"bold-label"));
+        AboutListItem program = new AboutListItem.from_label        (AboutDialogInfos.program_name, 
"bold-label");
+        main_list_store.append (program);
         main_list_store.append (new AboutListItem.from_label        (AboutDialogInfos.version));
         main_list_store.append (new AboutListItem.from_label        (AboutDialogInfos.comments));
         main_list_store.append (new AboutListItem.from_link         (AboutDialogInfos.website,
@@ -93,13 +94,16 @@ private class AboutList : OverlayedList
         if (AboutDialogInfos.license_type != License.GPL_3_0)
             assert_not_reached ();  // TODO support all licenses type
         main_list_store.append (new AboutListItem.from_link         
("https://www.gnu.org/licenses/gpl-3.0.html";, _("GNU General Public License\nversion 3 or later")));    // 
TODO better
+
+        program.grab_focus ();
     }
 
     private static inline void show_credits (ref GLib.ListStore main_list_store)
     {
         main_list_store.remove_all ();
         main_list_store.append (new AboutListItem.from_icon_name    (AboutDialogInfos.logo_icon_name, 
AboutDialogInfos.program_name));
-        main_list_store.append (new AboutListItem.from_label        (AboutDialogInfos.program_name, 
"bold-label"));
+        AboutListItem program = new AboutListItem.from_label        (AboutDialogInfos.program_name, 
"bold-label");
+        main_list_store.append (program);
 
         string authors = "";
         uint position = 0;
@@ -114,6 +118,8 @@ private class AboutList : OverlayedList
         main_list_store.append (new AboutListItem.with_title        (authors, _("Creators")));
 
         main_list_store.append (new AboutListItem.with_title        (AboutDialogInfos.translator_credits, 
_("Translators")));
+
+        program.grab_focus ();
     }
 }
 
diff --git a/editor/base-window.vala b/editor/base-window.vala
index 73c3eb9..ea531e8 100644
--- a/editor/base-window.vala
+++ b/editor/base-window.vala
@@ -366,6 +366,7 @@ private class BaseWindow : AdaptativeWindow, AdaptativeWidget
         in_window_about = true;
         headerbar.show_about_view ();
         base_view.show_about_view ();
+        set_focus_visible (false);  // about-list grabs focus
     }
 
     protected virtual void show_default_view (/* SimpleAction action, Variant? path_variant */)


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