Re: Newbie question



* martyn 2 russell bt com <martyn 2 russell bt com>:

I would suggest:


      G_CONST_RETURN gchar *entry_text = NULL;
      gchar *value = NULL;

      entry_text = gtk_entry_get_text(GTK_ENTRY(entry));

Better:

        gchar *value = NULL;
        value = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);

        /* you may now use value, but in the end you must free it with: */
        g_free (value);

Regards,
 Emmanuele.

-- 
Emmanuele Bassi (Zefram)       [ http://digilander.libero.it/ebassi/blog ]
GnuPG Key fingerprint = 4DD0 C90D 4070 F071 5738  08BD 8ECC DB8F A432 0FF4



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