[gnome-software/1587-updates-glitchy-empty-list: 7/11] gs-app-row: Hide the row when the unreveal is finished




commit 839b9316892137210451e98bed334d30b241bb57
Author: Milan Crha <mcrha redhat com>
Date:   Thu Aug 25 07:54:39 2022 +0200

    gs-app-row: Hide the row when the unreveal is finished
    
    This will ensure the row is not visible when it is collapsed.
    The "unrevealed" signal handlers can do further processing on
    the row if needed.

 src/gs-app-row.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-app-row.c b/src/gs-app-row.c
index 2cd309343..41de306a4 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -538,6 +538,14 @@ gs_app_row_actually_refresh (GsAppRow *app_row)
                                       gtk_widget_get_visible (priv->description_label) ? 20 : -1);
 }
 
+static void
+finish_unreveal (GsAppRow *app_row)
+{
+       gtk_widget_hide (GTK_WIDGET (app_row));
+
+       g_signal_emit (app_row, signals[SIGNAL_UNREVEALED], 0);
+}
+
 static void
 child_unrevealed (GObject *revealer, GParamSpec *pspec, gpointer user_data)
 {
@@ -551,7 +559,7 @@ child_unrevealed (GObject *revealer, GParamSpec *pspec, gpointer user_data)
        if (priv->app == NULL || !gtk_widget_get_mapped (GTK_WIDGET (app_row)))
                return;
 
-       g_signal_emit (app_row, signals[SIGNAL_UNREVEALED], 0);
+       finish_unreveal (app_row);
 }
 
 static gboolean
@@ -562,7 +570,7 @@ child_unrevealed_unmapped_cb (gpointer user_data)
 
        priv->unreveal_in_idle_id = 0;
 
-       g_signal_emit (app_row, signals[SIGNAL_UNREVEALED], 0);
+       finish_unreveal (app_row);
 
        return G_SOURCE_REMOVE;
 }


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