diff options
author | Ted Gould <ted@canonical.com> | 2009-02-12 08:24:36 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-02-12 08:24:36 -0600 |
commit | e1c5a98895875aaa39aeb274e631f19fb0cb6414 (patch) | |
tree | b89b31209752673ab36a5419386b8700c5416fd2 | |
parent | 31d107e227f9e6d663ab43bfbecdc5b81bc3ae64 (diff) | |
download | libayatana-indicator-e1c5a98895875aaa39aeb274e631f19fb0cb6414.tar.gz libayatana-indicator-e1c5a98895875aaa39aeb274e631f19fb0cb6414.tar.bz2 libayatana-indicator-e1c5a98895875aaa39aeb274e631f19fb0cb6414.zip |
Adding in a timer function to change the time every three minutes or
so in order to test modifying times.
-rw-r--r-- | tests/im-client.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/im-client.c b/tests/im-client.c index 255ca37..3670bfa 100644 --- a/tests/im-client.c +++ b/tests/im-client.c @@ -23,6 +23,20 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "libindicate/server.h" #include "libindicate/indicator-message.h" +static gboolean +timeout_cb (gpointer data) +{ + g_debug("Modifying time"); + + IndicateIndicator * indicator = INDICATE_INDICATOR(data); + + GTimeVal time; + g_get_current_time(&time); + indicate_indicator_set_property_time(INDICATE_INDICATOR(indicator), "time", &time); + + return TRUE; +} + static void display (IndicateIndicator * indicator, gpointer data) { @@ -54,6 +68,8 @@ main (int argc, char ** argv) g_signal_connect(G_OBJECT(indicator), INDICATE_INDICATOR_SIGNAL_DISPLAY, G_CALLBACK(display), NULL); + g_timeout_add_seconds(180, timeout_cb, indicator); + g_main_loop_run(g_main_loop_new(NULL, FALSE)); return 0; |