Mercurial > pidgin.yaz
comparison src/notify.c @ 12220:64254fbabc7b
[gaim-migrate @ 14522]
SF Patch #1363787 from Bartosz Oler
"This is a fix to the 'Find buddies' command in which,
after the search results window was closed, prpl's
internal state was not cleared. A minor modification in
the notify API was required.
This patch also adds a few more notifications for the
user."
There also appears to be a few unrelated GG prpl updates in here. I noticed that more strings are marked for translation now.
I made several changes to this patch. I also found out that we're not honoring the callbacks passed in to the notify API. That's a bug since we document them. I'm not in the mood to fix it. I changed GCallback to GHookFunc as it has the right type (whereas GCallback did not). The name isn't too bad either. I didn't really want to create a new callback function typedef.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 25 Nov 2005 01:33:10 +0000 |
parents | 216988c717da |
children | 976677e67239 |
comparison
equal
deleted
inserted
replaced
12219:f23ebb7b2dfd | 12220:64254fbabc7b |
---|---|
36 } GaimNotifyInfo; | 36 } GaimNotifyInfo; |
37 | 37 |
38 void * | 38 void * |
39 gaim_notify_message(void *handle, GaimNotifyMsgType type, | 39 gaim_notify_message(void *handle, GaimNotifyMsgType type, |
40 const char *title, const char *primary, | 40 const char *title, const char *primary, |
41 const char *secondary, GCallback cb, void *user_data) | 41 const char *secondary, GHookFunc cb, gpointer user_data) |
42 { | 42 { |
43 GaimNotifyUiOps *ops; | 43 GaimNotifyUiOps *ops; |
44 | 44 |
45 g_return_val_if_fail(primary != NULL, NULL); | 45 g_return_val_if_fail(primary != NULL, NULL); |
46 | 46 |
63 return NULL; | 63 return NULL; |
64 } | 64 } |
65 | 65 |
66 void * | 66 void * |
67 gaim_notify_email(void *handle, const char *subject, const char *from, | 67 gaim_notify_email(void *handle, const char *subject, const char *from, |
68 const char *to, const char *url, GCallback cb, | 68 const char *to, const char *url, GHookFunc cb, |
69 void *user_data) | 69 gpointer user_data) |
70 { | 70 { |
71 GaimNotifyUiOps *ops; | 71 GaimNotifyUiOps *ops; |
72 | 72 |
73 ops = gaim_notify_get_ui_ops(); | 73 ops = gaim_notify_get_ui_ops(); |
74 | 74 |
91 | 91 |
92 void * | 92 void * |
93 gaim_notify_emails(void *handle, size_t count, gboolean detailed, | 93 gaim_notify_emails(void *handle, size_t count, gboolean detailed, |
94 const char **subjects, const char **froms, | 94 const char **subjects, const char **froms, |
95 const char **tos, const char **urls, | 95 const char **tos, const char **urls, |
96 GCallback cb, void *user_data) | 96 GHookFunc cb, gpointer user_data) |
97 { | 97 { |
98 GaimNotifyUiOps *ops; | 98 GaimNotifyUiOps *ops; |
99 | 99 |
100 g_return_val_if_fail(count != 0, NULL); | 100 g_return_val_if_fail(count != 0, NULL); |
101 | 101 |
128 } | 128 } |
129 | 129 |
130 void * | 130 void * |
131 gaim_notify_formatted(void *handle, const char *title, const char *primary, | 131 gaim_notify_formatted(void *handle, const char *title, const char *primary, |
132 const char *secondary, const char *text, | 132 const char *secondary, const char *text, |
133 GCallback cb, void *user_data) | 133 GHookFunc cb, gpointer user_data) |
134 { | 134 { |
135 GaimNotifyUiOps *ops; | 135 GaimNotifyUiOps *ops; |
136 | 136 |
137 g_return_val_if_fail(primary != NULL, NULL); | 137 g_return_val_if_fail(primary != NULL, NULL); |
138 | 138 |
156 } | 156 } |
157 | 157 |
158 void * | 158 void * |
159 gaim_notify_searchresults(GaimConnection *gc, const char *title, | 159 gaim_notify_searchresults(GaimConnection *gc, const char *title, |
160 const char *primary, const char *secondary, | 160 const char *primary, const char *secondary, |
161 GaimNotifySearchResults *results, GCallback cb, void *user_data) | 161 GaimNotifySearchResults *results, GHookFunc cb, gpointer user_data) |
162 { | 162 { |
163 GaimNotifyUiOps *ops; | 163 GaimNotifyUiOps *ops; |
164 | 164 |
165 ops = gaim_notify_get_ui_ops(); | 165 ops = gaim_notify_get_ui_ops(); |
166 | 166 |
223 } | 223 } |
224 | 224 |
225 void | 225 void |
226 gaim_notify_searchresults_new_rows(GaimConnection *gc, | 226 gaim_notify_searchresults_new_rows(GaimConnection *gc, |
227 GaimNotifySearchResults *results, | 227 GaimNotifySearchResults *results, |
228 void *data, void *user_data) | 228 void *data, gpointer user_data) |
229 { | 229 { |
230 GaimNotifyUiOps *ops; | 230 GaimNotifyUiOps *ops; |
231 | 231 |
232 ops = gaim_notify_get_ui_ops(); | 232 ops = gaim_notify_get_ui_ops(); |
233 | 233 |
327 return g_list_nth_data(results->rows, row_id); | 327 return g_list_nth_data(results->rows, row_id); |
328 } | 328 } |
329 | 329 |
330 void * | 330 void * |
331 gaim_notify_userinfo(GaimConnection *gc, const char *who, | 331 gaim_notify_userinfo(GaimConnection *gc, const char *who, |
332 const char *text, GCallback cb, void *user_data) | 332 const char *text, GHookFunc cb, gpointer user_data) |
333 { | 333 { |
334 GaimNotifyUiOps *ops; | 334 GaimNotifyUiOps *ops; |
335 | 335 |
336 g_return_val_if_fail(who != NULL, NULL); | 336 g_return_val_if_fail(who != NULL, NULL); |
337 | 337 |