diff options
Diffstat (limited to 'gtk/gtk_gui.c')
-rw-r--r-- | gtk/gtk_gui.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index dfeec03f5..b251fec15 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -195,8 +195,32 @@ void gui_init(int argc, char** argv) nsgtk_completion_init(); - find_resource(buf, "throbber.gif", "./gtk/res/throbber.gif"); - nsgtk_throbber_initialise(buf); + /* This is an ugly hack to just get the new-style throbber going. + * It, along with the PNG throbber loader, need making more generic. + */ + { +#define STROF(n) #n +#define FIND_THROB(n) find_resource(filenames[(n)], \ + "throbber/throbber" STROF(n) ".png", \ + "./gtk/res/throbber/throbber" STROF(n) ".png") + char filenames[9][PATH_MAX]; + FIND_THROB(0); + FIND_THROB(1); + FIND_THROB(2); + FIND_THROB(3); + FIND_THROB(4); + FIND_THROB(5); + FIND_THROB(6); + FIND_THROB(7); + FIND_THROB(8); + nsgtk_throbber_initialise_from_png(9, + filenames[0], filenames[1], filenames[2], filenames[3], + filenames[4], filenames[5], filenames[6], filenames[7], + filenames[8]); +#undef FIND_THROB +#undef STROF + } + if (nsgtk_throbber == NULL) die("Unable to load throbber image.\n"); |