Re: Combo box and GList



In my application I created a combo box which gets drawn when the
program starts up. The combo box will be holding variable names read
from a file but because the file has not been specified by the user the
combo is blank. After the user selects a file the code parses the data
and extracts a list of variable names which are appended to a GList type
in the following way:

TAMAL_GLBL->variable_index_list =
g_list_append(TAMAL_GLBL->variable_index_list, g_strdup(local_status));

Unfortunately even though the index list gets data appended to it, the
variable names do not display inside the combo box even after running:

while (gtk_events_pending())
{
     gtk_main_iteration();
}

Is there a way to get the variables to display after showing the combo
box ?

I think the list of items that the combo box has is internal, meaning when
you set a new list the values are coppied.

If you update the list you passed to the combobox nothing happens because
the combo box has no idea of the list.

What I did was to create a list as a `back buffer', it's used to represent
what the combo box has, whenever I need to add or remove something I just
modify that list and add it to the combo box again each time I update the
list.

--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
..__                         ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/





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