Mercurial > pidgin.yaz
annotate libpurple/notify.c @ 32235:5498ee1aa30b
Copy hostname fallbacks using g_strlcpy instead of strcpy.
Thanks to the Electronic Frontier Foundation (https://www.eff.org/) for
this patch.
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Sun, 17 Jul 2011 21:04:52 +0000 |
parents | 0123c69ec0e5 |
children | 7281d151e492 63fb41aa3dbe |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * @file notify.c Notification API |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * @ingroup core |
20074
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19680
diff
changeset
|
4 */ |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19680
diff
changeset
|
5 |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19680
diff
changeset
|
6 /* purple |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * |
15823 | 8 * Purple is the legal property of its developers, whose names are too numerous |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18675
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 */ |
24292
8282911d5e17
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@wiktel.com>
parents:
23207
diff
changeset
|
26 #define _PURPLE_NOTIFY_C_ |
8282911d5e17
Build everything with the *_DISABLE_DEPRECATED flags set. This allows us
Richard Laager <rlaager@wiktel.com>
parents:
23207
diff
changeset
|
27 |
17079
46351036fdb4
DBusify userinfo stuff.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16606
diff
changeset
|
28 #include "internal.h" |
46351036fdb4
DBusify userinfo stuff.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16606
diff
changeset
|
29 #include "dbus-maybe.h" |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 #include "notify.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 |
15823 | 32 static PurpleNotifyUiOps *notify_ui_ops = NULL; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 static GList *handles = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 typedef struct |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 { |
15823 | 37 PurpleNotifyType type; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 void *handle; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
39 void *ui_handle; |
15823 | 40 PurpleNotifyCloseCallback cb; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
41 gpointer cb_user_data; |
15823 | 42 } PurpleNotifyInfo; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
43 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
44 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 * Definition of a user info entry |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 */ |
15823 | 47 struct _PurpleNotifyUserInfoEntry |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 char *label; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 char *value; |
15823 | 51 PurpleNotifyUserInfoEntryType type; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 |
15823 | 54 struct _PurpleNotifyUserInfo |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
55 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 GList *user_info_entries; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
58 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
59 void * |
15823 | 60 purple_notify_message(void *handle, PurpleNotifyMsgType type, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
61 const char *title, const char *primary, |
15823 | 62 const char *secondary, PurpleNotifyCloseCallback cb, gpointer user_data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 { |
15823 | 64 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
66 g_return_val_if_fail(primary != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
67 |
15823 | 68 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
70 if (ops != NULL && ops->notify_message != NULL) { |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
71 void *ui_handle = ops->notify_message(type, title, primary, |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
72 secondary); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
73 if (ui_handle != NULL) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
74 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
75 PurpleNotifyInfo *info = g_new0(PurpleNotifyInfo, 1); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
76 info->type = PURPLE_NOTIFY_MESSAGE; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
77 info->handle = handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
78 info->ui_handle = ui_handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
79 info->cb = cb; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
80 info->cb_user_data = user_data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 handles = g_list_append(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 return info->ui_handle; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
85 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
86 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
87 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
88 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
89 if (cb != NULL) |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
90 cb(user_data); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
91 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
92 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
93 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
94 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
95 void * |
15823 | 96 purple_notify_email(void *handle, const char *subject, const char *from, |
97 const char *to, const char *url, PurpleNotifyCloseCallback cb, | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
98 gpointer user_data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
99 { |
15823 | 100 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
101 |
15823 | 102 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
103 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
104 if (ops != NULL && ops->notify_email != NULL) { |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
105 void *ui_handle; |
18675
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
106 |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
107 purple_signal_emit(purple_notify_get_handle(), "displaying-email-notification", |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
108 subject, from, to, url); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
109 |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
110 ui_handle = ops->notify_email(handle, subject, from, to, url); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
111 |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
112 if (ui_handle != NULL) { |
18675
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
113 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
114 PurpleNotifyInfo *info = g_new0(PurpleNotifyInfo, 1); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
115 info->type = PURPLE_NOTIFY_EMAIL; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
116 info->handle = handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
117 info->ui_handle = ui_handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
118 info->cb = cb; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
119 info->cb_user_data = user_data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
120 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
121 handles = g_list_append(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 return info->ui_handle; |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
124 } |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
125 } |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
127 if (cb != NULL) |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
128 cb(user_data); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
130 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
131 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
132 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
133 void * |
15823 | 134 purple_notify_emails(void *handle, size_t count, gboolean detailed, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
135 const char **subjects, const char **froms, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
136 const char **tos, const char **urls, |
15823 | 137 PurpleNotifyCloseCallback cb, gpointer user_data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 { |
15823 | 139 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
140 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 if (count == 1) { |
15823 | 142 return purple_notify_email(handle, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 (subjects == NULL ? NULL : *subjects), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 (froms == NULL ? NULL : *froms), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 (tos == NULL ? NULL : *tos), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 (urls == NULL ? NULL : *urls), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 cb, user_data); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 |
15823 | 150 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 if (ops != NULL && ops->notify_emails != NULL) { |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
153 void *ui_handle; |
18675
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
154 |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
155 purple_signal_emit(purple_notify_get_handle(), "displaying-emails-notification", |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
156 subjects, froms, tos, urls, count); |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
157 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
158 ui_handle = ops->notify_emails(handle, count, detailed, subjects, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
159 froms, tos, urls); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
160 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
161 if (ui_handle != NULL) { |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
162 PurpleNotifyInfo *info = g_new0(PurpleNotifyInfo, 1); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
163 info->type = PURPLE_NOTIFY_EMAILS; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
164 info->handle = handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
165 info->ui_handle = ui_handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
166 info->cb = cb; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
167 info->cb_user_data = user_data; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
168 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
169 handles = g_list_append(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
170 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
171 return info->ui_handle; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
172 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
173 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
174 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
175 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
176 if (cb != NULL) |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
177 cb(user_data); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
178 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
179 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
180 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
181 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
182 void * |
15823 | 183 purple_notify_formatted(void *handle, const char *title, const char *primary, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
184 const char *secondary, const char *text, |
15823 | 185 PurpleNotifyCloseCallback cb, gpointer user_data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
186 { |
15823 | 187 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
188 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
189 g_return_val_if_fail(primary != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
190 |
15823 | 191 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
192 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
193 if (ops != NULL && ops->notify_formatted != NULL) { |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
194 void *ui_handle = ops->notify_formatted(title, primary, secondary, text); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
195 |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
196 if (ui_handle != NULL) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
197 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
198 PurpleNotifyInfo *info = g_new0(PurpleNotifyInfo, 1); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
199 info->type = PURPLE_NOTIFY_FORMATTED; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
200 info->handle = handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
201 info->ui_handle = ui_handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
202 info->cb = cb; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
203 info->cb_user_data = user_data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
204 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 handles = g_list_append(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 return info->ui_handle; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
208 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
209 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
211 if (cb != NULL) |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
212 cb(user_data); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
215 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 void * |
15823 | 217 purple_notify_searchresults(PurpleConnection *gc, const char *title, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
218 const char *primary, const char *secondary, |
15823 | 219 PurpleNotifySearchResults *results, PurpleNotifyCloseCallback cb, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 gpointer user_data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 { |
15823 | 222 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
223 |
15823 | 224 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 if (ops != NULL && ops->notify_searchresults != NULL) { |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
227 void *ui_handle = ops->notify_searchresults(gc, title, primary, |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
228 secondary, results, user_data); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
229 if (ui_handle != NULL) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
231 PurpleNotifyInfo *info = g_new0(PurpleNotifyInfo, 1); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
232 info->type = PURPLE_NOTIFY_SEARCHRESULTS; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
233 info->handle = gc; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
234 info->ui_handle = ui_handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
235 info->cb = cb; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
236 info->cb_user_data = user_data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
238 handles = g_list_append(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
239 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
240 return info->ui_handle; |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
241 } |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
242 } |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
243 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
244 if (cb != NULL) |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
245 cb(user_data); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
246 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
247 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
248 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
249 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
250 void |
15823 | 251 purple_notify_searchresults_free(PurpleNotifySearchResults *results) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
252 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
253 GList *l; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
254 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
255 g_return_if_fail(results != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
256 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
257 for (l = results->buttons; l; l = g_list_delete_link(l, l)) { |
15823 | 258 PurpleNotifySearchButton *button = l->data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
259 g_free(button->label); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
260 g_free(button); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
261 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
262 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
263 for (l = results->rows; l; l = g_list_delete_link(l, l)) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
264 GList *row = l->data; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
265 g_list_foreach(row, (GFunc)g_free, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
266 g_list_free(row); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
267 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
268 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
269 for (l = results->columns; l; l = g_list_delete_link(l, l)) { |
15823 | 270 PurpleNotifySearchColumn *column = l->data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
271 g_free(column->title); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
272 g_free(column); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
273 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
274 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
275 g_free(results); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
276 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
277 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
278 void |
15823 | 279 purple_notify_searchresults_new_rows(PurpleConnection *gc, |
280 PurpleNotifySearchResults *results, | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
281 void *data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
282 { |
15823 | 283 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
284 |
15823 | 285 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
286 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
287 if (ops != NULL && ops->notify_searchresults != NULL) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
288 ops->notify_searchresults_new_rows(gc, results, data); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
289 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
290 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
291 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
292 void |
15823 | 293 purple_notify_searchresults_button_add(PurpleNotifySearchResults *results, |
294 PurpleNotifySearchButtonType type, | |
295 PurpleNotifySearchResultsCallback cb) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
296 { |
15823 | 297 PurpleNotifySearchButton *button; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
298 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
299 g_return_if_fail(results != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
300 g_return_if_fail(cb != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
301 |
15823 | 302 button = g_new0(PurpleNotifySearchButton, 1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
303 button->callback = cb; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
304 button->type = type; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
305 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
306 results->buttons = g_list_append(results->buttons, button); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
307 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
308 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
309 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
310 void |
15823 | 311 purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
312 const char *label, |
15823 | 313 PurpleNotifySearchResultsCallback cb) { |
314 PurpleNotifySearchButton *button; | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
315 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
316 g_return_if_fail(results != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
317 g_return_if_fail(cb != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
318 g_return_if_fail(label != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
319 g_return_if_fail(*label != '\0'); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
320 |
15823 | 321 button = g_new0(PurpleNotifySearchButton, 1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
322 button->callback = cb; |
15823 | 323 button->type = PURPLE_NOTIFY_BUTTON_LABELED; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
324 button->label = g_strdup(label); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
325 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
326 results->buttons = g_list_append(results->buttons, button); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
327 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
328 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
329 |
15823 | 330 PurpleNotifySearchResults * |
331 purple_notify_searchresults_new() | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
332 { |
15823 | 333 PurpleNotifySearchResults *rs = g_new0(PurpleNotifySearchResults, 1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
334 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
335 return rs; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
336 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
337 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
338 void |
15823 | 339 purple_notify_searchresults_column_add(PurpleNotifySearchResults *results, |
340 PurpleNotifySearchColumn *column) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
341 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
342 g_return_if_fail(results != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
343 g_return_if_fail(column != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
344 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
345 results->columns = g_list_append(results->columns, column); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
346 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
347 |
15823 | 348 void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
349 GList *row) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
350 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
351 g_return_if_fail(results != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
352 g_return_if_fail(row != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
353 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
354 results->rows = g_list_append(results->rows, row); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
355 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
356 |
15823 | 357 PurpleNotifySearchColumn * |
358 purple_notify_searchresults_column_new(const char *title) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
359 { |
15823 | 360 PurpleNotifySearchColumn *sc; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
361 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
362 g_return_val_if_fail(title != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
363 |
15823 | 364 sc = g_new0(PurpleNotifySearchColumn, 1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
365 sc->title = g_strdup(title); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
366 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
367 return sc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
368 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
369 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
370 guint |
15823 | 371 purple_notify_searchresults_get_columns_count(PurpleNotifySearchResults *results) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
372 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
373 g_return_val_if_fail(results != NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
374 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
375 return g_list_length(results->columns); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
376 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
377 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
378 guint |
15823 | 379 purple_notify_searchresults_get_rows_count(PurpleNotifySearchResults *results) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
380 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
381 g_return_val_if_fail(results != NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
382 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
383 return g_list_length(results->rows); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
384 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
385 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
386 char * |
15823 | 387 purple_notify_searchresults_column_get_title(PurpleNotifySearchResults *results, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
388 unsigned int column_id) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
389 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
390 g_return_val_if_fail(results != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
391 |
15823 | 392 return ((PurpleNotifySearchColumn *)g_list_nth_data(results->columns, column_id))->title; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
393 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
394 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
395 GList * |
15823 | 396 purple_notify_searchresults_row_get(PurpleNotifySearchResults *results, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
397 unsigned int row_id) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
398 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
399 g_return_val_if_fail(results != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
400 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
401 return g_list_nth_data(results->rows, row_id); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
402 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
403 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
404 void * |
15823 | 405 purple_notify_userinfo(PurpleConnection *gc, const char *who, |
406 PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, gpointer user_data) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
407 { |
15823 | 408 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
409 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
410 g_return_val_if_fail(who != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
411 |
15823 | 412 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
413 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
414 if (ops != NULL && ops->notify_userinfo != NULL) { |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
415 void *ui_handle; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
416 |
15823 | 417 purple_signal_emit(purple_notify_get_handle(), "displaying-userinfo", |
418 purple_connection_get_account(gc), who, user_info); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
419 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
420 ui_handle = ops->notify_userinfo(gc, who, user_info); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
421 |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
422 if (ui_handle != NULL) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
423 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
424 PurpleNotifyInfo *info = g_new0(PurpleNotifyInfo, 1); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
425 info->type = PURPLE_NOTIFY_USERINFO; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
426 info->handle = gc; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
427 info->ui_handle = ui_handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
428 info->cb = cb; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
429 info->cb_user_data = user_data; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
430 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
431 handles = g_list_append(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
432 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
433 return info->ui_handle; |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
434 } |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
435 } |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
436 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
437 if (cb != NULL) |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
438 cb(user_data); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
439 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
440 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
441 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
442 |
15823 | 443 PurpleNotifyUserInfoEntry * |
444 purple_notify_user_info_entry_new(const char *label, const char *value) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
445 { |
15823 | 446 PurpleNotifyUserInfoEntry *user_info_entry; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
447 |
15823 | 448 user_info_entry = g_new0(PurpleNotifyUserInfoEntry, 1); |
17079
46351036fdb4
DBusify userinfo stuff.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16606
diff
changeset
|
449 PURPLE_DBUS_REGISTER_POINTER(user_info_entry, PurpleNotifyUserInfoEntry); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
450 user_info_entry->label = g_strdup(label); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
451 user_info_entry->value = g_strdup(value); |
15823 | 452 user_info_entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
453 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
454 return user_info_entry; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
455 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
456 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
457 static void |
15823 | 458 purple_notify_user_info_entry_destroy(PurpleNotifyUserInfoEntry *user_info_entry) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
459 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
460 g_return_if_fail(user_info_entry != NULL); |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
461 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
462 g_free(user_info_entry->label); |
20586
04590d9db8b7
Clear out the mail notifications for an account when we receive a notification of 0 emails.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20074
diff
changeset
|
463 g_free(user_info_entry->value); |
17079
46351036fdb4
DBusify userinfo stuff.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16606
diff
changeset
|
464 PURPLE_DBUS_UNREGISTER_POINTER(user_info_entry); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
465 g_free(user_info_entry); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
466 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
467 |
15823 | 468 PurpleNotifyUserInfo * |
469 purple_notify_user_info_new() | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
470 { |
15823 | 471 PurpleNotifyUserInfo *user_info; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
472 |
15823 | 473 user_info = g_new0(PurpleNotifyUserInfo, 1); |
17079
46351036fdb4
DBusify userinfo stuff.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16606
diff
changeset
|
474 PURPLE_DBUS_REGISTER_POINTER(user_info, PurpleNotifyUserInfo); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
475 user_info->user_info_entries = NULL; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
476 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
477 return user_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
478 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
479 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
480 void |
15823 | 481 purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
482 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
483 GList *l; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
484 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
485 for (l = user_info->user_info_entries; l != NULL; l = l->next) { |
15823 | 486 PurpleNotifyUserInfoEntry *user_info_entry = l->data; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
487 |
15823 | 488 purple_notify_user_info_entry_destroy(user_info_entry); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
489 } |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
490 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
491 g_list_free(user_info->user_info_entries); |
17079
46351036fdb4
DBusify userinfo stuff.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16606
diff
changeset
|
492 PURPLE_DBUS_UNREGISTER_POINTER(user_info); |
16606 | 493 g_free(user_info); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
494 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
495 |
18063
926ccb104da0
disapproval of revision '1411afd7660760db59966c3a9f18e2adab8eb27e'
Richard Laager <rlaager@wiktel.com>
parents:
18058
diff
changeset
|
496 GList * |
15823 | 497 purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
498 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
499 g_return_val_if_fail(user_info != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
500 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
501 return user_info->user_info_entries; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
502 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
503 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
504 char * |
15823 | 505 purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
506 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
507 GList *l; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
508 GString *text; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
509 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
510 text = g_string_new(""); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
511 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
512 for (l = user_info->user_info_entries; l != NULL; l = l->next) { |
15823 | 513 PurpleNotifyUserInfoEntry *user_info_entry = l->data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
514 /* Add a newline before a section header */ |
15823 | 515 if (user_info_entry->type == PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
516 g_string_append(text, newline); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
517 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
518 /* Handle the label/value pair itself */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
519 /* XXX Todo: Use a larger size for a section header? */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
520 if (user_info_entry->label) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
521 g_string_append_printf(text, "<b>%s</b>", user_info_entry->label); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
522 if (user_info_entry->label && user_info_entry->value) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
523 g_string_append(text, ": "); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
524 if (user_info_entry->value) |
20586
04590d9db8b7
Clear out the mail notifications for an account when we receive a notification of 0 emails.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20074
diff
changeset
|
525 g_string_append(text, user_info_entry->value); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
526 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
527 /* Display a section break as a horizontal line */ |
15823 | 528 if (user_info_entry->type == PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
529 g_string_append(text, "<HR>"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
530 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
531 /* Don't insert a new line before or after a section break; <HR> does that for us */ |
15823 | 532 if ((user_info_entry->type != PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK) && |
533 (l->next && ((((PurpleNotifyUserInfoEntry *)(l->next->data))->type != PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK)))) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
534 g_string_append(text, newline); |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
535 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
536 /* Add an extra newline after a section header */ |
15823 | 537 if (user_info_entry->type == PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
538 g_string_append(text, newline); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
539 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
540 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
541 return g_string_free(text, FALSE); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
542 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
543 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
544 |
22605
93c40e412b54
constify the return value from purple_notify_user_info_entry_get_label
Mark Doliner <mark@kingant.net>
parents:
21000
diff
changeset
|
545 const gchar * |
15823 | 546 purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
547 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
548 g_return_val_if_fail(user_info_entry != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
549 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
550 return user_info_entry->label; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
551 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
552 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
553 void |
15823 | 554 purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
555 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
556 g_return_if_fail(user_info_entry != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
557 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
558 g_free(user_info_entry->label); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
559 user_info_entry->label = g_strdup(label); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
560 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
561 |
22605
93c40e412b54
constify the return value from purple_notify_user_info_entry_get_label
Mark Doliner <mark@kingant.net>
parents:
21000
diff
changeset
|
562 const gchar * |
15823 | 563 purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
564 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
565 g_return_val_if_fail(user_info_entry != NULL, NULL); |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
566 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
567 return user_info_entry->value; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
568 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
569 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
570 void |
15823 | 571 purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
572 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
573 g_return_if_fail(user_info_entry != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
574 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
575 g_free(user_info_entry->value); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
576 user_info_entry->value = g_strdup(value); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
577 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
578 |
15823 | 579 PurpleNotifyUserInfoEntryType |
580 purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
581 { |
15823 | 582 g_return_val_if_fail(user_info_entry != NULL, PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
583 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
584 return user_info_entry->type; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
585 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
586 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
587 void |
15823 | 588 purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry, PurpleNotifyUserInfoEntryType type) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
589 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
590 g_return_if_fail(user_info_entry != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
591 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
592 user_info_entry->type = type; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
593 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
594 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
595 void |
15823 | 596 purple_notify_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
597 { |
15823 | 598 PurpleNotifyUserInfoEntry *entry; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
599 |
15823 | 600 entry = purple_notify_user_info_entry_new(label, value); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
601 user_info->user_info_entries = g_list_append(user_info->user_info_entries, entry); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
602 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
603 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
604 void |
31810
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
605 purple_notify_user_info_add_pair_plaintext(PurpleNotifyUserInfo *user_info, const char *label, const char *value) |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
606 { |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
607 gchar *escaped; |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
608 PurpleNotifyUserInfoEntry *entry; |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
609 |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
610 escaped = g_markup_escape_text(value, -1); |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
611 entry = purple_notify_user_info_entry_new(label, escaped); |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
612 g_free(escaped); |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
613 user_info->user_info_entries = g_list_append(user_info->user_info_entries, entry); |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
614 } |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
615 |
0123c69ec0e5
Add a purple_notify_user_info_add_pair_plaintext function that accepts a
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
616 void |
15823 | 617 purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
618 { |
15823 | 619 PurpleNotifyUserInfoEntry *entry; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
620 |
15823 | 621 entry = purple_notify_user_info_entry_new(label, value); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
622 user_info->user_info_entries = g_list_prepend(user_info->user_info_entries, entry); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
623 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
624 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
625 void |
15823 | 626 purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *entry) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
627 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
628 g_return_if_fail(user_info != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
629 g_return_if_fail(entry != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
630 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
631 user_info->user_info_entries = g_list_remove(user_info->user_info_entries, entry); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
632 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
633 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
634 void |
15823 | 635 purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
636 { |
15823 | 637 PurpleNotifyUserInfoEntry *entry; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
638 |
15823 | 639 entry = purple_notify_user_info_entry_new(label, NULL); |
640 entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER; | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
641 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
642 user_info->user_info_entries = g_list_append(user_info->user_info_entries, entry); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
643 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
644 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
645 void |
23207
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
646 purple_notify_user_info_prepend_section_header(PurpleNotifyUserInfo *user_info, const char *label) |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
647 { |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
648 PurpleNotifyUserInfoEntry *entry; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
649 |
23207
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
650 entry = purple_notify_user_info_entry_new(label, NULL); |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
651 entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
652 |
23207
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
653 user_info->user_info_entries = g_list_prepend(user_info->user_info_entries, entry); |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
654 } |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
655 |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
656 void |
15823 | 657 purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
658 { |
15823 | 659 PurpleNotifyUserInfoEntry *entry; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
660 |
15823 | 661 entry = purple_notify_user_info_entry_new(NULL, NULL); |
662 entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK; | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
663 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
664 user_info->user_info_entries = g_list_append(user_info->user_info_entries, entry); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
665 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
666 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
667 void |
23207
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
668 purple_notify_user_info_prepend_section_break(PurpleNotifyUserInfo *user_info) |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
669 { |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
670 PurpleNotifyUserInfoEntry *entry; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
671 |
23207
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
672 entry = purple_notify_user_info_entry_new(NULL, NULL); |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
673 entry->type = PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK; |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24292
diff
changeset
|
674 |
23207
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
675 user_info->user_info_entries = g_list_prepend(user_info->user_info_entries, entry); |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
676 } |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
677 |
84693a70ea3a
Added prepend functions for notify_user_info section headers and breaks
Evan Schoenberg <evan.s@dreskin.net>
parents:
22796
diff
changeset
|
678 void |
15823 | 679 purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
680 { |
20949
dd0878ccc577
Clarify the documentation for purple_notify_user_info_remove_entry() to indicated that it doesn't free the removed entry. Make purple_notify_user_info_remove_last_item() free the entry it is removing as that is the only sensible thing to do (otherwise purple_notify_user_info_remove_entry() should have been used instead). This fixes leakage in the msn prpl.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20586
diff
changeset
|
681 GList *last = g_list_last(user_info->user_info_entries); |
dd0878ccc577
Clarify the documentation for purple_notify_user_info_remove_entry() to indicated that it doesn't free the removed entry. Make purple_notify_user_info_remove_last_item() free the entry it is removing as that is the only sensible thing to do (otherwise purple_notify_user_info_remove_entry() should have been used instead). This fixes leakage in the msn prpl.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20586
diff
changeset
|
682 if (last) { |
dd0878ccc577
Clarify the documentation for purple_notify_user_info_remove_entry() to indicated that it doesn't free the removed entry. Make purple_notify_user_info_remove_last_item() free the entry it is removing as that is the only sensible thing to do (otherwise purple_notify_user_info_remove_entry() should have been used instead). This fixes leakage in the msn prpl.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20586
diff
changeset
|
683 purple_notify_user_info_entry_destroy(last->data); |
20987
0cbfc19e4909
Fix some leaks caused by misuse of g_list_remove_link() instead of g_list_delete_link().
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20949
diff
changeset
|
684 user_info->user_info_entries = g_list_delete_link(user_info->user_info_entries, last); |
20949
dd0878ccc577
Clarify the documentation for purple_notify_user_info_remove_entry() to indicated that it doesn't free the removed entry. Make purple_notify_user_info_remove_last_item() free the entry it is removing as that is the only sensible thing to do (otherwise purple_notify_user_info_remove_entry() should have been used instead). This fixes leakage in the msn prpl.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
20586
diff
changeset
|
685 } |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
686 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
687 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
688 void * |
15823 | 689 purple_notify_uri(void *handle, const char *uri) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
690 { |
15823 | 691 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
692 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
693 g_return_val_if_fail(uri != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
694 |
15823 | 695 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
696 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
697 if (ops != NULL && ops->notify_uri != NULL) { |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
698 |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
699 void *ui_handle = ops->notify_uri(uri); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
700 |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
701 if (ui_handle != NULL) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
702 |
22796
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
703 PurpleNotifyInfo *info = g_new0(PurpleNotifyInfo, 1); |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
704 info->type = PURPLE_NOTIFY_URI; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
705 info->handle = handle; |
5e6b42e77fb7
Cleanup and avoid unnecessary alloc/free.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
22605
diff
changeset
|
706 info->ui_handle = ui_handle; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
707 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
708 handles = g_list_append(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
709 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
710 return info->ui_handle; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
711 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
712 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
713 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
714 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
715 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
716 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
717 void |
15823 | 718 purple_notify_close(PurpleNotifyType type, void *ui_handle) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
719 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
720 GList *l; |
15823 | 721 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
722 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
723 g_return_if_fail(ui_handle != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
724 |
15823 | 725 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
726 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
727 for (l = handles; l != NULL; l = l->next) { |
15823 | 728 PurpleNotifyInfo *info = l->data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
729 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
730 if (info->ui_handle == ui_handle) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
731 handles = g_list_remove(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
732 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
733 if (ops != NULL && ops->close_notify != NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
734 ops->close_notify(info->type, ui_handle); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
735 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
736 if (info->cb != NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
737 info->cb(info->cb_user_data); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
738 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
739 g_free(info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
740 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
741 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
742 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
743 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
744 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
745 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
746 void |
15823 | 747 purple_notify_close_with_handle(void *handle) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
748 { |
17858
c1c533448097
sadrul's fix for the userinfo notify crash on disconnect that was caused by
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17079
diff
changeset
|
749 GList *l, *prev = NULL; |
15823 | 750 PurpleNotifyUiOps *ops; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
751 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
752 g_return_if_fail(handle != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
753 |
15823 | 754 ops = purple_notify_get_ui_ops(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
755 |
17858
c1c533448097
sadrul's fix for the userinfo notify crash on disconnect that was caused by
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17079
diff
changeset
|
756 for (l = handles; l != NULL; l = prev ? prev->next : handles) { |
15823 | 757 PurpleNotifyInfo *info = l->data; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
758 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
759 if (info->handle == handle) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
760 handles = g_list_remove(handles, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
761 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
762 if (ops != NULL && ops->close_notify != NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
763 ops->close_notify(info->type, info->ui_handle); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
764 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
765 if (info->cb != NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
766 info->cb(info->cb_user_data); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
767 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
768 g_free(info); |
17858
c1c533448097
sadrul's fix for the userinfo notify crash on disconnect that was caused by
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17079
diff
changeset
|
769 } else |
c1c533448097
sadrul's fix for the userinfo notify crash on disconnect that was caused by
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17079
diff
changeset
|
770 prev = l; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
771 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
772 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
773 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
774 void |
15823 | 775 purple_notify_set_ui_ops(PurpleNotifyUiOps *ops) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
776 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
777 notify_ui_ops = ops; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
778 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
779 |
15823 | 780 PurpleNotifyUiOps * |
781 purple_notify_get_ui_ops(void) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
782 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
783 return notify_ui_ops; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
784 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
785 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
786 void * |
15823 | 787 purple_notify_get_handle(void) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
788 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
789 static int handle; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
790 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
791 return &handle; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
792 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
793 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
794 void |
15823 | 795 purple_notify_init(void) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
796 { |
15823 | 797 gpointer handle = purple_notify_get_handle(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
798 |
18675
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
799 purple_signal_register(handle, "displaying-email-notification", |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
800 purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER, NULL, 4, |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
801 purple_value_new(PURPLE_TYPE_STRING), |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
802 purple_value_new(PURPLE_TYPE_STRING), |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
803 purple_value_new(PURPLE_TYPE_STRING), |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
804 purple_value_new(PURPLE_TYPE_STRING)); |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
805 |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
806 purple_signal_register(handle, "displaying-emails-notification", |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
807 purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT, NULL, 5, |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
808 purple_value_new(PURPLE_TYPE_POINTER), |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
809 purple_value_new(PURPLE_TYPE_POINTER), |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
810 purple_value_new(PURPLE_TYPE_POINTER), |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
811 purple_value_new(PURPLE_TYPE_POINTER), |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
812 purple_value_new(PURPLE_TYPE_UINT)); |
cb91bb07eeff
Email notification signals from charkins. Fixes #1324
Sean Egan <seanegan@gmail.com>
parents:
18119
diff
changeset
|
813 |
15823 | 814 purple_signal_register(handle, "displaying-userinfo", |
815 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3, | |
816 purple_value_new(PURPLE_TYPE_SUBTYPE, | |
817 PURPLE_SUBTYPE_ACCOUNT), | |
818 purple_value_new(PURPLE_TYPE_STRING), | |
819 purple_value_new(PURPLE_TYPE_SUBTYPE, | |
820 PURPLE_SUBTYPE_USERINFO)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
821 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
822 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
823 void |
15823 | 824 purple_notify_uninit(void) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
825 { |
15823 | 826 purple_signals_unregister_by_instance(purple_notify_get_handle()); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
827 } |