Mercurial > pidgin.yaz
comparison libpurple/plugins/buddynote.c @ 15823: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 | b0be5a8d8561 |
comparison
equal
deleted
inserted
replaced
15822:84b0f9b23ede | 15823:32c366eeeb99 |
---|---|
24 #include <signals.h> | 24 #include <signals.h> |
25 #include <util.h> | 25 #include <util.h> |
26 #include <version.h> | 26 #include <version.h> |
27 | 27 |
28 static void | 28 static void |
29 dont_do_it_cb(GaimBlistNode *node, const char *note) | 29 dont_do_it_cb(PurpleBlistNode *node, const char *note) |
30 { | 30 { |
31 } | 31 } |
32 | 32 |
33 static void | 33 static void |
34 do_it_cb(GaimBlistNode *node, const char *note) | 34 do_it_cb(PurpleBlistNode *node, const char *note) |
35 { | 35 { |
36 gaim_blist_node_set_string(node, "notes", note); | 36 purple_blist_node_set_string(node, "notes", note); |
37 } | 37 } |
38 | 38 |
39 static void | 39 static void |
40 buddynote_edit_cb(GaimBlistNode *node, gpointer data) | 40 buddynote_edit_cb(PurpleBlistNode *node, gpointer data) |
41 { | 41 { |
42 const char *note; | 42 const char *note; |
43 | 43 |
44 note = gaim_blist_node_get_string(node, "notes"); | 44 note = purple_blist_node_get_string(node, "notes"); |
45 | 45 |
46 gaim_request_input(node, _("Notes"), | 46 purple_request_input(node, _("Notes"), |
47 _("Enter your notes below..."), | 47 _("Enter your notes below..."), |
48 NULL, | 48 NULL, |
49 note, TRUE, FALSE, "html", | 49 note, TRUE, FALSE, "html", |
50 _("Save"), G_CALLBACK(do_it_cb), | 50 _("Save"), G_CALLBACK(do_it_cb), |
51 _("Cancel"), G_CALLBACK(dont_do_it_cb), | 51 _("Cancel"), G_CALLBACK(dont_do_it_cb), |
52 node); | 52 node); |
53 } | 53 } |
54 | 54 |
55 static void | 55 static void |
56 buddynote_extended_menu_cb(GaimBlistNode *node, GList **m) | 56 buddynote_extended_menu_cb(PurpleBlistNode *node, GList **m) |
57 { | 57 { |
58 GaimMenuAction *bna = NULL; | 58 PurpleMenuAction *bna = NULL; |
59 | 59 |
60 *m = g_list_append(*m, bna); | 60 *m = g_list_append(*m, bna); |
61 bna = gaim_menu_action_new(_("Edit Notes..."), GAIM_CALLBACK(buddynote_edit_cb), NULL, NULL); | 61 bna = purple_menu_action_new(_("Edit Notes..."), PURPLE_CALLBACK(buddynote_edit_cb), NULL, NULL); |
62 *m = g_list_append(*m, bna); | 62 *m = g_list_append(*m, bna); |
63 } | 63 } |
64 | 64 |
65 static gboolean | 65 static gboolean |
66 plugin_load(GaimPlugin *plugin) | 66 plugin_load(PurplePlugin *plugin) |
67 { | 67 { |
68 | 68 |
69 gaim_signal_connect(gaim_blist_get_handle(), "blist-node-extended-menu", | 69 purple_signal_connect(purple_blist_get_handle(), "blist-node-extended-menu", |
70 plugin, GAIM_CALLBACK(buddynote_extended_menu_cb), NULL); | 70 plugin, PURPLE_CALLBACK(buddynote_extended_menu_cb), NULL); |
71 | 71 |
72 return TRUE; | 72 return TRUE; |
73 } | 73 } |
74 | 74 |
75 static GaimPluginInfo info = | 75 static PurplePluginInfo info = |
76 { | 76 { |
77 GAIM_PLUGIN_MAGIC, | 77 PURPLE_PLUGIN_MAGIC, |
78 GAIM_MAJOR_VERSION, /**< major version */ | 78 PURPLE_MAJOR_VERSION, /**< major version */ |
79 GAIM_MINOR_VERSION, | 79 PURPLE_MINOR_VERSION, |
80 GAIM_PLUGIN_STANDARD, /**< type */ | 80 PURPLE_PLUGIN_STANDARD, /**< type */ |
81 NULL, /**< ui_requirement */ | 81 NULL, /**< ui_requirement */ |
82 0, /**< flags */ | 82 0, /**< flags */ |
83 NULL, /**< dependencies */ | 83 NULL, /**< dependencies */ |
84 GAIM_PRIORITY_DEFAULT, /**< priority */ | 84 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
85 | 85 |
86 "core-plugin_pack-buddynote", /**< id */ | 86 "core-plugin_pack-buddynote", /**< id */ |
87 N_("Buddy Notes"), /**< name */ | 87 N_("Buddy Notes"), /**< name */ |
88 VERSION, /**< version */ | 88 VERSION, /**< version */ |
89 N_("Store notes on particular buddies."), /** summary */ | 89 N_("Store notes on particular buddies."), /** summary */ |
90 N_("Adds the option to store notes for buddies " | 90 N_("Adds the option to store notes for buddies " |
91 "on your buddy list."), /** description */ | 91 "on your buddy list."), /** description */ |
92 "Stu Tomlinson <stu@nosnilmot.com>", /**< author */ | 92 "Stu Tomlinson <stu@nosnilmot.com>", /**< author */ |
93 GAIM_WEBSITE, /**< homepage */ | 93 PURPLE_WEBSITE, /**< homepage */ |
94 | 94 |
95 plugin_load, /**< load */ | 95 plugin_load, /**< load */ |
96 NULL, /**< unload */ | 96 NULL, /**< unload */ |
97 NULL, /**< destroy */ | 97 NULL, /**< destroy */ |
98 | 98 |
102 NULL /**< actions */ | 102 NULL /**< actions */ |
103 }; | 103 }; |
104 | 104 |
105 | 105 |
106 static void | 106 static void |
107 init_plugin(GaimPlugin *plugin) { | 107 init_plugin(PurplePlugin *plugin) { |
108 } | 108 } |
109 | 109 |
110 GAIM_INIT_PLUGIN(buddynote, init_plugin, info) | 110 PURPLE_INIT_PLUGIN(buddynote, init_plugin, info) |