Mercurial > pidgin
comparison libpurple/accountopt.c @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | 6e27091869eb |
children |
comparison
equal
deleted
inserted
replaced
32818:01ff09d4a463 | 32819:2c6510167895 |
---|---|
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 { |