about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorDavid <petrodavi@gmail.com>2016-03-13 17:50:42 +0100
committerDavid <petrodavi@gmail.com>2016-03-13 17:50:42 +0100
commit028d24283ecf601af925224d71731f3cdfb32a02 (patch)
tree71144cfcfc1d89fba11c3d7645e46659e7fcece0 /src/main.c
parent24c5d3882cfbd0f9c627a860ce63899a916eedeb (diff)
downloadprofani-tty-028d24283ecf601af925224d71731f3cdfb32a02.tar.gz
fix no gtk init
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 4f032913..f080e063 100644
--- a/src/main.c
+++ b/src/main.c
@@ -50,6 +50,7 @@
 static gboolean version = FALSE;
 static char *log = "INFO";
 static char *account_name = NULL;
+static gboolean use_gtk = FALSE;
 
 int
 main(int argc, char **argv)
@@ -141,9 +142,11 @@ main(int argc, char **argv)
         return 0;
     }
 
-    assert (gtk_init_check(&argc, &argv) == true);
-    gtk_init(&argc, &argv);
-    prof_run(log, account_name);
+    use_gtk = gtk_init_check(&argc, &argv);
+    if (use_gtk) {
+        gtk_init(&argc, &argv);
+    }
+    prof_run(log, account_name, use_gtk);
 
     return 0;
 }