Hi,


I use the gtk_style_new() in a function to update every 1 seconds the color
of a entry (see below).

The  function works fine except it eats some memory every it is called (I
can monitor this with top command).
Do I have to to a free (style) ???

Thank you

void SetEntryBackgroundColor( * GtkWidget * Entry, gint color)
     {

     GdkColor  red  = {0, 65335, 0, 0};
     GdkColor  blue      = {0, 0, 0, 65335};
     GdkColor  green     = {0, 0, 0, 65335};

     GtkStyle       * style;

     style=gtk_style_new();

     switch(color)
          {
          case RED:
          style->base[GTK_STATE_NORMAL] = red;
          break;

          case BLUE:
          style->base[GTK_STATE_NORMAL] = blue;
          break;

          case GREEN:
          style->base[GTK_STATE_NORMAL] = green;
          break;
          }

     gtk_widget_set_style(entry,style);
     }


_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to