[Glade-users] Question about gtk_widget pixmap and imlib

  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

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.. 



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

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