Mercurial > pidgin
comparison libpurple/plugins/newline.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 | 735d92e685ef |
comparison
equal
deleted
inserted
replaced
15821:84b0f9b23ede | 15822:32c366eeeb99 |
---|---|
26 #include <signals.h> | 26 #include <signals.h> |
27 #include <util.h> | 27 #include <util.h> |
28 #include <version.h> | 28 #include <version.h> |
29 | 29 |
30 static gboolean | 30 static gboolean |
31 addnewline_msg_cb(GaimAccount *account, char *sender, char **message, | 31 addnewline_msg_cb(PurpleAccount *account, char *sender, char **message, |
32 GaimConversation *conv, int *flags, void *data) | 32 PurpleConversation *conv, int *flags, void *data) |
33 { | 33 { |
34 if (g_ascii_strncasecmp(*message, "/me ", strlen("/me "))) { | 34 if (g_ascii_strncasecmp(*message, "/me ", strlen("/me "))) { |
35 char *tmp = g_strdup_printf("\n%s", *message); | 35 char *tmp = g_strdup_printf("\n%s", *message); |
36 g_free(*message); | 36 g_free(*message); |
37 *message = tmp; | 37 *message = tmp; |
39 | 39 |
40 return FALSE; | 40 return FALSE; |
41 } | 41 } |
42 | 42 |
43 static gboolean | 43 static gboolean |
44 plugin_load(GaimPlugin *plugin) | 44 plugin_load(PurplePlugin *plugin) |
45 { | 45 { |
46 void *conversation = gaim_conversations_get_handle(); | 46 void *conversation = purple_conversations_get_handle(); |
47 | 47 |
48 gaim_signal_connect(conversation, "writing-im-msg", | 48 purple_signal_connect(conversation, "writing-im-msg", |
49 plugin, GAIM_CALLBACK(addnewline_msg_cb), NULL); | 49 plugin, PURPLE_CALLBACK(addnewline_msg_cb), NULL); |
50 gaim_signal_connect(conversation, "writing-chat-msg", | 50 purple_signal_connect(conversation, "writing-chat-msg", |
51 plugin, GAIM_CALLBACK(addnewline_msg_cb), NULL); | 51 plugin, PURPLE_CALLBACK(addnewline_msg_cb), NULL); |
52 | 52 |
53 return TRUE; | 53 return TRUE; |
54 } | 54 } |
55 | 55 |
56 static GaimPluginInfo info = | 56 static PurplePluginInfo info = |
57 { | 57 { |
58 GAIM_PLUGIN_MAGIC, /**< magic */ | 58 PURPLE_PLUGIN_MAGIC, /**< magic */ |
59 GAIM_MAJOR_VERSION, /**< major version */ | 59 PURPLE_MAJOR_VERSION, /**< major version */ |
60 GAIM_MINOR_VERSION, /**< minor version */ | 60 PURPLE_MINOR_VERSION, /**< minor version */ |
61 GAIM_PLUGIN_STANDARD, /**< type */ | 61 PURPLE_PLUGIN_STANDARD, /**< type */ |
62 NULL, /**< ui_requirement */ | 62 NULL, /**< ui_requirement */ |
63 0, /**< flags */ | 63 0, /**< flags */ |
64 NULL, /**< dependencies */ | 64 NULL, /**< dependencies */ |
65 GAIM_PRIORITY_DEFAULT, /**< priority */ | 65 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
66 | 66 |
67 "core-plugin_pack-newline", /**< id */ | 67 "core-plugin_pack-newline", /**< id */ |
68 N_("New Line"), /**< name */ | 68 N_("New Line"), /**< name */ |
69 VERSION, /**< version */ | 69 VERSION, /**< version */ |
70 N_("Prepends a newline to displayed message."), /** summary */ | 70 N_("Prepends a newline to displayed message."), /** summary */ |
71 N_("Prepends a newline to messages so that the " | 71 N_("Prepends a newline to messages so that the " |
72 "rest of the message appears below the " | 72 "rest of the message appears below the " |
73 "screen name in the conversation window."), /** description */ | 73 "screen name in the conversation window."), /** description */ |
74 "Stu Tomlinson <stu@nosnilmot.com>", /**< author */ | 74 "Stu Tomlinson <stu@nosnilmot.com>", /**< author */ |
75 GAIM_WEBSITE, /**< homepage */ | 75 PURPLE_WEBSITE, /**< homepage */ |
76 | 76 |
77 plugin_load, /**< load */ | 77 plugin_load, /**< load */ |
78 NULL, /**< unload */ | 78 NULL, /**< unload */ |
79 NULL, /**< destroy */ | 79 NULL, /**< destroy */ |
80 | 80 |
83 NULL, /**< prefs_info */ | 83 NULL, /**< prefs_info */ |
84 NULL /**< actions */ | 84 NULL /**< actions */ |
85 }; | 85 }; |
86 | 86 |
87 static void | 87 static void |
88 init_plugin(GaimPlugin *plugin) { | 88 init_plugin(PurplePlugin *plugin) { |
89 } | 89 } |
90 | 90 |
91 GAIM_INIT_PLUGIN(lastseen, init_plugin, info) | 91 PURPLE_INIT_PLUGIN(lastseen, init_plugin, info) |