Re: GTK2.2: Combobox & GTKlist & .... Warnings!



Maarten wrote:

Hi,
I am using GTK 2.2 for Linux, and I have a problem with GTK-combobox;

_The Appl._

   1. to create the combobox:    combo_Ac_f = gtk_combo_new();
   2. then I use GTK list, declaration:    GList * file_list;

You should initialize your list to an empty list:

       GList *file_list = NULL;

Otherwise, whatever garbage happened to be in the memory address of "file_list" at initialization will show up in your list.

   1. I place new entry's in the list: dbase_list =
      g_list_append(dbase_list,  g_strdup(*copy_split_p));

I assume that the "file_list" / "dbase_list" name swap is a typo?

1. to set the list: gtk_combo_set_popdown_strings(GTK_COMBO(combo_Ac_f), file_list);

_Problem:
_
Every time I insert a new entry in the list, add set again the popdown_strings I see the next 2 warnings:

(<unknown>:924): Gtk-CRITICAL **: file gtkcombo.c: line 1116 (gtk_combo_set_popdown_strings): assertion `strings
!= NULL' failed
** (<unknown>:924): WARNING **: Invalid UTF8 string passed to pango_layout_set_text()


Althrough everything works perfect I will be happy if I do not see this warnings again in the terminal. Any help will be appriciated. :-)


Looking forward to any reply,
Regards Hans
maarten mercuri el ub es
Universitat de Barcelona, Spain



--
Seth Remington
SaberLogic, LLC
661-B Weber Drive
Wadsworth, Ohio 44281
Phone: (330)335-6442
Fax: (330)336-8559





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