annotate plugins/pluginpref_example.c @ 8933:6663ad2386d9

[gaim-migrate @ 9703] "Initial Comment: * Added support for privacy settings * Added support for invites - ability to initiate multi-user conferences (chats). * Changed the license notice (to the standard GPL notice) * Fixed 64 bit issues * Incorporated Joe Shaw's patch for better error messages * Fixed the buddy list sync problems" --Mike Stoddard of Novell committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 15 May 2004 14:00:31 +0000
parents d7b8eb1f0a18
children 294ae6548d4e
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"
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
35
8745
6c0fae7a4f1a [gaim-migrate @ 9500]
Luke Schierer <lschiere@pidgin.im>
parents: 8713
diff changeset
36 static GaimPluginPrefFrame *
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
37 get_plugin_pref_frame(GaimPlugin *plugin) {
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
38 GaimPluginPrefFrame *frame;
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
39 GaimPluginPref *ppref;
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
40
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
41 frame = gaim_plugin_pref_frame_new();
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
42
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
43 ppref = gaim_plugin_pref_new_with_label("boolean");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
44 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
45
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
46 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
47 "/plugins/core/pluginpref_example/bool",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
48 "boolean pref");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
49 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
50
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
51 ppref = gaim_plugin_pref_new_with_label("integer");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
52 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
53
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
54 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
55 "/plugins/core/pluginpref_example/int",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
56 "integer pref");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
57 gaim_plugin_pref_set_bounds(ppref, 0, 255);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
58 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
59
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
60 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
61 "/plugins/core/pluginpref_example/int_choice",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
62 "integer choice");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
63 gaim_plugin_pref_set_type(ppref, GAIM_PLUGIN_PREF_CHOICE);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
64 gaim_plugin_pref_add_choice(ppref, "One", GINT_TO_POINTER(1));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
65 gaim_plugin_pref_add_choice(ppref, "Two", GINT_TO_POINTER(2));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
66 gaim_plugin_pref_add_choice(ppref, "Four", GINT_TO_POINTER(4));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
67 gaim_plugin_pref_add_choice(ppref, "Eight", GINT_TO_POINTER(8));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
68 gaim_plugin_pref_add_choice(ppref, "Sixteen", GINT_TO_POINTER(16));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
69 gaim_plugin_pref_add_choice(ppref, "Thirty Two", GINT_TO_POINTER(32));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
70 gaim_plugin_pref_add_choice(ppref, "Sixty Four", GINT_TO_POINTER(64));
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
71 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
72 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
73
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
74 ppref = gaim_plugin_pref_new_with_label("string");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
75 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
76
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
77 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
78 "/plugins/core/pluginpref_example/string",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
79 "string pref");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
80 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
81
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
82 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
83 "/plugins/core/pluginpref_example/max_string",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
84 "string pref\n(max length of 16)");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
85 gaim_plugin_pref_set_max_length(ppref, 16);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
86 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
87
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
88 ppref = gaim_plugin_pref_new_with_name_and_label(
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
89 "/plugins/core/pluginpref_example/string_choice",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
90 "string choice");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
91 gaim_plugin_pref_set_type(ppref, GAIM_PLUGIN_PREF_CHOICE);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
92 gaim_plugin_pref_add_choice(ppref, "red", "red");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
93 gaim_plugin_pref_add_choice(ppref, "orange", "orange");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
94 gaim_plugin_pref_add_choice(ppref, "yellow", "yellow");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
95 gaim_plugin_pref_add_choice(ppref, "green", "green");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
96 gaim_plugin_pref_add_choice(ppref, "blue", "blue");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
97 gaim_plugin_pref_add_choice(ppref, "purple", "purple");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
98 gaim_plugin_pref_frame_add(frame, ppref);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
99
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
100 return frame;
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
101 }
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
102
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
103 static GaimPluginUiInfo prefs_info = {
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
104 get_plugin_pref_frame
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
105 };
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 static GaimPluginInfo info =
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
108 {
8749
d7b8eb1f0a18 [gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents: 8745
diff changeset
109 GAIM_PLUGIN_API_VERSION, /**< api_version */
8713
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
110 GAIM_PLUGIN_STANDARD, /**< type */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
111 NULL, /**< ui_requirement */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
112 0, /**< flags */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
113 NULL, /**< dependencies */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
114 GAIM_PRIORITY_DEFAULT, /**< priority */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
115
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
116 "core-pluginpref_example", /**< id */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
117 "Pluginpref Example", /**< name */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
118 VERSION, /**< version */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
119 /** summary */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
120 "An example of how to use pluginprefs",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
121 /** description */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
122 "An example of how to use pluginprefs",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
123 "Gary Kramlich <amc_grim@users.sf.net>", /**< author */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
124 GAIM_WEBSITE, /**< homepage */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
125
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
126 NULL, /**< load */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
127 NULL, /**< unload */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
128 NULL, /**< destroy */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
129
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
130 NULL, /**< ui_info */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
131 NULL, /**< extra_info */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
132 &prefs_info /**< prefs_info */
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
133 };
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 static void
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
136 init_plugin(GaimPlugin *plugin)
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
137 {
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
138 gaim_prefs_add_none("/plugins/core/pluginpref_example");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
139 gaim_prefs_add_bool("/plugins/core/pluginpref_example/bool", TRUE);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
140 gaim_prefs_add_int("/plugins/core/pluginpref_example/int", 0);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
141 gaim_prefs_add_int("/plugins/core/pluginpref_example/int_choice", 1);
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
142 gaim_prefs_add_string("/plugins/core/pluginpref_example/string",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
143 "string");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
144 gaim_prefs_add_string("/plugins/core/pluginpref_example/max_string",
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
145 "max length string");
7024b595b6ae [gaim-migrate @ 9467]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
146 gaim_prefs_add_string("/plugins/core/pluginpref_example/string_choice", "red");
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
8745
6c0fae7a4f1a [gaim-migrate @ 9500]
Luke Schierer <lschiere@pidgin.im>
parents: 8713
diff changeset
149 GAIM_INIT_PLUGIN(ppexample, init_plugin, info)