general: Remove unnecessary use of focusable

gtk4-builder-tool tries to port uses of `can_focus` to `focusable`,
but in real code you generally don't need to set `focusable` - the
defaults are always sensible, and removing the explicit property
means less code without any behavior change.
This commit is contained in:
Christopher Davis 2022-07-16 07:52:17 -04:00 committed by António Fernandes
parent 5fe9df1a39
commit 8837c869dd
10 changed files with 1 additions and 48 deletions

View file

@ -104,7 +104,6 @@
</child>
<child>
<object class="GtkLabel" id="title">
<property name="focusable">1</property>
<property name="label">Unknown</property>
<property name="wrap">1</property>
<property name="selectable">1</property>
@ -121,7 +120,6 @@
</child>
<child>
<object class="GtkLabel" id="artist">
<property name="focusable">1</property>
<property name="label">Unknown</property>
<property name="wrap">1</property>
<property name="selectable">1</property>
@ -138,7 +136,6 @@
</child>
<child>
<object class="GtkLabel" id="album">
<property name="focusable">1</property>
<property name="label">Unknown</property>
<property name="wrap">1</property>
<property name="selectable">1</property>
@ -155,7 +152,6 @@
</child>
<child>
<object class="GtkLabel" id="year">
<property name="focusable">1</property>
<property name="label">Unknown</property>
<property name="selectable">1</property>
<property name="ellipsize">end</property>
@ -171,7 +167,6 @@
</child>
<child>
<object class="GtkLabel" id="duration">
<property name="focusable">1</property>
<property name="label">0 seconds</property>
<property name="selectable">1</property>
<property name="ellipsize">end</property>
@ -202,7 +197,6 @@
</child>
<child>
<object class="GtkLabel" id="comment">
<property name="focusable">1</property>
<property name="label">Unknown</property>
<property name="wrap">1</property>
<property name="selectable">1</property>
@ -326,7 +320,6 @@
</child>
<child>
<object class="GtkLabel" id="dimensions">
<property name="focusable">1</property>
<property name="label">0 x 0</property>
<property name="selectable">1</property>
<property name="ellipsize">end</property>
@ -342,7 +335,6 @@
</child>
<child>
<object class="GtkLabel" id="vcodec">
<property name="focusable">1</property>
<property name="label">N/A</property>
<property name="selectable">1</property>
<property name="ellipsize">end</property>
@ -358,7 +350,6 @@
</child>
<child>
<object class="GtkLabel" id="framerate">
<property name="focusable">1</property>
<property name="label">0 frames per second</property>
<property name="selectable">1</property>
<property name="ellipsize">end</property>
@ -374,7 +365,6 @@
</child>
<child>
<object class="GtkLabel" id="video_bitrate">
<property name="focusable">1</property>
<property name="label">0 kbps</property>
<property name="selectable">1</property>
<property name="ellipsize">end</property>
@ -427,7 +417,6 @@
</child>
<child>
<object class="GtkLabel" id="samplerate">
<property name="focusable">1</property>
<property name="label">0 Hz</property>
<property name="selectable">1</property>
<property name="xalign">0</property>
@ -457,7 +446,6 @@
</child>
<child>
<object class="GtkLabel" id="audio_bitrate">
<property name="focusable">1</property>
<property name="label">0 kbps</property>
<property name="selectable">1</property>
<property name="ellipsize">end</property>
@ -488,7 +476,6 @@
</child>
<child>
<object class="GtkLabel" id="acodec">
<property name="focusable">1</property>
<property name="label">N/A</property>
<property name="selectable">1</property>
<property name="ellipsize">end</property>
@ -519,7 +506,6 @@
</child>
<child>
<object class="GtkLabel" id="channels">
<property name="focusable">1</property>
<property name="label">0 Channels</property>
<property name="selectable">1</property>
<property name="xalign">0</property>

View file

@ -100,7 +100,6 @@
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">_Cancel</property>
<property name="use_underline">True</property>
<property name="focusable">True</property>
</object>
</child>
<child type="action">
@ -176,7 +175,6 @@
<property name="halign">center</property>
<child>
<object class="GtkEntry" id="name_entry">
<property name="focusable">True</property>
<property name="width_request">400</property>
<property name="hexpand">True</property>
<property name="activates-default">True</property>
@ -288,7 +286,6 @@
</child>
<child>
<object class="GtkEntry" id="find_entry">
<property name="focusable">True</property>
<property name="width_request">375</property>
<property name="activates-default">True</property>
<signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes"/>
@ -312,7 +309,6 @@
</child>
<child>
<object class="GtkEntry" id="replace_entry">
<property name="focusable">True</property>
<property name="width_request">375</property>
<signal name="changed" handler="file_names_widget_entry_on_changed" swapped="yes"/>
<signal name="activate" handler="file_names_widget_on_activate" swapped="yes"/>

View file

@ -19,7 +19,6 @@
<object class="GtkScrolledWindow">
<property name="child">
<object class="GtkTreeView" id="view">
<property name="focusable">True</property>
<property name="vexpand">True</property>
<property name="model">store</property>
<property name="headers-visible">False</property>
@ -68,7 +67,6 @@
<child>
<object class="GtkButton" id="move_up_button">
<property name="sensitive">False</property>
<property name="focusable">True</property>
<signal name="clicked" handler="move_up_clicked_callback" swapped="no"/>
<child>
<object class="GtkImage">
@ -80,7 +78,6 @@
<child>
<object class="GtkButton" id="move_down_button">
<property name="sensitive">False</property>
<property name="focusable">True</property>
<signal name="clicked" handler="move_down_clicked_callback" swapped="no"/>
<child>
<object class="GtkImage">
@ -99,7 +96,6 @@
<child>
<object class="GtkButton" id="use_default_button">
<property name="label" translatable="yes">Reset to De_fault</property>
<property name="focusable">True</property>
<property name="tooltip-text" translatable="yes">Replace the current List Columns settings with the default settings</property>
<property name="use-underline">True</property>
<signal name="clicked" handler="use_default_clicked_callback" swapped="no"/>

View file

@ -33,7 +33,6 @@
<property name="spacing">12</property>
<child>
<object class="GtkEntry" id="name_entry">
<property name="focusable">True</property>
<property name="hexpand">True</property>
<property name="width-chars">30</property>
</object>
@ -76,14 +75,12 @@
<child type="action">
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">Cancel</property>
<property name="focusable">True</property>
<property name="receives_default">True</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="activate_button">
<property name="label" translatable="yes">Create</property>
<property name="focusable">True</property>
<property name="receives_default">True</property>
<property name="sensitive">False</property>
</object>

View file

@ -21,9 +21,7 @@
</object>
</child>
<child>
<object class="GtkEntry" id="name_entry">
<property name="focusable">True</property>
</object>
<object class="GtkEntry" id="name_entry"/>
</child>
<child>
<object class="GtkRevealer" id="error_revealer">
@ -41,13 +39,11 @@
<child type="action">
<object class="GtkButton" id="cancel_button">
<property name="label" translatable="yes">Cancel</property>
<property name="focusable">True</property>
<property name="receives_default">True</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="ok_button">
<property name="focusable">True</property>
<property name="receives_default">True</property>
<property name="sensitive">False</property>
</object>

View file

@ -35,7 +35,6 @@
</child>
<child>
<object class="GtkEntry" id="pattern_entry">
<property name="focusable">True</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
</object>

View file

@ -39,7 +39,6 @@
</child>
<child>
<object class="GtkButton" id="button">
<property name="focusable">True</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="margin_start">20</property>

View file

@ -19,7 +19,6 @@
</child>
<child>
<object class="GtkEntry" id="name_entry">
<property name="focusable">True</property>
<property name="margin-bottom">12</property>
</object>
</child>
@ -39,7 +38,6 @@
<object class="GtkButton" id="rename_button">
<property name="label" translatable="yes">_Rename</property>
<property name="sensitive">False</property>
<property name="focusable">True</property>
<property name="halign">end</property>
<property name="use-underline">True</property>
<style>

View file

@ -35,7 +35,6 @@
<object class="GtkBox">
<child>
<object class="GtkButton" id="select_date_button">
<property name="focusable">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Select a date</property>
<property name="hexpand">True</property>
@ -51,7 +50,6 @@
<child>
<object class="GtkButton" id="clear_date_button">
<property name="visible">False</property>
<property name="focusable">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Clear the currently selected date</property>
<signal name="clicked" handler="clear_date_button_clicked" object="NautilusSearchPopover" swapped="no"/>
@ -74,7 +72,6 @@
<property name="name">date-entry</property>
<property name="child">
<object class="GtkEntry" id="date_entry">
<property name="focusable">True</property>
<property name="secondary_icon_name">x-office-calendar-symbolic</property>
<property name="secondary_icon_tooltip_text" translatable="yes">Show a calendar to select the date</property>
<signal name="icon-release" handler="toggle_calendar_icon_clicked" object="NautilusSearchPopover" swapped="no"/>
@ -122,7 +119,6 @@
<property name="child">
<object class="GtkScrolledWindow">
<property name="height_request">200</property>
<property name="focusable">True</property>
<property name="hexpand">True</property>
<property name="child">
<object class="GtkViewport">
@ -143,7 +139,6 @@
<property name="name">date-calendar</property>
<property name="child">
<object class="GtkCalendar" id="calendar">
<property name="focusable">True</property>
<property name="valign">start</property>
<property name="show_week_numbers">True</property>
<signal name="day-selected" handler="calendar_day_selected" object="NautilusSearchPopover" swapped="no" />
@ -228,7 +223,6 @@
<property name="name">type-button</property>
<property name="child">
<object class="GtkButton" id="select_type_button">
<property name="focusable">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Which file types will be searched</property>
<signal name="clicked" handler="select_type_button_clicked" object="NautilusSearchPopover" swapped="no"/>
@ -259,7 +253,6 @@
<property name="child">
<object class="GtkScrolledWindow">
<property name="height_request">250</property>
<property name="focusable">True</property>
<property name="child">
<object class="GtkViewport">
<property name="child">

View file

@ -108,7 +108,6 @@
<template class="NautilusToolbar" parent="AdwBin">
<child>
<object class="AdwHeaderBar">
<property name="focusable">False</property>
<child type="title">
<object class="GtkBox" id="header_toolbar">
<property name="spacing">6</property>
@ -152,7 +151,6 @@
</child>
<child>
<object class="GtkToggleButton" id="search_button">
<property name="focusable">True</property>
<property name="tooltip_text" translatable="yes">Search</property>
<property name="halign">center</property>
<property name="valign">center</property>
@ -180,7 +178,6 @@
</child>
<child type="start">
<object class="GtkButton" id="back_button">
<property name="focusable">True</property>
<property name="tooltip_text" translatable="yes">Go back</property>
<property name="halign">center</property>
<property name="valign">center</property>
@ -198,7 +195,6 @@
</child>
<child type="start">
<object class="GtkButton" id="forward_button">
<property name="focusable">True</property>
<property name="tooltip_text" translatable="yes">Go forward</property>
<property name="halign">center</property>
<property name="valign">center</property>
@ -223,7 +219,6 @@
</child>
<child type="end">
<object class="GtkMenuButton" id="app_button">
<property name="focusable">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="popover">
@ -266,7 +261,6 @@
<object class="AdwSplitButton" id="view_split_button">
<property name="halign">center</property>
<property name="valign">center</property>
<property name="focusable">True</property>
<property name="tooltip_text" translatable="yes">Toggle view</property>
<property name="action_name">slot.files-view-mode-toggle</property>
<property name="menu-model">view_menu</property>
@ -284,7 +278,6 @@
<property name="transition_type">slide-right</property>
<property name="child">
<object class="GtkMenuButton" id="operations_button">
<property name="focusable">True</property>
<property name="tooltip_text" translatable="yes">Show operations</property>
<property name="popover">operations_popover</property>
<child>