Mercurial > pidgin
comparison src/request.c @ 7904:9b478c6e0bfa
[gaim-migrate @ 8564]
Added support for invisible fields.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 21 Dec 2003 08:57:56 +0000 |
parents | 3ca501305ac5 |
children | 1d0bc32f8038 |
comparison
equal
deleted
inserted
replaced
7903:d91806e4ea64 | 7904:9b478c6e0bfa |
---|---|
252 | 252 |
253 field->id = g_strdup(id); | 253 field->id = g_strdup(id); |
254 field->type = type; | 254 field->type = type; |
255 | 255 |
256 gaim_request_field_set_label(field, text); | 256 gaim_request_field_set_label(field, text); |
257 gaim_request_field_set_visible(field, TRUE); | |
257 | 258 |
258 return field; | 259 return field; |
259 } | 260 } |
260 | 261 |
261 void | 262 void |
312 g_free(field->label); | 313 g_free(field->label); |
313 | 314 |
314 field->label = (label == NULL ? NULL : g_strdup(label)); | 315 field->label = (label == NULL ? NULL : g_strdup(label)); |
315 } | 316 } |
316 | 317 |
318 void | |
319 gaim_request_field_set_visible(GaimRequestField *field, gboolean visible) | |
320 { | |
321 g_return_if_fail(field != NULL); | |
322 | |
323 field->visible = visible; | |
324 } | |
325 | |
317 GaimRequestFieldType | 326 GaimRequestFieldType |
318 gaim_request_field_get_type(const GaimRequestField *field) | 327 gaim_request_field_get_type(const GaimRequestField *field) |
319 { | 328 { |
320 g_return_val_if_fail(field != NULL, GAIM_REQUEST_FIELD_NONE); | 329 g_return_val_if_fail(field != NULL, GAIM_REQUEST_FIELD_NONE); |
321 | 330 |
334 gaim_request_field_get_label(const GaimRequestField *field) | 343 gaim_request_field_get_label(const GaimRequestField *field) |
335 { | 344 { |
336 g_return_val_if_fail(field != NULL, NULL); | 345 g_return_val_if_fail(field != NULL, NULL); |
337 | 346 |
338 return field->label; | 347 return field->label; |
348 } | |
349 | |
350 gboolean | |
351 gaim_request_field_is_visible(const GaimRequestField *field) | |
352 { | |
353 g_return_val_if_fail(field != NULL, FALSE); | |
354 | |
355 return field->visible; | |
339 } | 356 } |
340 | 357 |
341 GaimRequestField * | 358 GaimRequestField * |
342 gaim_request_field_string_new(const char *id, const char *text, | 359 gaim_request_field_string_new(const char *id, const char *text, |
343 const char *default_value, gboolean multiline) | 360 const char *default_value, gboolean multiline) |