aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkarl-qdh <karl@qdh.org.uk>2011-04-11 14:45:47 +0100
committerkarl-qdh <karl@qdh.org.uk>2011-04-11 14:45:47 +0100
commit22a5e34ec75727861c77488aa62d606d64c95271 (patch)
treebaeb38c99820867b7e162f4e61103af0789a4a0c
parent9e768e9751cd1705146f245d61dedc5d9f6147d5 (diff)
downloadayatana-indicator-datetime-22a5e34ec75727861c77488aa62d606d64c95271.tar.gz
ayatana-indicator-datetime-22a5e34ec75727861c77488aa62d606d64c95271.tar.bz2
ayatana-indicator-datetime-22a5e34ec75727861c77488aa62d606d64c95271.zip
Improve debug messages and only react when hiding
-rw-r--r--src/indicator-datetime.c8
1 files changed, 8 insertions, 0 deletions
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;