ui: Remove explicit can-focus

Glade misleads us into thinking we need these, but the
property is somewhat confusing in GTK3. In general we don't
want `can-focus` to be true for containers, as that will
break keynav for the children. For non-containers, the
defaults are appropriate.

Instead of manually setting `can-focus`, we should just
use the default values. GTK has sane defaults.

Fixes https://gitlab.gnome.org/GNOME/calls/-/issues/366
This commit is contained in:
Christopher Davis
2021-11-30 11:52:36 -08:00
parent 3e22ef8c74
commit 50847dfe43
9 changed files with 0 additions and 59 deletions

View File

@@ -4,7 +4,6 @@
<requires lib="gtk+" version="3.20"/>
<requires lib="libhandy" version="1.0"/>
<template class="CallsMainWindow" parent="HdyApplicationWindow">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Calls</property>
<property name="hide_titlebar_when_maximized">True</property>
<property name="show_menubar">False</property>
@@ -17,13 +16,11 @@
<object class="HdyHeaderBar">
<property name="visible">True</property>
<property name="centering_policy">strict</property>
<property name="can_focus">False</property>
<property name="show_close_button">True</property>
<property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/>
<child type="title">
<object class="HdyViewSwitcherTitle" id="title_switcher">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stack">main_stack</property>
<property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/>
</object>
@@ -31,12 +28,10 @@
<child>
<object class="GtkMenuButton">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="popover">menu_popover</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">open-menu-symbolic</property>
</object>
</child>
@@ -50,29 +45,24 @@
<child>
<object class="GtkOverlay">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child type="overlay">
<object class="CallsInAppNotification" id="in_app_notification">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkRevealer" id="permanent_error_revealer">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="reveal_child">True</property>
<child>
<object class="GtkLabel" id="permanent_error_label">
<property name="justify">center</property>
<property name="wrap">True</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<style>
<class name="error-state-message"/>
</style>
@@ -83,7 +73,6 @@
<child>
<object class="GtkStack" id="main_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="homogeneous">False</property>
<property name="expand">True</property>
</object>
@@ -91,7 +80,6 @@
<child>
<object class="HdyViewSwitcherBar" id="switcher_bar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stack">main_stack</property>
<property name="reveal" bind-source="title_switcher" bind-property="title-visible" bind-flags="sync-create"/>
</object>
@@ -218,7 +206,6 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="can_focus">False</property>
<property name="margin">12</property>
<property name="spacing">6</property>
<child>