[gnome-software/1587-updates-glitchy-empty-list: 17/21] gs-app-row: Hide the row when the unreveal is finished
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1587-updates-glitchy-empty-list: 17/21] gs-app-row: Hide the row when the unreveal is finished
- Date: Thu, 25 Aug 2022 06:11:05 +0000 (UTC)
commit 93c8ae09d9124d269d94404f51dd752b592be374
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 674a11443..b318c97a2 100644
--- a/src/gs-app-row.c
+++ b/src/gs-app-row.c
@@ -537,6 +537,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)
{
@@ -550,7 +558,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
@@ -560,7 +568,7 @@ child_unrevealed_unmapped_cb (gpointer user_data)
g_autoptr(GsAppRow) app_row = g_weak_ref_get (weak_ref);
if (app_row != NULL)
- g_signal_emit (app_row, signals[SIGNAL_UNREVEALED], 0);
+ finish_unreveal (app_row);
g_weak_ref_clear (weak_ref);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]