summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtk_throbber.c5
-rw-r--r--gtk/gtk_throbber.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtk_throbber.c b/gtk/gtk_throbber.c
index 9070c61ba..0ccd89b5f 100644
--- a/gtk/gtk_throbber.c
+++ b/gtk/gtk_throbber.c
@@ -20,7 +20,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+#ifdef WITH_GIF
#include <libnsgif.h>
+#endif
#include "utils/log.h"
#include "gtk/gtk_throbber.h"
#include "gtk/gtk_bitmap.h"
@@ -94,6 +96,7 @@ bool nsgtk_throbber_initialise_from_png(const int frames, ...)
* \param fn Filename of GIF to use. It must have at least two frames.
* \return true on success.
*/
+#ifdef WITH_GIF
bool nsgtk_throbber_initialise_from_gif(const char *fn)
{
/* disect the GIF provided by filename in *fn into a series of
@@ -212,6 +215,7 @@ bool nsgtk_throbber_initialise_from_gif(const char *fn)
return true;
}
+#endif
void nsgtk_throbber_finalise(void)
{
@@ -225,3 +229,4 @@ void nsgtk_throbber_finalise(void)
nsgtk_throbber = NULL;
}
+
diff --git a/gtk/gtk_throbber.h b/gtk/gtk_throbber.h
index a98a5c5eb..b7d3d8804 100644
--- a/gtk/gtk_throbber.h
+++ b/gtk/gtk_throbber.h
@@ -29,7 +29,9 @@ struct nsgtk_throbber
extern struct nsgtk_throbber *nsgtk_throbber;
+#ifdef WITH_GIF
bool nsgtk_throbber_initialise_from_gif(const char *fn);
+#endif
bool nsgtk_throbber_initialise_from_png(const int frames, ...);
void nsgtk_throbber_finalise(void);