diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2008-06-02 16:47:15 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2008-06-02 16:47:15 +0000 |
commit | 98589be65c8e636297e3245924f5fac2b5c4b562 (patch) | |
tree | d4a0852e5d6dd6c9640f51d6e1f2915e7f61a42e /gtk/gtk_gui.c | |
parent | 57dcb9d0f7979784e9bd25abfe7db8f106d24feb (diff) | |
download | netsurf-98589be65c8e636297e3245924f5fac2b5c4b562.tar.gz netsurf-98589be65c8e636297e3245924f5fac2b5c4b562.tar.bz2 |
nsgtk now loads the throbber from a set of PNG files. This change will make your eyes bleed. Please avoid looking at it until I make this cleaner.
svn path=/trunk/netsurf/; revision=4244
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"); |