What's wrong?



What's wrong in this program?
When it stars, it returns this error:

Gdk-CRITICAL **: file gdkwindow.c: line 1406 (gdk_window_get_visual):
assertion `window != NULL' failed.

Gtk-CRITICAL **: file gtkwidget.c: line 4258 (gtk_widget_push_visual):
assertion `visual != NULL' failed.

Gtk-CRITICAL **: file gtkwidget.c: line 4242 (gtk_widget_push_colormap):
assertion `cmap != NULL' failed.

GnomeUI-CRITICAL **: file gnome-animator.c: line 843
(gnome_animator_append_frames_from_imlib_at_size): assertion `rest == 0'
failed.


-----------------------------------------------------------------------------------


#include <gnome.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <stdio.h>




int
main (int argc, char **argv)
{
  GtkWidget *window1;
  GtkWidget *animator;
  char *img = "malehead.png";
  
  
  gtk_init (&argc, &argv);
  
  window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (window1, "window1");
  gtk_object_set_data (GTK_OBJECT (window1), "window1", window1);
  gtk_window_set_title (GTK_WINDOW (window1), "window1");
  
  
  animator = gnome_animator_new_with_size (32, 32);
  
  
  gnome_animator_append_frames_from_file_at_size (GNOME_ANIMATOR
(animator),
						  img,
						  0, 0,
						  25,
						  32, 
						  32, 32);

   gnome_animator_set_loop_type (GNOME_ANIMATOR (animator), 
				GNOME_ANIMATOR_LOOP_RESTART);
  
  gtk_container_add (GTK_CONTAINER (window1), animator);


  gnome_animator_start(GNOME_ANIMATOR (animator));
  
  
  
  gtk_widget_show(animator);
  gtk_widget_show_all(window1);
  
  
  
  gtk_main ();
  
  return 0; 
}





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]