pidgin/plugins/history.c

branch
soc.2013.gobjectification.plugins
changeset 36757
2e04586cf6e8
parent 34864
0e292d8887de
child 36782
64936dae41a3
equal deleted inserted replaced
36756:1bcc14114857 36757:2e04586cf6e8
188 gconstpointer val, gpointer data) 188 gconstpointer val, gpointer data)
189 { 189 {
190 history_prefs_check((PurplePlugin *)data); 190 history_prefs_check((PurplePlugin *)data);
191 } 191 }
192 192
193 static PidginPluginInfo *
194 plugin_query(GError **error)
195 {
196 const gchar * const authors[] = {
197 "Sean Egan <seanegan@gmail.com>",
198 NULL
199 };
200
201 return pidgin_plugin_info_new(
202 "id", HISTORY_PLUGIN_ID,
203 "name", N_("History"),
204 "version", DISPLAY_VERSION,
205 "category", N_("User interface"),
206 "summary", N_("Shows recently logged conversations in new "
207 "conversations."),
208 "description", N_("When a new conversation is opened this plugin will "
209 "insert the last conversation into the current "
210 "conversation."),
211 "authors", authors,
212 "website", PURPLE_WEBSITE,
213 "abi-version", PURPLE_ABI_VERSION,
214 NULL
215 );
216 }
217
193 static gboolean 218 static gboolean
194 plugin_load(PurplePlugin *plugin) 219 plugin_load(PurplePlugin *plugin, GError **error)
195 { 220 {
196 purple_signal_connect(purple_conversations_get_handle(), 221 purple_signal_connect(purple_conversations_get_handle(),
197 "conversation-created", 222 "conversation-created",
198 plugin, PURPLE_CALLBACK(historize), NULL); 223 plugin, PURPLE_CALLBACK(historize), NULL);
199 /* XXX: Do we want to listen to pidgin's "conversation-displayed" signal? */ 224 /* XXX: Do we want to listen to pidgin's "conversation-displayed" signal? */
206 history_prefs_check(plugin); 231 history_prefs_check(plugin);
207 232
208 return TRUE; 233 return TRUE;
209 } 234 }
210 235
211 static PurplePluginInfo info = 236 static gboolean
212 { 237 plugin_unload(PurplePlugin *plugin, GError **error)
213 PURPLE_PLUGIN_MAGIC, 238 {
214 PURPLE_MAJOR_VERSION, 239 return TRUE;
215 PURPLE_MINOR_VERSION, 240 }
216 PURPLE_PLUGIN_STANDARD, 241
217 PIDGIN_PLUGIN_TYPE, 242 PURPLE_PLUGIN_INIT(history, plugin_query, plugin_load, plugin_unload);
218 0,
219 NULL,
220 PURPLE_PRIORITY_DEFAULT,
221 HISTORY_PLUGIN_ID,
222 N_("History"),
223 DISPLAY_VERSION,
224 N_("Shows recently logged conversations in new conversations."),
225 N_("When a new conversation is opened this plugin will insert "
226 "the last conversation into the current conversation."),
227 "Sean Egan <seanegan@gmail.com>",
228 PURPLE_WEBSITE,
229 plugin_load,
230 NULL,
231 NULL,
232 NULL,
233 NULL,
234 NULL,
235 NULL,
236
237 /* padding */
238 NULL,
239 NULL,
240 NULL,
241 NULL
242 };
243
244 static void
245 init_plugin(PurplePlugin *plugin)
246 {
247 }
248
249 PURPLE_INIT_PLUGIN(history, init_plugin, info)

mercurial