*** io_stat_org.c       Fri Dec  6 22:31:46 2002
--- io_stat.c   Sat Dec 14 09:44:24 2002
***************
*** 159,165 ****
        int count_type;
  } io_stat_t;

!

  static void init_io_stat_window(io_stat_t *io);

--- 159,168 ----
        int count_type;
  } io_stat_t;

! /* GTK 1.x */
! GtkRcStyle *rc_style;
! GdkColormap *colormap;
! /* GTK 1.x */

  static void init_io_stat_window(io_stat_t *io);

***************
*** 937,943 ****
--- 940,956 ----
                io->graphs[i].gc=gdk_gc_new(io->pixmap);
  #if GTK_MAJOR_VERSION < 2
                /* XXX dont have a clue how to do this in gtk1 */
+
+               /* GTK 1.x */
+               colormap = gtk_widget_get_colormap (widget);
+               if (!gdk_color_alloc (colormap, &io->graphs[i].color))
+               {
+                       g_warning ("Couldn't allocate color");
+               }
+               /* GTK 1.x */
+
                gdk_gc_set_foreground(io->graphs[i].gc, &io->graphs[i].color);
+
  #else
                gdk_gc_set_rgb_fg_color(io->graphs[i].gc, &io->graphs[i].color);
  #endif
***************
*** 1474,1480 ****
        gtk_widget_show(gio->color_button);

  #if GTK_MAJOR_VERSION < 2
!               /* XXX dont have a clue how to do this in gtk1 */
  #else
        gtk_widget_modify_bg(gio->color_button, GTK_STATE_NORMAL, &gio->color);
        gtk_widget_modify_bg(gio->color_button, GTK_STATE_ACTIVE, &gio->color);
--- 1487,1510 ----
        gtk_widget_show(gio->color_button);

  #if GTK_MAJOR_VERSION < 2
!       /* XXX dont have a clue how to do this in gtk1 */
!
!       /* GTK 1.x */
!       rc_style = gtk_rc_style_new ();
!     rc_style->bg[GTK_STATE_NORMAL] = gio->color;
!     rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_BG;
!       rc_style->bg[GTK_STATE_ACTIVE] = gio->color;
!     rc_style->color_flags[GTK_STATE_ACTIVE] |= GTK_RC_BG;
!       rc_style->bg[GTK_STATE_PRELIGHT] = gio->color;
!     rc_style->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG;
!       rc_style->bg[GTK_STATE_SELECTED] = gio->color;
!     rc_style->color_flags[GTK_STATE_SELECTED] |= GTK_RC_BG;
!       rc_style->bg[GTK_STATE_INSENSITIVE] = gio->color;
!     rc_style->color_flags[GTK_STATE_INSENSITIVE] |= GTK_RC_BG;
!       gtk_widget_modify_style (gio->color_button, rc_style);
!     gtk_rc_style_unref (rc_style);
!       /* GTK 1.x */
!
  #else
        gtk_widget_modify_bg(gio->color_button, GTK_STATE_NORMAL, &gio->color);
        gtk_widget_modify_bg(gio->color_button, GTK_STATE_ACTIVE, &gio->color);