Mercurial > pidgin
comparison libpurple/plugins/codeinline.c @ 15822:32c366eeeb99
sed -ie 's/gaim/purple/g'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 07:01:17 +0000 |
parents | 5fe8042783c1 |
children | 4c707efebc0c |
comparison
equal
deleted
inserted
replaced
15821:84b0f9b23ede | 15822:32c366eeeb99 |
---|---|
1 /* | 1 /* |
2 * gaim | 2 * purple |
3 * | 3 * |
4 * Gaim is the legal property of its developers, whose names are too numerous | 4 * Purple is the legal property of its developers, whose names are too numerous |
5 * to list here. Please refer to the COPYRIGHT file distributed with this | 5 * to list here. Please refer to the COPYRIGHT file distributed with this |
6 * source distribution. | 6 * source distribution. |
7 * | 7 * |
8 * This program is free software; you can redistribute it and/or modify | 8 * This program is free software; you can redistribute it and/or modify |
9 * it under the terms of the GNU General Public License as published by | 9 * it under the terms of the GNU General Public License as published by |
24 #include "plugin.h" | 24 #include "plugin.h" |
25 #include "notify.h" | 25 #include "notify.h" |
26 #include "util.h" | 26 #include "util.h" |
27 #include "version.h" | 27 #include "version.h" |
28 | 28 |
29 GaimPlugin *plugin_handle = NULL; | 29 PurplePlugin *plugin_handle = NULL; |
30 | 30 |
31 static gboolean outgoing_msg_cb(GaimAccount *account, const char *who, char **message, | 31 static gboolean outgoing_msg_cb(PurpleAccount *account, const char *who, char **message, |
32 GaimConversation *conv, GaimMessageFlags flags, gpointer null) | 32 PurpleConversation *conv, PurpleMessageFlags flags, gpointer null) |
33 { | 33 { |
34 char *m; | 34 char *m; |
35 char **ms = g_strsplit(*message, "<u>", -1); | 35 char **ms = g_strsplit(*message, "<u>", -1); |
36 m = g_strjoinv("<font face=\"monospace\" color=\"#00b025\">", ms); | 36 m = g_strjoinv("<font face=\"monospace\" color=\"#00b025\">", ms); |
37 g_strfreev(ms); | 37 g_strfreev(ms); |
43 *message = m; | 43 *message = m; |
44 return FALSE; | 44 return FALSE; |
45 } | 45 } |
46 | 46 |
47 static gboolean | 47 static gboolean |
48 plugin_load(GaimPlugin *plugin) | 48 plugin_load(PurplePlugin *plugin) |
49 { | 49 { |
50 void *handle = gaim_conversations_get_handle(); | 50 void *handle = purple_conversations_get_handle(); |
51 plugin_handle = plugin; | 51 plugin_handle = plugin; |
52 gaim_signal_connect(handle, "writing-im-msg", plugin, | 52 purple_signal_connect(handle, "writing-im-msg", plugin, |
53 GAIM_CALLBACK(outgoing_msg_cb), NULL); | 53 PURPLE_CALLBACK(outgoing_msg_cb), NULL); |
54 gaim_signal_connect(handle, "sending-im-msg", plugin, | 54 purple_signal_connect(handle, "sending-im-msg", plugin, |
55 GAIM_CALLBACK(outgoing_msg_cb), NULL); | 55 PURPLE_CALLBACK(outgoing_msg_cb), NULL); |
56 | 56 |
57 return TRUE; | 57 return TRUE; |
58 } | 58 } |
59 | 59 |
60 | 60 |
61 static GaimPluginInfo info = | 61 static PurplePluginInfo info = |
62 { | 62 { |
63 GAIM_PLUGIN_MAGIC, | 63 PURPLE_PLUGIN_MAGIC, |
64 GAIM_MAJOR_VERSION, | 64 PURPLE_MAJOR_VERSION, |
65 GAIM_MINOR_VERSION, | 65 PURPLE_MINOR_VERSION, |
66 GAIM_PLUGIN_STANDARD, | 66 PURPLE_PLUGIN_STANDARD, |
67 NULL, | 67 NULL, |
68 0, | 68 0, |
69 NULL, | 69 NULL, |
70 GAIM_PRIORITY_DEFAULT, | 70 PURPLE_PRIORITY_DEFAULT, |
71 "codeinline", | 71 "codeinline", |
72 "Code Inline", | 72 "Code Inline", |
73 "1.0", | 73 "1.0", |
74 "Formats text as code", | 74 "Formats text as code", |
75 "Changes the formatting of any outgoing text such that " | 75 "Changes the formatting of any outgoing text such that " |
76 "anything underlined will be received green and monospace.", | 76 "anything underlined will be received green and monospace.", |
77 "Sean Egan <seanegan@gmail.com>", | 77 "Sean Egan <seanegan@gmail.com>", |
78 "http://gaim.sourceforge.net", | 78 "http://purple.sourceforge.net", |
79 plugin_load, | 79 plugin_load, |
80 NULL, | 80 NULL, |
81 NULL, | 81 NULL, |
82 NULL, | 82 NULL, |
83 NULL, | 83 NULL, |
84 NULL, | 84 NULL, |
85 NULL | 85 NULL |
86 }; | 86 }; |
87 | 87 |
88 static void | 88 static void |
89 init_plugin(GaimPlugin *plugin) | 89 init_plugin(PurplePlugin *plugin) |
90 { | 90 { |
91 } | 91 } |
92 | 92 |
93 GAIM_INIT_PLUGIN(urlcatcher, init_plugin, info) | 93 PURPLE_INIT_PLUGIN(urlcatcher, init_plugin, info) |