Mercurial > pidgin
comparison libpurple/accountopt.c @ 32384:3ed4800c5e17
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 051fd526bf8c89add8c1960afd9d0c7ee77b091a)
to branch 'im.pidgin.pidgin' (head 11e7ee045ef2505f4215dd05ca8d6c8735e81ab6)
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 09 Dec 2011 18:35:12 +0000 |
parents | 6e27091869eb |
children |
comparison
equal
deleted
inserted
replaced
32383:7967bb7db191 | 32384:3ed4800c5e17 |
---|---|
25 */ | 25 */ |
26 #include "internal.h" | 26 #include "internal.h" |
27 | 27 |
28 #include "accountopt.h" | 28 #include "accountopt.h" |
29 #include "util.h" | 29 #include "util.h" |
30 | |
31 /** | |
32 * An option for an account. | |
33 * | |
34 * This is set by protocol plugins, and appears in the account settings | |
35 * dialogs. | |
36 */ | |
37 struct _PurpleAccountOption | |
38 { | |
39 PurplePrefType type; /**< The type of value. */ | |
40 | |
41 char *text; /**< The text that will appear to the user. */ | |
42 char *pref_name; /**< The name of the associated preference. */ | |
43 | |
44 union | |
45 { | |
46 gboolean boolean; /**< The default boolean value. */ | |
47 int integer; /**< The default integer value. */ | |
48 char *string; /**< The default string value. */ | |
49 GList *list; /**< The default list value. */ | |
50 | |
51 } default_value; | |
52 | |
53 gboolean masked; /**< Whether the value entered should be | |
54 * obscured from view (for passwords and | |
55 * similar options) | |
56 */ | |
57 }; | |
58 | |
59 /** | |
60 * A username split. | |
61 * | |
62 * This is used by some protocols to separate the fields of the username | |
63 * into more human-readable components. | |
64 */ | |
65 struct _PurpleAccountUserSplit | |
66 { | |
67 char *text; /**< The text that will appear to the user. */ | |
68 char *default_value; /**< The default value. */ | |
69 char field_sep; /**< The field separator. */ | |
70 gboolean reverse; /**< TRUE if the separator should be found | |
71 starting a the end of the string, FALSE | |
72 otherwise */ | |
73 }; | |
74 | |
30 | 75 |
31 PurpleAccountOption * | 76 PurpleAccountOption * |
32 purple_account_option_new(PurplePrefType type, const char *text, | 77 purple_account_option_new(PurplePrefType type, const char *text, |
33 const char *pref_name) | 78 const char *pref_name) |
34 { | 79 { |