title: Change text color of label in GTK in C
body: <p>I am using Gtk 2.0.</p>
  
  <p>I am trying to change the text color/font color of the label.</p>
  
  <p>How difficult can it get? I am just trying things like gtk_widget_modify_text etc  to no avail. I want to go the "android" or "Qt" way by say adding a simple resource file with all the styles. Where and as what(.rc?) should I add this file? How to parse this file?</p>
  
  <p>I already wrote my App with a lot of widgets and I do not want to change/redo them all. Can somebody show me a simple example?</p>
  
  <p>I even tried a Pango example from the web but the problem is the text in my label keeps changing and therefore I could not follow this.
  Please help. Here is what I have tried so far and without success.</p>
  
  <pre><code>    GtkWidget *label1;    
      label1= gtk_label_new(" ");
      gtk_box_pack_start (GTK_BOX(box1), label1,TRUE,TRUE, 0);
  
      GdkColor color;
  
      gdk_color_parse ("white", &amp;color);
  
  
      gtk_widget_modify_text ( GTK_WIDGET(label1), GTK_STATE_NORMAL, &amp;color);
  
      gchar *stringMarkupText = "&lt;span foreground=\"white\"&gt;   &lt;b&gt;Bold&lt;/b&gt;&lt;/span&gt;"; //white color and bold--&gt; the length of this text is fixed by number of spaces. I need to call a function that would set this text on a g_signal_connect so do not want to fix spaces!!
      gchar *stringPlainText;
  
      PangoAttrList  *attrList;
  
      pango_parse_markup(stringMarkupText, -1, 0, &amp;attrList, &amp;stringPlainText, NULL, NULL);
      gtk_label_set_attributes(GTK_LABEL(label1), attrList);
  </code></pre>