summaryrefslogtreecommitdiff
path: root/frontends/gtk/toolbar.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-08-18 14:41:31 +0100
committerVincent Sanders <vince@kyllikki.org>2019-08-18 14:41:31 +0100
commitc0e27bd0da9c6804c788473b891bff6c0c98af66 (patch)
tree523d0eb4a97ee538801a556c340da907c4e245b0 /frontends/gtk/toolbar.c
parent01f3879b647e69684ef8cbcc53f44b2c9b7b5df8 (diff)
downloadnetsurf-c0e27bd0da9c6804c788473b891bff6c0c98af66.tar.gz
netsurf-c0e27bd0da9c6804c788473b891bff6c0c98af66.tar.bz2
access gtk throbber frames through an interface
This changes the gtk throbber frames to be accessed through an API This removes teh nsgtk_throbber global and hides the implementation details from the rest of the code.
Diffstat (limited to 'frontends/gtk/toolbar.c')
-rw-r--r--frontends/gtk/toolbar.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index d1b129afd..4ca03a1ea 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -478,23 +478,23 @@ nsgtk_toolbar_make_widget(struct nsgtk_scaffolding *g,
}
case THROBBER_ITEM: {
- if ((nsgtk_throbber == NULL) ||
- (nsgtk_throbber->framedata == NULL) ||
- (nsgtk_throbber->framedata[0] == NULL)) {
+ nserror res;
+ GdkPixbuf *pixbuf;
+ res = nsgtk_throbber_get_frame(0, &pixbuf);
+ if (res != NSERROR_OK) {
return NULL;
}
if (edit_mode) {
- w = GTK_WIDGET(gtk_tool_button_new(GTK_WIDGET(
- gtk_image_new_from_pixbuf(
- nsgtk_throbber->framedata[0])),
- "[throbber]"));
+ w = GTK_WIDGET(gtk_tool_button_new(
+ GTK_WIDGET(gtk_image_new_from_pixbuf(pixbuf)),
+ "[throbber]"));
} else {
GtkWidget *image;
w = GTK_WIDGET(gtk_tool_item_new());
- image = gtk_image_new_from_pixbuf(nsgtk_throbber->framedata[0]);
+ image = gtk_image_new_from_pixbuf(pixbuf);
if (image != NULL) {
nsgtk_widget_set_alignment(image,
GTK_ALIGN_CENTER,