[nautilus/wip/cdavis/post-port-cleanups: 10/14] general: Remove unnecessary use of `focusable`




commit 8837c869ddee5b75807ef9934712b81f909e1bc6
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sat Jul 16 07:52:17 2022 -0400

    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.

 .../audio-video-properties/resources/ui/properties.ui      | 14 --------------
 src/resources/ui/nautilus-batch-rename-dialog.ui           |  4 ----
 src/resources/ui/nautilus-column-chooser.ui                |  4 ----
 src/resources/ui/nautilus-compress-dialog.ui               |  3 ---
 src/resources/ui/nautilus-create-folder-dialog.ui          |  6 +-----
 src/resources/ui/nautilus-files-view-select-items.ui       |  1 -
 src/resources/ui/nautilus-progress-info-widget.ui          |  1 -
 src/resources/ui/nautilus-rename-file-popover.ui           |  2 --
 src/resources/ui/nautilus-search-popover.ui                |  7 -------
 src/resources/ui/nautilus-toolbar.ui                       |  7 -------
 10 files changed, 1 insertion(+), 48 deletions(-)
---
diff --git a/extensions/audio-video-properties/resources/ui/properties.ui 
b/extensions/audio-video-properties/resources/ui/properties.ui
index e79a1fac7..88a6cf02f 100644
--- a/extensions/audio-video-properties/resources/ui/properties.ui
+++ b/extensions/audio-video-properties/resources/ui/properties.ui
@@ -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>
diff --git a/src/resources/ui/nautilus-batch-rename-dialog.ui 
b/src/resources/ui/nautilus-batch-rename-dialog.ui
index fd373c676..25b67d494 100644
--- a/src/resources/ui/nautilus-batch-rename-dialog.ui
+++ b/src/resources/ui/nautilus-batch-rename-dialog.ui
@@ -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"/>
diff --git a/src/resources/ui/nautilus-column-chooser.ui b/src/resources/ui/nautilus-column-chooser.ui
index da545224d..27ab39b67 100644
--- a/src/resources/ui/nautilus-column-chooser.ui
+++ b/src/resources/ui/nautilus-column-chooser.ui
@@ -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"/>
diff --git a/src/resources/ui/nautilus-compress-dialog.ui b/src/resources/ui/nautilus-compress-dialog.ui
index 665864d6f..5ffa2957e 100644
--- a/src/resources/ui/nautilus-compress-dialog.ui
+++ b/src/resources/ui/nautilus-compress-dialog.ui
@@ -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>
diff --git a/src/resources/ui/nautilus-create-folder-dialog.ui 
b/src/resources/ui/nautilus-create-folder-dialog.ui
index 91f27683c..53061037b 100644
--- a/src/resources/ui/nautilus-create-folder-dialog.ui
+++ b/src/resources/ui/nautilus-create-folder-dialog.ui
@@ -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>
diff --git a/src/resources/ui/nautilus-files-view-select-items.ui 
b/src/resources/ui/nautilus-files-view-select-items.ui
index c376cfdca..614ed2abd 100644
--- a/src/resources/ui/nautilus-files-view-select-items.ui
+++ b/src/resources/ui/nautilus-files-view-select-items.ui
@@ -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>
diff --git a/src/resources/ui/nautilus-progress-info-widget.ui 
b/src/resources/ui/nautilus-progress-info-widget.ui
index 6d78a5fa3..605c056b1 100644
--- a/src/resources/ui/nautilus-progress-info-widget.ui
+++ b/src/resources/ui/nautilus-progress-info-widget.ui
@@ -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>
diff --git a/src/resources/ui/nautilus-rename-file-popover.ui 
b/src/resources/ui/nautilus-rename-file-popover.ui
index 766433a2c..c4ab2d8e3 100644
--- a/src/resources/ui/nautilus-rename-file-popover.ui
+++ b/src/resources/ui/nautilus-rename-file-popover.ui
@@ -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>
diff --git a/src/resources/ui/nautilus-search-popover.ui b/src/resources/ui/nautilus-search-popover.ui
index f120f0b67..0d5fb9991 100644
--- a/src/resources/ui/nautilus-search-popover.ui
+++ b/src/resources/ui/nautilus-search-popover.ui
@@ -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">
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui
index 0bf8d79c2..b91da2ade 100644
--- a/src/resources/ui/nautilus-toolbar.ui
+++ b/src/resources/ui/nautilus-toolbar.ui
@@ -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>


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