about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorDavid <petrodavi@gmail.com>2016-03-30 22:18:45 +0200
committerDavid <petrodavi@gmail.com>2016-03-30 23:21:41 +0200
commit1e60d17d7c32194aa090f8d2ba7d5be4bffc0a44 (patch)
tree884eec01bb1255cf24b712256f5059fa1948f556 /src/main.c
parentbdad30b2d9111a5c86edeabf811481469ef0f8b4 (diff)
downloadprofani-tty-1e60d17d7c32194aa090f8d2ba7d5be4bffc0a44.tar.gz
libgtk is now optional
Having the lib is no more needed.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c16
1 files changed, 12 insertions, 4 deletions
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 <gtk/gtk.h>
+#endif
 #include <string.h>
 #include <glib.h>
 #include <assert.h>
@@ -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;
 }