libpurple/plugins/test-request-input.c

Sat, 28 Sep 2019 03:11:33 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sat, 28 Sep 2019 03:11:33 -0500
changeset 39959
e47fcffd061b
parent 39245
ada3ed59ab05
child 40439
e9838d634d5e
permissions
-rw-r--r--

migrate the libpurple plugins to using purple.h only

39243
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /* pidgin
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 *
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Pidgin is the legal property of its developers, whose names are too numerous
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * source distribution.
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 *
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * (at your option) any later version.
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 *
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * GNU General Public License for more details.
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 *
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 */
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 #include <glib.h>
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 #include "internal.h"
39959
e47fcffd061b migrate the libpurple plugins to using purple.h only
Gary Kramlich <grim@reaperworld.com>
parents: 39245
diff changeset
25 #include <purple.h>
39243
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #define PREF_ROOT "/plugins"
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PREF_TEST "/plugins/tests"
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 #define PREF_PREFIX "/plugins/tests/request-input"
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #define PREF_SINGLE PREF_PREFIX "/single"
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #define PREF_MULTIPLE PREF_PREFIX "/multiple"
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #define PREF_HTML PREF_PREFIX "/html"
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 static void
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 plugin_input_callback(const gchar *pref, const gchar *text) {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 purple_prefs_set_string(pref, text);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 }
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 static void
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 plugin_input_single(PurplePluginAction *action) {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 purple_request_input(
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 _("Test request input single"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 _("Test request input single"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 purple_prefs_get_string(PREF_SINGLE),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 FALSE,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 FALSE,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 NULL,
39245
ada3ed59ab05 s/Ok/OK/g because OK is more Okay than Ok.
Gary Kramlich <grim@reaperworld.com>
parents: 39244
diff changeset
50 _("OK"),
39243
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 PURPLE_CALLBACK(plugin_input_callback),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 _("Cancel"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 purple_request_cpar_new(),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 PREF_SINGLE
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 );
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 }
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 static void
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 plugin_input_multiple(PurplePluginAction *action) {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 purple_request_input(
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 _("Test request input multiple"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 _("Test request input multiple"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 purple_prefs_get_string(PREF_MULTIPLE),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 TRUE,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 FALSE,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 NULL,
39245
ada3ed59ab05 s/Ok/OK/g because OK is more Okay than Ok.
Gary Kramlich <grim@reaperworld.com>
parents: 39244
diff changeset
70 _("OK"),
39243
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 PURPLE_CALLBACK(plugin_input_callback),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 _("Cancel"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 purple_request_cpar_new(),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 PREF_MULTIPLE
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 );
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 }
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 static void
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 plugin_input_html(PurplePluginAction *action) {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 purple_request_input(
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 _("Test request input HTML"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 _("Test request input HTML"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 purple_prefs_get_string(PREF_HTML),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 FALSE,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 FALSE,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 "html",
39245
ada3ed59ab05 s/Ok/OK/g because OK is more Okay than Ok.
Gary Kramlich <grim@reaperworld.com>
parents: 39244
diff changeset
90 _("OK"),
39243
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 PURPLE_CALLBACK(plugin_input_callback),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 _("Cancel"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 NULL,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 purple_request_cpar_new(),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 PREF_HTML
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 );
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 }
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99 static GList *
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 plugin_actions(PurplePlugin *plugin) {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 GList *l = NULL;
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 PurplePluginAction *action = NULL;
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 action = purple_plugin_action_new(_("Input single"), plugin_input_single);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 l = g_list_append(l, action);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 action = purple_plugin_action_new(_("Input multiple"), plugin_input_multiple);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108 l = g_list_append(l, action);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 action = purple_plugin_action_new(_("Input html"), plugin_input_html);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111 l = g_list_append(l, action);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 return l;
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 }
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 static PurplePluginInfo *
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117 plugin_query(GError **error) {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118 const gchar * const authors[] = {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 "Gary Kramlich <grim@reaperworld.com>",
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 NULL
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121 };
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 return purple_plugin_info_new(
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 "id", "core-test_request_input",
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
125 "name", N_("Test: request input"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
126 "version", DISPLAY_VERSION,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 "category", N_("Testing"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
128 "summary", N_("Test Request Input"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 "description", N_("This plugin adds actions to test purple_request_input"),
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 "authors", authors,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 "website", "https://pidgin.im",
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 "abi-version", PURPLE_ABI_VERSION,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 "actions-cb", plugin_actions,
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134 NULL
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135 );
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 };
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
137
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
138 static gboolean
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 plugin_load(PurplePlugin *plugin, GError **error) {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140 purple_prefs_add_none(PREF_ROOT);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 purple_prefs_add_none(PREF_TEST);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 purple_prefs_add_none(PREF_PREFIX);
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 purple_prefs_add_string(PREF_SINGLE, "");
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 purple_prefs_add_string(PREF_MULTIPLE, "");
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 purple_prefs_add_string(PREF_HTML, "");
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 return TRUE;
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 }
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
150 static gboolean
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 plugin_unload(PurplePlugin *plugin, GError **error) {
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
152 return TRUE;
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 }
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154
24db7140b77d Start of moving GtkRequest to Talkatu, but there's some weirdness going on yet
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 PURPLE_PLUGIN_INIT(test_request_input, plugin_query, plugin_load, plugin_unload);

mercurial