Back to index

libindicate  12.10.0
test-icon-theme-client.c
Go to the documentation of this file.
00001 
00002 #include <glib.h>
00003 #include "libindicate/indicator.h"
00004 
00005 static gboolean passed = TRUE;
00006 static GMainLoop * mainloop = NULL;
00007 
00008 static gboolean
00009 done_timeout_cb (gpointer data)
00010 {
00011        g_debug("All done.");
00012        g_main_loop_quit(mainloop);
00013        return FALSE;
00014 }
00015 
00016 int
00017 main (int argc, char * argv)
00018 {
00019        g_type_init();
00020 
00021        g_debug("Starting client");
00022        IndicateIndicator * indicator = indicate_indicator_new();
00023 
00024        indicate_server_set_icon_theme(indicate_indicator_get_server(indicator), "test-theme");
00025 
00026        g_debug("Show indicator");
00027        indicate_indicator_show(indicator);
00028 
00029        g_timeout_add_seconds(2, done_timeout_cb, indicator);
00030 
00031        mainloop = g_main_loop_new(NULL, FALSE);
00032        g_main_loop_run(mainloop);
00033 
00034        return !passed;
00035 }