void create_tray(void) { _get_icons(); prof_tray = gtk_status_icon_new_from_file(icon_filename->str); shutting_down = false; timer = g_timeout_add(5000, _tray_change_icon, NULL); }
void tray_init(void) { _get_icons(); gtk_ready = gtk_init_check(0, NULL); log_debug("Env is GTK-ready: %s", gtk_ready ? "true" : "false"); if (!gtk_ready) { return; } gtk_init(0, NULL); if (prefs_get_boolean(PREF_TRAY)) { log_debug("Building GTK icon"); tray_enable(); } gtk_main_iteration_do(FALSE); }