From 22a5e34ec75727861c77488aa62d606d64c95271 Mon Sep 17 00:00:00 2001 From: karl-qdh Date: Mon, 11 Apr 2011 14:45:47 +0100 Subject: Improve debug messages and only react when hiding --- src/indicator-datetime.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 7d1222e..a6d7ef2 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -272,6 +272,14 @@ static void menu_visible_notfy_cb(GtkWidget * menu, gpointer user_data) { IndicatorDatetime * self = INDICATOR_DATETIME(user_data); + g_debug("notify visible signal recieved"); + + // we should only react if we're currently visible + gboolean visible; + g_object_get(G_OBJECT(menu), "visible", &visible, NULL); + if (visible) return; + g_debug("notify visible menu hidden, resetting date"); + int y,m,d; time_t curtime; -- cgit v1.2.3