From 0660884bfea160a9870f814bfd85265d264a34eb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 10 Mar 2010 16:30:19 -0600 Subject: A little loader to test to see if we load an icon and what size it is. --- helper/test-loader-build | 3 +++ helper/test-loader.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 helper/test-loader-build create mode 100644 helper/test-loader.c diff --git a/helper/test-loader-build b/helper/test-loader-build new file mode 100755 index 0000000..fa1e006 --- /dev/null +++ b/helper/test-loader-build @@ -0,0 +1,3 @@ +#!/bin/bash + +gcc `pkg-config --cflags --libs gtk+-2.0` -I../libindicator/ test-loader.c ../libindicator/indicator-image-helper.c -o test-loader diff --git a/helper/test-loader.c b/helper/test-loader.c new file mode 100644 index 0000000..6a06248 --- /dev/null +++ b/helper/test-loader.c @@ -0,0 +1,18 @@ + +#include +#include "indicator-image-helper.h" + +int +main (int argv, char * argc[]) +{ + gtk_init(&argv, &argc); + + GtkImage * image = indicator_image_helper(argc[1]); + + GdkPixbuf * pixbuf = gtk_image_get_pixbuf(image); + + g_debug("Pixbuf width: %d", gdk_pixbuf_get_width(pixbuf)); + g_debug("Pixbuf height: %d", gdk_pixbuf_get_height(pixbuf)); + + return; +} -- cgit v1.2.3