From 1e60d17d7c32194aa090f8d2ba7d5be4bffc0a44 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 30 Mar 2016 22:18:45 +0200 Subject: libgtk is now optional Having the lib is no more needed. --- src/main.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index f080e063..242bf127 100644 --- a/src/main.c +++ b/src/main.c @@ -34,7 +34,9 @@ #include "prof_config.h" +#ifdef PROF_HAVE_GTK #include +#endif #include #include #include @@ -50,7 +52,6 @@ static gboolean version = FALSE; static char *log = "INFO"; static char *account_name = NULL; -static gboolean use_gtk = FALSE; int main(int argc, char **argv) @@ -139,14 +140,21 @@ main(int argc, char **argv) g_print("Python plugins: Disabled\n"); #endif +#ifdef PROF_HAVE_GTK + g_print("GTK icons: Enabled\n"); +#else + g_print("GTK icons: Disabled\n"); +#endif + return 0; } - use_gtk = gtk_init_check(&argc, &argv); - if (use_gtk) { +#ifdef PROF_HAVE_GTK + if (gtk_init_check(&argc, &argv)) { gtk_init(&argc, &argv); } - prof_run(log, account_name, use_gtk); +#endif + prof_run(log, account_name); return 0; } -- cgit 1.4.1-2-gfad0