Ref #559: Geeqie won't start if clutter fails to init
authorColin Clark <colin.clark@cclark.uk>
Tue, 22 Jun 2021 10:42:34 +0000 (11:42 +0100)
committerColin Clark <colin.clark@cclark.uk>
Tue, 22 Jun 2021 10:42:34 +0000 (11:42 +0100)
https://github.com/BestImageViewer/geeqie/issues/559

Use Zenity to display a GUI message in addition to the console error.

src/main.c

index a70b7fa..fd3343e 100644 (file)
@@ -42,6 +42,7 @@
 #include "layout.h"
 #include "layout_image.h"
 #include "layout_util.h"
+#include "misc.h"
 #include "options.h"
 #include "remote.h"
 #include "secure_save.h"
@@ -1035,6 +1036,7 @@ gint main(gint argc, gchar *argv[])
                if (gtk_clutter_init(&argc, &argv) != CLUTTER_INIT_SUCCESS)
                        {
                        log_printf("Can't initialize clutter-gtk.\nStart Geeqie with the option \"geeqie --disable-clutter\"");
+                       runcmd("zenity --error --title=\"Geeqie\" --text \"Can't initialize clutter-gtk.\n\nStart Geeqie with the option:\n geeqie --disable-clutter\" --width=300");
                        exit(1);
                        }
                }