From: Gary K. <gr...@re...> - 2005-03-11 06:16:52
|
On Fri, 2005-03-11 at 00:06 -0600, Don Seiler wrote: > Please let me know what you think of this. GaimKeyValuePair struct will > be defined in util.h, and gaim_gtk_combo_box() and > gaim_gtk_combo_box_entry() will be in gtkutils.{c|h}. Sounds good to me.. > Background Item #2: > Over the course of the afternoon and evening, my severe lack of > familiarity with C was catching up to me. Long story short, Ethan > misunderstood what I was trying to do. I just wanted to implement this > general gtk-combo-deal for gaim, he thought I wanted to re-write how > accounts and PRPLs pass preferences to core. He called me on the phone > and about 20 minutes into the conversation we realized we were talking > about totally different things. But he then realized that what he was > suggesting I do for what I wasn't trying to do sounded like a good idea. >=20 > He thought we could replace the way accounts/PRPLs send options and > values to core with GaimKeyValuePairs, where the key is the option name > and type (another struct, or delimited string?), and the value is the > default. In the case of an account option list, the value would be an > array of more GaimKeyValuePairs. >=20 > I may have my wires crossed, but another part of this account options > change would be to have the PRPL responsible for freeing the memory it > allocated for these options in its unload() function. Ethan please > smack me if I'm wrong here. If we are to implement this for passing values between the core/prpls, I highly suggest we use something like struct GaimKeyValuePair { GaimKeyValuePairType type; char *key; union { int integer; gboolean boolean; char *string; } value; }; Except I know we already have this defined in prefs and possibly other places. So if we we're going to use something along these things, it might be a good idea to clean it up and just use one more generic one. --=20 Gary Kramlich <gr...@re...> |