annotate plugins/pluginpref_example.c @ 11229:67f874fadb57

[gaim-migrate @ 13369] Minor warning fixes committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 11 Aug 2005 04:30:23 +0000
parents a9fb4493ae22
children e7e3144760b0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
1 /*
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
2 * Release Notification Plugin
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
3 *
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
4 * Copyright (C) 2004, Gary Kramlich <amc_grim@users.sf.net>
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
5 *
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
7 * modify it under the terms of the GNU General Public License as
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
8 * published by the Free Software Foundation; either version 2 of the
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
9 * License, or (at your option) any later version.
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
10 *
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful, but
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
14 * General Public License for more details.
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
15 *
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
19 * 02111-1307, USA.
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
20 */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
21
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
22 #ifdef HAVE_CONFIG_H
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
23 # include <config.h>
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
24 #endif
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
25
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
26 #ifndef GAIM_PLUGINS
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
27 # define GAIM_PLUGINS
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
28 #endif
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
29
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
30 #include "internal.h"
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
31
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
32 #include "plugin.h"
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
33 #include "pluginpref.h"
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
34 #include "prefs.h"
9954
a9fb4493ae22 [gaim-migrate @ 10851]
Nathan Walp <nwalp@pidgin.im>
parents: 9841
diff changeset
35 #include "version.h"
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
36
8745
6c0fae7a4f1a [gaim-migrate @ 9500]
Luke Schierer <lschiere@pidgin.im>
parents: 8713
diff changeset
37 static GaimPluginPrefFrame *
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
38 get_plugin_pref_frame(GaimPlugin *plugin) {
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
39 GaimPluginPrefFrame *frame;
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
40 GaimPluginPref *ppref;
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
41
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
42 frame = gaim_plugin_pref_frame_new();
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
43
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
44 ppref = gaim_plugin_pref_new_with_label("boolean");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
45 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
46
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
47 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
48 "/plugins/core/pluginpref_example/bool",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
49 "boolean pref");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
50 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
51
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
52 ppref = gaim_plugin_pref_new_with_label("integer");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
53 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
54
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
55 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
56 "/plugins/core/pluginpref_example/int",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
57 "integer pref");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
58 gaim_plugin_pref_set_bounds(ppref, 0, 255);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
59 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
60
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
61 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
62 "/plugins/core/pluginpref_example/int_choice",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
63 "integer choice");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
64 gaim_plugin_pref_set_type(ppref, GAIM_PLUGIN_PREF_CHOICE);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
65 gaim_plugin_pref_add_choice(ppref, "One", GINT_TO_POINTER(1));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
66 gaim_plugin_pref_add_choice(ppref, "Two", GINT_TO_POINTER(2));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
67 gaim_plugin_pref_add_choice(ppref, "Four", GINT_TO_POINTER(4));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
68 gaim_plugin_pref_add_choice(ppref, "Eight", GINT_TO_POINTER(8));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
69 gaim_plugin_pref_add_choice(ppref, "Sixteen", GINT_TO_POINTER(16));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
70 gaim_plugin_pref_add_choice(ppref, "Thirty Two", GINT_TO_POINTER(32));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
71 gaim_plugin_pref_add_choice(ppref, "Sixty Four", GINT_TO_POINTER(64));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
72 gaim_plugin_pref_add_choice(ppref, "One Hundred Twenty Eight", GINT_TO_POINTER(128));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
73 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
74
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
75 ppref = gaim_plugin_pref_new_with_label("string");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
76 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
77
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
78 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
79 "/plugins/core/pluginpref_example/string",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
80 "string pref");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
81 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
82
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
83 ppref = gaim_plugin_pref_new_with_name_and_label(
9841
1ae82c0c24ee [gaim-migrate @ 10718]
Mark Doliner <mark@kingant.net>
parents: 8993
diff changeset
84 "/plugins/core/pluginpref_example/masked_string",
1ae82c0c24ee [gaim-migrate @ 10718]
Mark Doliner <mark@kingant.net>
parents: 8993
diff changeset
85 "masked string");
1ae82c0c24ee [gaim-migrate @ 10718]
Mark Doliner <mark@kingant.net>
parents: 8993
diff changeset
86 gaim_plugin_pref_set_masked(ppref, TRUE);
1ae82c0c24ee [gaim-migrate @ 10718]
Mark Doliner <mark@kingant.net>
parents: 8993
diff changeset
87 gaim_plugin_pref_frame_add(frame, ppref);
1ae82c0c24ee [gaim-migrate @ 10718]
Mark Doliner <mark@kingant.net>
parents: 8993
diff changeset
88
1ae82c0c24ee [gaim-migrate @ 10718]
Mark Doliner <mark@kingant.net>
parents: 8993
diff changeset
89 ppref = gaim_plugin_pref_new_with_name_and_label(
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
90 "/plugins/core/pluginpref_example/max_string",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
91 "string pref\n(max length of 16)");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
92 gaim_plugin_pref_set_max_length(ppref, 16);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
93 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
94
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
95 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
96 "/plugins/core/pluginpref_example/string_choice",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
97 "string choice");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
98 gaim_plugin_pref_set_type(ppref, GAIM_PLUGIN_PREF_CHOICE);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
99 gaim_plugin_pref_add_choice(ppref, "red", "red");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
100 gaim_plugin_pref_add_choice(ppref, "orange", "orange");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
101 gaim_plugin_pref_add_choice(ppref, "yellow", "yellow");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
102 gaim_plugin_pref_add_choice(ppref, "green", "green");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
103 gaim_plugin_pref_add_choice(ppref, "blue", "blue");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
104 gaim_plugin_pref_add_choice(ppref, "purple", "purple");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
105 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
106
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
107 return frame;
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
108 }
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
109
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
110 static GaimPluginUiInfo prefs_info = {
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
111 get_plugin_pref_frame
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
112 };
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
113
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
114 static GaimPluginInfo info =
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
115 {
9954
a9fb4493ae22 [gaim-migrate @ 10851]
Nathan Walp <nwalp@pidgin.im>
parents: 9841
diff changeset
116 GAIM_PLUGIN_MAGIC,
a9fb4493ae22 [gaim-migrate @ 10851]
Nathan Walp <nwalp@pidgin.im>
parents: 9841
diff changeset
117 GAIM_MAJOR_VERSION,
a9fb4493ae22 [gaim-migrate @ 10851]
Nathan Walp <nwalp@pidgin.im>
parents: 9841
diff changeset
118 GAIM_MINOR_VERSION,
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
119 GAIM_PLUGIN_STANDARD, /**< type */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
120 NULL, /**< ui_requirement */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
121 0, /**< flags */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
122 NULL, /**< dependencies */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
123 GAIM_PRIORITY_DEFAULT, /**< priority */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
124
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
125 "core-pluginpref_example", /**< id */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
126 "Pluginpref Example", /**< name */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
127 VERSION, /**< version */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
128 /** summary */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
129 "An example of how to use pluginprefs",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
130 /** description */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
131 "An example of how to use pluginprefs",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
132 "Gary Kramlich <amc_grim@users.sf.net>", /**< author */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
133 GAIM_WEBSITE, /**< homepage */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
134
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
135 NULL, /**< load */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
136 NULL, /**< unload */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
137 NULL, /**< destroy */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
138
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
139 NULL, /**< ui_info */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
140 NULL, /**< extra_info */
8993
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
141 &prefs_info, /**< prefs_info */
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
142 NULL
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
143 };
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
144
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
145 static void
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
146 init_plugin(GaimPlugin *plugin)
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
147 {
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
148 gaim_prefs_add_none("/plugins/core/pluginpref_example");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
149 gaim_prefs_add_bool("/plugins/core/pluginpref_example/bool", TRUE);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
150 gaim_prefs_add_int("/plugins/core/pluginpref_example/int", 0);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
151 gaim_prefs_add_int("/plugins/core/pluginpref_example/int_choice", 1);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
152 gaim_prefs_add_string("/plugins/core/pluginpref_example/string",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
153 "string");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
154 gaim_prefs_add_string("/plugins/core/pluginpref_example/max_string",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
155 "max length string");
9841
1ae82c0c24ee [gaim-migrate @ 10718]
Mark Doliner <mark@kingant.net>
parents: 8993
diff changeset
156 gaim_prefs_add_string("/plugins/core/pluginpref_example/masked_string", "masked");
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
157 gaim_prefs_add_string("/plugins/core/pluginpref_example/string_choice", "red");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
158 }
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
159
8745
6c0fae7a4f1a [gaim-migrate @ 9500]
Luke Schierer <lschiere@pidgin.im>
parents: 8713
diff changeset
160 GAIM_INIT_PLUGIN(ppexample, init_plugin, info)