]> Pileus Git - ~andy/gtk/blobdiff - examples/list/list.c
Remove deprecated code: GtkLabel
[~andy/gtk] / examples / list / list.c
index 966e31e76e68c3ed234d6952d53688f451c333ed..8d0d97b408aa4de6a9b1b9e6035443929a871d99 100644 (file)
@@ -117,7 +117,7 @@ gint main( int    argc,
      */
     for (i = 0; i < 5; i++) {
        GtkWidget       *label;
-       gchar           *string;
+       const gchar     *string;
 
        sprintf(buffer, "ListItemContainer with Label #%d", i);
        label=gtk_label_new (buffer);
@@ -126,7 +126,7 @@ gint main( int    argc,
        gtk_widget_show (label);
        gtk_container_add (GTK_CONTAINER (gtklist), list_item);
        gtk_widget_show (list_item);
-       gtk_label_get (GTK_LABEL (label), &string);
+       string = gtk_label_get_text (GTK_LABEL (label));
        g_object_set_data (G_OBJECT (list_item), list_item_data_key, string);
     }
     /* Here, we are creating another 5 labels, this time