On Thu, 2004-01-08 at 09:18, Jeffrey Stedfast wrote: > another thing.... I don't understand the logic with the int1 and int2 > thing here. What's the deal with that? > > Jeff > > GtkWidget *e_create_image_widget(gchar *name, > gchar *string1, gchar *string2, > gint int1, gint int2) > { > - char *filename; > GtkWidget *alignment = NULL; > if (string1) { > GtkWidget *w; > + GdkPixbuf *pixbuf; > + > + pixbuf = e_icon_factory_get_icon (string1, 48); > + > + w = gtk_image_new_from_pixbuf (pixbuf); > + g_object_unref (pixbuf); > > - if (*string1 == '/') > - filename = g_strdup(string1); > - else > - filename = g_build_filename (EVOLUTION_IMAGES, > string1, NULL); > + gtk_misc_set_alignment (GTK_MISC (w), 0.5, 0.5); > > - w = gtk_image_new_from_file (filename); > + if (int1) > + int1 = 1; > + if (int2) > + int2 = 1; This logic is because some glade file (mail/local-config.glade -- you can see it in my patch) wanted to create an image widget that had an alignment scale of x=1, y=0. Most other glade image widgets were x=0, y=0. So, I figured that there was some interest in an optional scale argument from the glade files. This int1, int2 business is basically two boolean argument that say "to scale or not to scale" for the alignment widget created in that function. Is mail/local-config.glade just goofing up and it should be 0, 0? In which case, I can remove the int1, int2 code. -mt
Attachment:
signature.asc
Description: This is a digitally signed message part