Thu, 07 Aug 2008 01:41:44 +0000
Some cleanup and a couple leak fixes.
| 11118 | 1 | #include "module.h" |
| 2 | ||
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
3 | MODULE = Purple::PluginPref PACKAGE = Purple::PluginPref::Frame PREFIX = purple_plugin_pref_frame_ |
| 11118 | 4 | PROTOTYPES: ENABLE |
| 5 | ||
|
16773
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
6 | BOOT: |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
7 | { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
8 | HV *string_format_stash = gv_stashpv("Purple::String::Format::Type", 1); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
9 | HV *plugin_pref_stash = gv_stashpv("Purple::PluginPref::Type", 1); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
10 | |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
11 | static const constiv *civ, string_format_const_iv[] = { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
12 | #define const_iv(name) {#name, (IV)PURPLE_STRING_FORMAT_TYPE_##name} |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
13 | const_iv(NONE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
14 | const_iv(MULTILINE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
15 | const_iv(HTML), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
16 | }; |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
17 | static const constiv plugin_pref_const_iv[] = { |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
18 | #undef const_iv |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
19 | #define const_iv(name) {#name, (IV)PURPLE_PLUGIN_PREF_##name} |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
20 | const_iv(NONE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
21 | const_iv(CHOICE), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
22 | const_iv(INFO), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
23 | const_iv(STRING_FORMAT), |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
24 | }; |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
25 | |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
26 | for (civ = string_format_const_iv + sizeof(string_format_const_iv) / sizeof(string_format_const_iv[0]); civ-- > string_format_const_iv; ) |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
27 | newCONSTSUB(string_format_stash, (char *)civ->name, newSViv(civ->iv)); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
28 | |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
29 | for (civ = plugin_pref_const_iv + sizeof(plugin_pref_const_iv) / sizeof(plugin_pref_const_iv[0]); civ-- > plugin_pref_const_iv; ) |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
30 | newCONSTSUB(plugin_pref_stash, (char *)civ->name, newSViv(civ->iv)); |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
31 | } |
|
e1171eb45f07
Remove the const-c and const-xs stuff and replace it with real constants
Etan Reisner <deryni@pidgin.im>
parents:
15894
diff
changeset
|
32 | |
| 12364 | 33 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
34 | purple_plugin_pref_frame_add(frame, pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
35 | Purple::PluginPref::Frame frame |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
36 | Purple::PluginPref pref |
| 11118 | 37 | |
| 12807 | 38 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
39 | purple_plugin_pref_frame_destroy(frame) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
40 | Purple::PluginPref::Frame frame |
| 11118 | 41 | |
| 42 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
43 | purple_plugin_pref_frame_get_prefs(frame) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
44 | Purple::PluginPref::Frame frame |
| 11118 | 45 | PREINIT: |
| 46 | GList *l; | |
| 47 | PPCODE: | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
48 | for (l = purple_plugin_pref_frame_get_prefs(frame); l != NULL; l = l->next) { |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
49 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::PluginPref"))); |
| 11118 | 50 | } |
| 12807 | 51 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
52 | Purple::PluginPref::Frame |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
53 | purple_plugin_pref_frame_new(class) |
| 12364 | 54 | C_ARGS: /* void */ |
| 11118 | 55 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
56 | MODULE = Purple::PluginPref PACKAGE = Purple::PluginPref PREFIX = purple_plugin_pref_ |
| 12364 | 57 | PROTOTYPES: ENABLE |
| 58 | ||
| 59 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
60 | purple_plugin_pref_add_choice(pref, label, choice) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
61 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
62 | const char *label |
|
15127
5fc0e97f117d
[gaim-migrate @ 17849]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
63 | # Do the appropriate conversion based on the perl type specified. |
|
5fc0e97f117d
[gaim-migrate @ 17849]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
64 | # Currently only Strings and Ints will work. |
|
23980
a38cbb35eecf
Some cleanup and a couple leak fixes.
Daniel Atallah <datallah@pidgin.im>
parents:
21641
diff
changeset
|
65 | gpointer choice = (SvPOKp($arg) ? SvPVutf8_nolen($arg) : (SvIOKp($arg) ? GINT_TO_POINTER(SvIV($arg)) : NULL)); |
| 12364 | 66 | |
| 67 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
68 | purple_plugin_pref_destroy(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
69 | Purple::PluginPref pref |
| 12364 | 70 | |
| 71 | ||
| 72 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
73 | purple_plugin_pref_get_bounds(pref, min, max) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
74 | Purple::PluginPref pref |
| 11118 | 75 | int *min |
| 76 | int *max | |
| 77 | ||
| 78 | void | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
79 | purple_plugin_pref_get_choices(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
80 | Purple::PluginPref pref |
| 11118 | 81 | PREINIT: |
| 82 | GList *l; | |
| 83 | PPCODE: | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
84 | for (l = purple_plugin_pref_get_choices(pref); l != NULL; l = l->next) { |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
85 | XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::ListItem"))); |
| 11118 | 86 | } |
| 12807 | 87 | |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
88 | const char * |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
89 | purple_plugin_pref_get_label(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
90 | Purple::PluginPref pref |
| 11118 | 91 | |
| 12807 | 92 | gboolean |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
93 | purple_plugin_pref_get_masked(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
94 | Purple::PluginPref pref |
| 11118 | 95 | |
|
21641
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
96 | Purple::String::Format::Type |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
97 | purple_plugin_pref_get_format_type(pref) |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
98 | Purple::PluginPref pref |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
99 | |
| 12807 | 100 | unsigned int |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
101 | purple_plugin_pref_get_max_length(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
102 | Purple::PluginPref pref |
| 11118 | 103 | |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
104 | const char * |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
105 | purple_plugin_pref_get_name(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
106 | Purple::PluginPref pref |
| 11118 | 107 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
108 | Purple::PluginPrefType |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
109 | purple_plugin_pref_get_type(pref) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
110 | Purple::PluginPref pref |
| 11118 | 111 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
112 | Purple::PluginPref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
113 | purple_plugin_pref_new(class) |
| 12364 | 114 | C_ARGS: /* void */ |
| 11118 | 115 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
116 | Purple::PluginPref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
117 | purple_plugin_pref_new_with_label(class, label) |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
118 | const char *label |
| 12364 | 119 | C_ARGS: |
| 120 | label | |
| 11118 | 121 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
122 | Purple::PluginPref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
123 | purple_plugin_pref_new_with_name(class, name) |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
124 | const char *name |
| 12364 | 125 | C_ARGS: |
| 126 | name | |
| 11118 | 127 | |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
128 | Purple::PluginPref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
129 | purple_plugin_pref_new_with_name_and_label(class, name, label) |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
130 | const char *name |
|
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
131 | const char *label |
| 12364 | 132 | C_ARGS: |
| 133 | name, label | |
| 11118 | 134 | |
| 12807 | 135 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
136 | purple_plugin_pref_set_bounds(pref, min, max) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
137 | Purple::PluginPref pref |
| 11118 | 138 | int min |
| 139 | int max | |
| 140 | ||
| 12807 | 141 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
142 | purple_plugin_pref_set_label(pref, label) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
143 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
144 | const char *label |
| 11118 | 145 | |
| 12807 | 146 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
147 | purple_plugin_pref_set_masked(pref, mask) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
148 | Purple::PluginPref pref |
| 11118 | 149 | gboolean mask |
| 150 | ||
| 12807 | 151 | void |
|
21641
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
152 | purple_plugin_pref_set_format_type(pref, format) |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
153 | Purple::PluginPref pref |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
154 | Purple::String::Format::Type format |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
155 | |
|
a0d410a35eb8
Add purple_plugin_pref_[sg]et_format_type to the Perl API. There are a number of new functions that also need to be added, but I don't have time to do that right now. Fixes #3781.
Daniel Atallah <datallah@pidgin.im>
parents:
16773
diff
changeset
|
156 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
157 | purple_plugin_pref_set_max_length(pref, max_length) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
158 | Purple::PluginPref pref |
| 11118 | 159 | unsigned int max_length |
| 160 | ||
| 12807 | 161 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
162 | purple_plugin_pref_set_name(pref, name) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
163 | Purple::PluginPref pref |
|
13107
704041197f4d
[gaim-migrate @ 15468]
Richard Laager <rlaager@pidgin.im>
parents:
12807
diff
changeset
|
164 | const char *name |
| 11118 | 165 | |
| 12807 | 166 | void |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
167 | purple_plugin_pref_set_type(pref, type) |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
168 | Purple::PluginPref pref |
|
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
169 | Purple::PluginPrefType type |
| 12807 | 170 | PREINIT: |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
171 | PurplePluginPrefType gpp_type; |
| 11118 | 172 | CODE: |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
173 | gpp_type = PURPLE_PLUGIN_PREF_NONE; |
| 11118 | 174 | |
| 11170 | 175 | if (type == 1) { |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
176 | gpp_type = PURPLE_PLUGIN_PREF_CHOICE; |
| 11170 | 177 | } else if (type == 2) { |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
178 | gpp_type = PURPLE_PLUGIN_PREF_INFO; |
| 11170 | 179 | } |
|
15894
765ec644ac47
Perl fixes for s/gaim/purple/. This hasn't really been tested yet.
Daniel Atallah <datallah@pidgin.im>
parents:
15435
diff
changeset
|
180 | purple_plugin_pref_set_type(pref, gpp_type); |