#include <gtk/gtk.h>
#include <glib.h>
#include <stdio.h>

int main (int argc, char **argv)
{
	GtkWidget *ab_dialog = NULL;
	GdkPixbuf *default_logo = NULL;
	GdkPixbuf *get_val = NULL;
	GList *default_list = NULL;
	
	gtk_init(&argc, &argv);
		
	default_logo = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, 5, 3);
	if(default_logo == NULL)
	{
		printf("The gdk_pixbuf_new function returns NULL, unable to create a GdkPixbuf.\n");
	}
	
	default_list = g_list_append(default_list, default_logo);
	if(default_list == NULL)
	{
		printf("The g_list_append function returns NULL, unable to create a GList.\n");
	}

	gtk_window_set_default_icon_list(default_list);
	
	ab_dialog = g_object_new(GTK_TYPE_ABOUT_DIALOG, NULL);
	if(ab_dialog == NULL)
	{
		printf("The gtk_about_dialog_new function returns NULL, unable to create a GtkWidget.\n");
	}
	
	g_object_get(ab_dialog, "logo", &get_val, NULL);
	
	if(get_val == NULL)
	{
		printf("The default value of 'logo' property shouldn't be NULL, but it is.\n");
	}
	
	if(ab_dialog != NULL)
	{
		gtk_widget_destroy(ab_dialog);
	}
	if(default_logo != NULL)
   	{
    		g_object_unref(default_logo);
    	}
	if(get_val != NULL)
    	{
    		g_object_unref(get_val);
    	}
	if(default_list != NULL)
	{
		g_list_free(default_list);
	}
	
	return 0;
}
