annotate src/notify.c @ 14079:25a2b762cd61

[gaim-migrate @ 16700] stuff allocated by g_malloc() should be freed with g_free() committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 11 Aug 2006 02:42:13 +0000
parents 8bda65b88e49
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file notify.c Notification API
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7035
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7035
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7035
diff changeset
9 * source distribution.
6465
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
10 *
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * (at your option) any later version.
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 *
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * GNU General Public License for more details.
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 *
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 */
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 #include "notify.h"
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 static GaimNotifyUiOps *notify_ui_ops = NULL;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 static GList *handles = NULL;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 typedef struct
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 GaimNotifyType type;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 void *handle;
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
34 void *ui_handle;
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
35 GaimNotifyCloseCallback cb;
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
36 gpointer cb_user_data;
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 } GaimNotifyInfo;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 void *
6356
ee0044f3e377 [gaim-migrate @ 6855]
Christian Hammond <chipx86@chipx86.com>
parents: 6106
diff changeset
40 gaim_notify_message(void *handle, GaimNotifyMsgType type,
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 const char *title, const char *primary,
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
42 const char *secondary, GaimNotifyCloseCallback cb, gpointer user_data)
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 GaimNotifyUiOps *ops;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 g_return_val_if_fail(primary != NULL, NULL);
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
48 ops = gaim_notify_get_ui_ops();
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 if (ops != NULL && ops->notify_message != NULL) {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 GaimNotifyInfo *info;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
53 info = g_new0(GaimNotifyInfo, 1);
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
54 info->type = GAIM_NOTIFY_MESSAGE;
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
55 info->handle = handle;
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
56 info->ui_handle = ops->notify_message(type, title, primary,
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
57 secondary);
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
58 info->cb = cb;
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
59 info->cb_user_data = user_data;
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
61 if (info->ui_handle != NULL) {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
62 handles = g_list_append(handles, info);
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
63
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
64 return info->ui_handle;
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
65
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
66 } else {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
67 if (info->cb != NULL)
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
68 info->cb(info->cb_user_data);
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
70 g_free(info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
71
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
72 return NULL;
14002
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
73 }
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
74
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
75 } else {
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
76 if (cb != NULL)
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
77 cb(user_data);
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 return NULL;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 void *
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 gaim_notify_email(void *handle, const char *subject, const char *from,
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
85 const char *to, const char *url, GaimNotifyCloseCallback cb,
12220
64254fbabc7b [gaim-migrate @ 14522]
Richard Laager <rlaager@wiktel.com>
parents: 12129
diff changeset
86 gpointer user_data)
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 GaimNotifyUiOps *ops;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
90 ops = gaim_notify_get_ui_ops();
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92 if (ops != NULL && ops->notify_email != NULL) {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 GaimNotifyInfo *info;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
95 info = g_new0(GaimNotifyInfo, 1);
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
96 info->type = GAIM_NOTIFY_EMAIL;
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
97 info->handle = handle;
12647
852df2d9d4f8 [gaim-migrate @ 14985]
Richard Laager <rlaager@wiktel.com>
parents: 12624
diff changeset
98 info->ui_handle = ops->notify_email(handle, subject, from, to, url);
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
99 info->cb = cb;
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
100 info->cb_user_data = user_data;
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
102 if (info->ui_handle != NULL) {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
103 handles = g_list_append(handles, info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
104
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
105 return info->ui_handle;
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
106
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
107 } else {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
108 if (info->cb != NULL)
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
109 info->cb(info->cb_user_data);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
110
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
111 g_free(info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
112
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
113 return NULL;
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
114 }
14002
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
115 } else {
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
116 if (cb != NULL)
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
117 cb(user_data);
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120 return NULL;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 void *
5522
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
124 gaim_notify_emails(void *handle, size_t count, gboolean detailed,
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
125 const char **subjects, const char **froms,
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
126 const char **tos, const char **urls,
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
127 GaimNotifyCloseCallback cb, gpointer user_data)
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 GaimNotifyUiOps *ops;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131 g_return_val_if_fail(count != 0, NULL);
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132
5522
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
133 if (count == 1) {
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
134 return gaim_notify_email(handle,
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
135 (subjects == NULL ? NULL : *subjects),
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
136 (froms == NULL ? NULL : *froms),
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
137 (tos == NULL ? NULL : *tos),
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
138 (urls == NULL ? NULL : *urls),
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
139 cb, user_data);
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
140 }
a3e6a5ef49b5 [gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents: 5476
diff changeset
141
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
142 ops = gaim_notify_get_ui_ops();
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 if (ops != NULL && ops->notify_emails != NULL) {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 GaimNotifyInfo *info;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
147 info = g_new0(GaimNotifyInfo, 1);
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
148 info->type = GAIM_NOTIFY_EMAILS;
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
149 info->handle = handle;
12647
852df2d9d4f8 [gaim-migrate @ 14985]
Richard Laager <rlaager@wiktel.com>
parents: 12624
diff changeset
150 info->ui_handle = ops->notify_emails(handle, count, detailed, subjects,
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
151 froms, tos, urls);
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
152 info->cb = cb;
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
153 info->cb_user_data = user_data;
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
155 if (info->ui_handle != NULL) {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
156 handles = g_list_append(handles, info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
157
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
158 return info->ui_handle;
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
159
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
160 } else {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
161 if (info->cb != NULL)
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
162 info->cb(info->cb_user_data);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
163
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
164 g_free(info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
165
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
166 return NULL;
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
167 }
14002
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
168
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
169 } else {
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
170 if (cb != NULL)
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
171 cb(user_data);
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
173
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
174 return NULL;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
176
6381
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
177 void *
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
178 gaim_notify_formatted(void *handle, const char *title, const char *primary,
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
179 const char *secondary, const char *text,
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
180 GaimNotifyCloseCallback cb, gpointer user_data)
6381
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
181 {
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
182 GaimNotifyUiOps *ops;
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
183
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
184 g_return_val_if_fail(primary != NULL, NULL);
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
185
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
186 ops = gaim_notify_get_ui_ops();
6381
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
187
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
188 if (ops != NULL && ops->notify_formatted != NULL) {
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
189 GaimNotifyInfo *info;
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
190
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
191 info = g_new0(GaimNotifyInfo, 1);
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
192 info->type = GAIM_NOTIFY_FORMATTED;
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
193 info->handle = handle;
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
194 info->ui_handle = ops->notify_formatted(title, primary, secondary, text);
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
195 info->cb = cb;
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
196 info->cb_user_data = user_data;
6381
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
197
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
198 if (info->ui_handle != NULL) {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
199 handles = g_list_append(handles, info);
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
200
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
201 return info->ui_handle;
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
202
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
203 } else {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
204 if (info->cb != NULL)
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
205 info->cb(info->cb_user_data);
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
206
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
207 g_free(info);
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
208
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
209 return NULL;
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
210 }
14002
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
211
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
212 } else {
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
213 if (cb != NULL)
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
214 cb(user_data);
6381
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
215 }
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
216
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
217 return NULL;
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
218 }
e006685f75aa [gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents: 6356
diff changeset
219
10439
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
220 void *
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
221 gaim_notify_searchresults(GaimConnection *gc, const char *title,
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
222 const char *primary, const char *secondary,
13640
d12bbe6da705 [gaim-migrate @ 16038]
Bartoz Oler <bartosz@pidgin.im>
parents: 12647
diff changeset
223 GaimNotifySearchResults *results, GaimNotifyCloseCallback cb,
d12bbe6da705 [gaim-migrate @ 16038]
Bartoz Oler <bartosz@pidgin.im>
parents: 12647
diff changeset
224 gpointer user_data)
10439
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
225 {
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
226 GaimNotifyUiOps *ops;
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
227
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
228 ops = gaim_notify_get_ui_ops();
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
229
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
230 if (ops != NULL && ops->notify_searchresults != NULL) {
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
231 GaimNotifyInfo *info;
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
232
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
233 info = g_new0(GaimNotifyInfo, 1);
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
234 info->type = GAIM_NOTIFY_SEARCHRESULTS;
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
235 info->handle = gc;
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
236 info->ui_handle = ops->notify_searchresults(gc, title, primary,
13640
d12bbe6da705 [gaim-migrate @ 16038]
Bartoz Oler <bartosz@pidgin.im>
parents: 12647
diff changeset
237 secondary, results, user_data);
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
238 info->cb = cb;
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
239 info->cb_user_data = user_data;
10439
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
240
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
241 if (info->ui_handle != NULL) {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
242 handles = g_list_append(handles, info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
243
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
244 return info->ui_handle;
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
245
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
246 } else {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
247 if (info->cb != NULL)
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
248 info->cb(info->cb_user_data);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
249
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
250 g_free(info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
251
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
252 return NULL;
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
253 }
10439
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
254
14002
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
255 } else {
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
256 if (cb != NULL)
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
257 cb(user_data);
10439
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
258 }
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
259
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
260 return NULL;
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
261 }
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
262
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
263 void
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
264 gaim_notify_searchresults_free(GaimNotifySearchResults *results)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
265 {
12624
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
266 GList *l;
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
267
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
268 g_return_if_fail(results != NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
269
12624
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
270 for (l = results->buttons; l; l = g_list_delete_link(l, l)) {
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
271 GaimNotifySearchButton *button = l->data;
13976
6a5aaf46bd52 [gaim-migrate @ 16534]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 13640
diff changeset
272 g_free(button->label);
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
273 g_free(button);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
274 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
275
12624
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
276 for (l = results->rows; l; l = g_list_delete_link(l, l)) {
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
277 GList *row = l->data;
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
278 g_list_foreach(row, (GFunc)g_free, NULL);
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
279 g_list_free(row);
12624
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
280 }
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
281
12624
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
282 for (l = results->columns; l; l = g_list_delete_link(l, l)) {
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
283 GaimNotifySearchColumn *column = l->data;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
284 g_free(column->title);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
285 g_free(column);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
286 }
12624
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
287
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
288 g_free(results);
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
289 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
290
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
291 void
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
292 gaim_notify_searchresults_new_rows(GaimConnection *gc,
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
293 GaimNotifySearchResults *results,
13640
d12bbe6da705 [gaim-migrate @ 16038]
Bartoz Oler <bartosz@pidgin.im>
parents: 12647
diff changeset
294 void *data)
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
295 {
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
296 GaimNotifyUiOps *ops;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
297
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
298 ops = gaim_notify_get_ui_ops();
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
299
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
300 if (ops != NULL && ops->notify_searchresults != NULL) {
13640
d12bbe6da705 [gaim-migrate @ 16038]
Bartoz Oler <bartosz@pidgin.im>
parents: 12647
diff changeset
301 ops->notify_searchresults_new_rows(gc, results, data);
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
302 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
303 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
304
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
305 void
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
306 gaim_notify_searchresults_button_add(GaimNotifySearchResults *results,
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
307 GaimNotifySearchButtonType type,
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
308 GaimNotifySearchResultsCallback cb)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
309 {
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
310 GaimNotifySearchButton *button;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
311
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
312 g_return_if_fail(results != NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
313 g_return_if_fail(cb != NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
314
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
315 button = g_new0(GaimNotifySearchButton, 1);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
316 button->callback = cb;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
317 button->type = type;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
318
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
319 results->buttons = g_list_append(results->buttons, button);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
320 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
321
12624
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
322
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
323 void
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
324 gaim_notify_searchresults_button_add_labeled(GaimNotifySearchResults *results,
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
325 const char *label,
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
326 GaimNotifySearchResultsCallback cb) {
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
327 GaimNotifySearchButton *button;
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
328
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
329 g_return_if_fail(results != NULL);
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
330 g_return_if_fail(cb != NULL);
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
331 g_return_if_fail(label != NULL);
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
332 g_return_if_fail(*label != '\0');
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
333
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
334 button = g_new0(GaimNotifySearchButton, 1);
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
335 button->callback = cb;
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
336 button->type = GAIM_NOTIFY_BUTTON_LABELED;
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
337 button->label = g_strdup(label);
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
338
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
339 results->buttons = g_list_append(results->buttons, button);
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
340 }
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
341
851b0bd7eb52 [gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents: 12257
diff changeset
342
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
343 GaimNotifySearchResults *
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
344 gaim_notify_searchresults_new()
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
345 {
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
346 GaimNotifySearchResults *rs = g_new0(GaimNotifySearchResults, 1);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
347
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
348 return rs;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
349 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
350
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
351 void
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
352 gaim_notify_searchresults_column_add(GaimNotifySearchResults *results,
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
353 GaimNotifySearchColumn *column)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
354 {
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
355 g_return_if_fail(results != NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
356 g_return_if_fail(column != NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
357
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
358 results->columns = g_list_append(results->columns, column);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
359 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
360
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
361 void gaim_notify_searchresults_row_add(GaimNotifySearchResults *results,
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
362 GList *row)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
363 {
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
364 g_return_if_fail(results != NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
365 g_return_if_fail(row != NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
366
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
367 results->rows = g_list_append(results->rows, row);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
368 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
369
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
370 GaimNotifySearchColumn *
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
371 gaim_notify_searchresults_column_new(const char *title)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
372 {
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
373 GaimNotifySearchColumn *sc;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
374
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
375 g_return_val_if_fail(title != NULL, NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
376
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
377 sc = g_new0(GaimNotifySearchColumn, 1);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
378 sc->title = g_strdup(title);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
379
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
380 return sc;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
381 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
382
12257
ca27de274225 [gaim-migrate @ 14559]
Richard Laager <rlaager@wiktel.com>
parents: 12242
diff changeset
383 guint
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
384 gaim_notify_searchresults_get_columns_count(GaimNotifySearchResults *results)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
385 {
12257
ca27de274225 [gaim-migrate @ 14559]
Richard Laager <rlaager@wiktel.com>
parents: 12242
diff changeset
386 g_return_val_if_fail(results != NULL, 0);
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
387
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
388 return g_list_length(results->columns);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
389 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
390
12257
ca27de274225 [gaim-migrate @ 14559]
Richard Laager <rlaager@wiktel.com>
parents: 12242
diff changeset
391 guint
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
392 gaim_notify_searchresults_get_rows_count(GaimNotifySearchResults *results)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
393 {
12257
ca27de274225 [gaim-migrate @ 14559]
Richard Laager <rlaager@wiktel.com>
parents: 12242
diff changeset
394 g_return_val_if_fail(results != NULL, 0);
11359
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
395
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
396 return g_list_length(results->rows);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
397 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
398
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
399 char *
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
400 gaim_notify_searchresults_column_get_title(GaimNotifySearchResults *results,
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
401 unsigned int column_id)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
402 {
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
403 g_return_val_if_fail(results != NULL, NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
404
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
405 return ((GaimNotifySearchColumn *)g_list_nth_data(results->columns, column_id))->title;
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
406 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
407
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
408 GList *
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
409 gaim_notify_searchresults_row_get(GaimNotifySearchResults *results,
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
410 unsigned int row_id)
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
411 {
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
412 g_return_val_if_fail(results != NULL, NULL);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
413
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
414 return g_list_nth_data(results->rows, row_id);
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
415 }
9480e0d0f563 [gaim-migrate @ 13581]
Bartoz Oler <bartosz@pidgin.im>
parents: 10439
diff changeset
416
10439
911530134bf8 [gaim-migrate @ 11697]
Mark Doliner <mark@kingant.net>
parents: 10240
diff changeset
417 void *
11531
bf763a1b2454 [gaim-migrate @ 13780]
Luke Schierer <lschiere@pidgin.im>
parents: 11359
diff changeset
418 gaim_notify_userinfo(GaimConnection *gc, const char *who,
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
419 const char *text, GaimNotifyCloseCallback cb, gpointer user_data)
9797
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
420 {
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
421 GaimNotifyUiOps *ops;
11531
bf763a1b2454 [gaim-migrate @ 13780]
Luke Schierer <lschiere@pidgin.im>
parents: 11359
diff changeset
422
11533
c9b815aeddc1 [gaim-migrate @ 13782]
Richard Laager <rlaager@wiktel.com>
parents: 11531
diff changeset
423 g_return_val_if_fail(who != NULL, NULL);
9797
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
424
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
425 ops = gaim_notify_get_ui_ops();
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
426
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
427 if (ops != NULL && ops->notify_userinfo != NULL) {
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
428 GaimNotifyInfo *info;
12129
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
429 char *infotext = g_strdup(text);
9797
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
430
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
431 info = g_new0(GaimNotifyInfo, 1);
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
432 info->type = GAIM_NOTIFY_USERINFO;
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
433 info->handle = gc;
12129
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
434
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
435 gaim_signal_emit(gaim_notify_get_handle(), "displaying-userinfo",
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
436 gaim_connection_get_account(gc), who, &infotext);
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
437
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
438 info->ui_handle = ops->notify_userinfo(gc, who, infotext);
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
439 info->cb = cb;
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
440 info->cb_user_data = user_data;
9797
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
441
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
442 g_free(infotext);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
443
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
444 if (info->ui_handle != NULL) {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
445 handles = g_list_append(handles, info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
446
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
447 return info->ui_handle;
9797
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
448
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
449 } else {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
450 if (info->cb != NULL)
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
451 info->cb(info->cb_user_data);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
452
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
453 g_free(info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
454
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
455 return NULL;
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
456 }
14002
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
457
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
458 } else {
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
459 if (cb != NULL)
fccb5cfa33b9 [gaim-migrate @ 16587]
Evan Schoenberg <evan.s@dreskin.net>
parents: 14001
diff changeset
460 cb(user_data);
9797
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
461 }
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
462
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
463 return NULL;
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
464 }
62eb9fe24692 [gaim-migrate @ 10665]
Luke Schierer <lschiere@pidgin.im>
parents: 8046
diff changeset
465
6465
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
466 void *
10240
95ca0db2d01d [gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 10209
diff changeset
467 gaim_notify_uri(void *handle, const char *uri)
6465
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
468 {
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
469 GaimNotifyUiOps *ops;
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
470
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
471 g_return_val_if_fail(uri != NULL, NULL);
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
472
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
473 ops = gaim_notify_get_ui_ops();
6465
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
474
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
475 if (ops != NULL && ops->notify_uri != NULL) {
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
476 GaimNotifyInfo *info;
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
477
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
478 info = g_new0(GaimNotifyInfo, 1);
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
479 info->type = GAIM_NOTIFY_URI;
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
480 info->handle = handle;
10240
95ca0db2d01d [gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents: 10209
diff changeset
481 info->ui_handle = ops->notify_uri(uri);
6465
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
482
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
483 if (info->ui_handle != NULL) {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
484 handles = g_list_append(handles, info);
14035
8bda65b88e49 [gaim-migrate @ 16638]
Mark Doliner <mark@kingant.net>
parents: 14002
diff changeset
485
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
486 return info->ui_handle;
6465
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
487
14001
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
488 } else {
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
489 g_free(info);
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
490
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
491 return NULL;
66d01a547603 [gaim-migrate @ 16586]
Evan Schoenberg <evan.s@dreskin.net>
parents: 13976
diff changeset
492 }
6465
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
493 }
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
494
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
495 return NULL;
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
496 }
fb64cc87bc96 [gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents: 6381
diff changeset
497
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
498 void
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
499 gaim_notify_close(GaimNotifyType type, void *ui_handle)
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
500 {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
501 GList *l;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
502 GaimNotifyUiOps *ops;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
503
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
504 g_return_if_fail(ui_handle != NULL);
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
505
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
506 ops = gaim_notify_get_ui_ops();
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
507
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
508 for (l = handles; l != NULL; l = l->next) {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
509 GaimNotifyInfo *info = l->data;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
510
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
511 if (info->ui_handle == ui_handle) {
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
512 handles = g_list_remove(handles, info);
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
513
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
514 if (ops != NULL && ops->close_notify != NULL)
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
515 ops->close_notify(info->type, ui_handle);
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
516
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
517 if (info->cb != NULL)
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
518 info->cb(info->cb_user_data);
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
519
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
520 g_free(info);
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
521
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
522 break;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
523 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
524 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
525 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
526
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
527 void
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
528 gaim_notify_close_with_handle(void *handle)
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
529 {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
530 GList *l, *l_next;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
531 GaimNotifyUiOps *ops;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
532
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
533 g_return_if_fail(handle != NULL);
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
534
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
535 ops = gaim_notify_get_ui_ops();
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
536
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
537 for (l = handles; l != NULL; l = l_next) {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
538 GaimNotifyInfo *info = l->data;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
539
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
540 l_next = l->next;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
541
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
542 if (info->handle == handle) {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
543 handles = g_list_remove(handles, info);
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
544
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
545 if (ops != NULL && ops->close_notify != NULL)
5476
9bcd8cd625ae [gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents: 5437
diff changeset
546 ops->close_notify(info->type, info->ui_handle);
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
547
12242
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
548 if (info->cb != NULL)
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
549 info->cb(info->cb_user_data);
976677e67239 [gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents: 12220
diff changeset
550
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
551 g_free(info);
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
552 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
553 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
554 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
555
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
556 void
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
557 gaim_notify_set_ui_ops(GaimNotifyUiOps *ops)
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
558 {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
559 notify_ui_ops = ops;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
560 }
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
561
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
562 GaimNotifyUiOps *
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6465
diff changeset
563 gaim_notify_get_ui_ops(void)
5437
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
564 {
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
565 return notify_ui_ops;
0031a613a87d [gaim-migrate @ 5819]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
566 }
12129
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
567
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
568 void *
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
569 gaim_notify_get_handle(void)
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
570 {
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
571 static int handle;
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
572
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
573 return &handle;
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
574 }
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
575
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
576 void
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
577 gaim_notify_init(void)
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
578 {
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
579 gpointer handle = gaim_notify_get_handle();
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
580
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
581 gaim_signal_register(handle, "displaying-userinfo",
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
582 gaim_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3,
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
583 gaim_value_new(GAIM_TYPE_SUBTYPE,
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
584 GAIM_SUBTYPE_ACCOUNT),
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
585 gaim_value_new(GAIM_TYPE_STRING),
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
586 gaim_value_new_outgoing(GAIM_TYPE_STRING));
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
587 }
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
588
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
589 void
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
590 gaim_notify_uninit(void)
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
591 {
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
592 gaim_signals_unregister_by_instance(gaim_notify_get_handle());
216988c717da [gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents: 11533
diff changeset
593 }