[libadwaita/wip/exalm/row-fixes: 3/4] action-row: Drop subtitle visibility check from init




commit 6bf1dd48cdc096e941c106a62adb2a84066e9f4b
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Oct 12 13:08:19 2021 +0500

    action-row: Drop subtitle visibility check from init
    
    It's completely unnecessary, it's already invisible by default, and if we
    ever set a subtitle, it will go through the corresponding setter anyway.

 src/adw-action-row.c | 12 ------------
 1 file changed, 12 deletions(-)
---
diff --git a/src/adw-action-row.c b/src/adw-action-row.c
index 30909b54..68b8c2c8 100644
--- a/src/adw-action-row.c
+++ b/src/adw-action-row.c
@@ -117,16 +117,6 @@ parent_cb (AdwActionRow *self)
   g_signal_connect_swapped (parent, "row-activated", G_CALLBACK (row_activated_cb), self);
 }
 
-static void
-update_subtitle_visibility (AdwActionRow *self)
-{
-  AdwActionRowPrivate *priv = adw_action_row_get_instance_private (self);
-
-  gtk_widget_set_visible (GTK_WIDGET (priv->subtitle),
-                          gtk_label_get_text (priv->subtitle) != NULL &&
-                          g_strcmp0 (gtk_label_get_text (priv->subtitle), "") != 0);
-}
-
 static void
 adw_action_row_get_property (GObject    *object,
                              guint       prop_id,
@@ -362,8 +352,6 @@ adw_action_row_init (AdwActionRow *self)
   g_object_bind_property_full (self, "title", priv->title, "visible", G_BINDING_SYNC_CREATE,
                                string_is_not_empty, NULL, NULL, NULL);
 
-  update_subtitle_visibility (self);
-
   g_signal_connect (self, "notify::parent", G_CALLBACK (parent_cb), NULL);
 
 }


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