upgrade gtk 1.2 code to 2.2, conditional compilation?



Hi,

I've a gtk1.2 application with GtkStyle->font structure member
(in non-important part of code). I know it isn't a right way
on gtk1.2 but I'd not found other way. Also, the 'font' isn't more
in GtkStyle class for 2.2 version.

This is a problematic part of code:

  /* set optimal column width */
  for( i = 0; i < NT; i++ ) {
    ipix = gdk_string_width(style->font,title[i]);
    gtk_clist_set_column_width (GTK_CLIST(clist),i,ipix);
  }

Is there some way (conditional compilation both versions for example) 
for correction?

Is there some way to smoothly upgrade the code to more portable shape
usable for a portable code?

Thank you
FH




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