[Glade-users] Question about gtk_widget pixmap and imlib

Roberto Diaz rdiazmartin@yahoo.com
Thu, 16 Nov 2000 11:07:27 +0100 (MET)


> >   pixmap = gtk_pixmap_new (gdkpixmap, mask);
> >   gdk_pixmap_unref (gdkpixmap);
> >   gdk_bitmap_unref (mask);

In this code I have another question...

When we create the pixmap (or whatever other widget) with:

pixmap = gtk_pixmap_new (..);

dont we have the pointer pixmap with its reference count sets to 1?

This is because in the glade generated code I'm always seeing things like
this:

GtkWidget *togglebutton1;
togglebutton1 = gtk_toggle_button_new_with_label (_("togglebutton1"));
gtk_widget_ref (togglebutton1); 
..........

Well.. Why do we need to ref togglebutton1? dont we have its reference
count incremented in the constructor
gtk_toggle_button_new_with_label() already?

I dont understand.. 


Regards

Roberto


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com