[evolution] EAlertBar: Always show the most recent alert.



commit 9108b38d83a16110e5973d73a15ab4d3b8188ca4
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Oct 13 16:03:37 2010 -0400

    EAlertBar: Always show the most recent alert.
    
    Make it work like a stack instead of a queue.

 widgets/misc/e-alert-bar.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/widgets/misc/e-alert-bar.c b/widgets/misc/e-alert-bar.c
index 0e9d2b7..b050978 100644
--- a/widgets/misc/e-alert-bar.c
+++ b/widgets/misc/e-alert-bar.c
@@ -227,14 +227,10 @@ void
 e_alert_bar_add_alert (EAlertBar *alert_bar,
                        EAlert *alert)
 {
-	gboolean show_it_now;
-
 	g_return_if_fail (E_IS_ALERT_BAR (alert_bar));
 	g_return_if_fail (E_IS_ALERT (alert));
 
-	show_it_now = g_queue_is_empty (&alert_bar->priv->alerts);
-	g_queue_push_tail (&alert_bar->priv->alerts, g_object_ref (alert));
+	g_queue_push_head (&alert_bar->priv->alerts, g_object_ref (alert));
 
-	if (show_it_now)
-		alert_bar_show_alert (alert_bar);
+	alert_bar_show_alert (alert_bar);
 }



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