Cleanup.
[jamendo] / src / resource_utils.c
1 /*
2  * resource_utils.c
3  *
4  *  Created on: 2009-12-18
5  *      Author: marcin
6  */
7
8 #include "resource_utils.h"
9
10 GtkWidget* resource_get_image(const gchar* name) {
11         gchar* filepath = g_strdup_printf("%s/%s", RESPREFIX, name);
12         GtkWidget* image = gtk_image_new_from_file(filepath);
13         g_free(filepath);
14         return image;
15 }
16
17 GdkPixbuf* resource_get_pixbuf_at_scale(const gchar* name, int width, int height) {
18         gchar* filepath = g_strdup_printf("%s/%s", RESPREFIX, name);
19         GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file_at_scale(filepath, width, height, TRUE, NULL);
20         g_free(filepath);
21         return pixbuf;
22 }