Hi.
I've checked out your code and made some minor modifications, which enables you to remove that annoying "size-allocate" callback.
main-window.c
Code:
...
/* Create the image area and the other widgets */
hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start ((GtkBox*)vbox1, hbox, TRUE, TRUE, 0);
/* tadeboro edit */
/*fixed = gtk_fixed_new ();*/
fixed = gtk_alignment_new( 0.5, 0.5, 0, 0 );
/* tadeboro edit end */
gtk_box_pack_start (GTK_BOX (hbox), fixed, TRUE, TRUE, 0);
img_struct->viewport = gtk_viewport_new(NULL,NULL);
/* tadeboro edit */
/*gtk_fixed_put (GTK_FIXED (fixed), img_struct->viewport, 0, 0);*/
gtk_container_add( GTK_CONTAINER( fixed ), img_struct->viewport );
/* tadeboro edit end */
gtk_widget_set_size_request (img_struct->viewport, 720, 576);
gtk_widget_modify_bg(img_struct->viewport,GTK_STATE_NORMAL,&background_color);
gtk_viewport_set_shadow_type((GtkViewport*)img_struct->viewport, GTK_SHADOW_IN);
gtk_container_set_border_width((GtkContainer*)img_struct->viewport,10);
/* tadeboro edit */
/*g_signal_connect (G_OBJECT (fixed), "size-allocate", G_CALLBACK (img_size_allocate_event), img_struct);*/
/* tadeboro edit end */
img_struct->image_area = gtk_image_new();
gtk_container_add (GTK_CONTAINER (img_struct->viewport), img_struct->image_area);
...