[gnome-software] Do not show a critical warning if the spinner re-appears
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not show a critical warning if the spinner re-appears
- Date: Tue, 29 Oct 2013 10:34:31 +0000 (UTC)
commit ab9cc642fd43d5b42ea41b6321c4b63d4326603b
Author: Richard Hughes <richard hughsie com>
Date: Tue Oct 29 10:31:16 2013 +0000
Do not show a critical warning if the spinner re-appears
src/gs-utils.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-utils.c b/src/gs-utils.c
index edbb5aa..4b1af7e 100644
--- a/src/gs-utils.c
+++ b/src/gs-utils.c
@@ -41,9 +41,10 @@ fade_in (gpointer data)
opacity = opacity + 0.1;
gtk_widget_set_opacity (spinner, opacity);
- if (opacity >= 1.0)
+ if (opacity >= 1.0) {
+ g_object_steal_data (G_OBJECT (spinner), "fade-timeout");
return G_SOURCE_REMOVE;
-
+ }
return G_SOURCE_CONTINUE;
}
@@ -66,6 +67,8 @@ start_spinning (gpointer data)
g_object_set_data_full (G_OBJECT (spinner), "fade-timeout",
GUINT_TO_POINTER (id), remove_source);
+ /* don't try to remove this source in the future */
+ g_object_steal_data (G_OBJECT (spinner), "start-timeout");
return G_SOURCE_REMOVE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]