Tue, 06 May 2014 18:27:58 +0200
Merge release-2.x.y
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
1 | /* |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
2 | * Purple's oscar protocol plugin |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
3 | * This file is the legal property of its developers. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
4 | * Please see the AUTHORS file distributed alongside this file. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
5 | * |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
6 | * This library is free software; you can redistribute it and/or |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
7 | * modify it under the terms of the GNU Lesser General Public |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
8 | * License as published by the Free Software Foundation; either |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
9 | * version 2 of the License, or (at your option) any later version. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
10 | * |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
11 | * This library is distributed in the hope that it will be useful, |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
14 | * Lesser General Public License for more details. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
15 | * |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
16 | * You should have received a copy of the GNU Lesser General Public |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
17 | * License along with this library; if not, write to the Free Software |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
19 | */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
20 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
21 | /* |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
22 | * Displaying various information about buddies. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
23 | */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
24 | |
|
30656
846b66ef678b
Moved encoding-related functions to a separate file, renamed some of them,
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30639
diff
changeset
|
25 | #include "encoding.h" |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
26 | #include "oscar.h" |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
27 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
28 | static gchar * |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
29 | oscar_caps_to_string(guint64 caps) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
30 | { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
31 | GString *str; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
32 | const gchar *tmp; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
33 | guint64 bit = 1; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
34 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
35 | str = g_string_new(""); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
36 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
37 | if (!caps) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
38 | return NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
39 | } else while (bit <= OSCAR_CAPABILITY_LAST) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
40 | if (bit & caps) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
41 | switch (bit) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
42 | case OSCAR_CAPABILITY_BUDDYICON: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
43 | tmp = _("Buddy Icon"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
44 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
45 | case OSCAR_CAPABILITY_TALK: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
46 | tmp = _("Voice"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
47 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
48 | case OSCAR_CAPABILITY_DIRECTIM: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
49 | tmp = _("AIM Direct IM"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
50 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
51 | case OSCAR_CAPABILITY_CHAT: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
52 | tmp = _("Chat"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
53 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
54 | case OSCAR_CAPABILITY_GETFILE: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
55 | tmp = _("Get File"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
56 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
57 | case OSCAR_CAPABILITY_SENDFILE: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
58 | tmp = _("Send File"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
59 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
60 | case OSCAR_CAPABILITY_GAMES: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
61 | case OSCAR_CAPABILITY_GAMES2: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
62 | tmp = _("Games"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
63 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
64 | case OSCAR_CAPABILITY_XTRAZ: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
65 | case OSCAR_CAPABILITY_NEWCAPS: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
66 | tmp = _("ICQ Xtraz"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
67 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
68 | case OSCAR_CAPABILITY_ADDINS: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
69 | tmp = _("Add-Ins"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
70 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
71 | case OSCAR_CAPABILITY_SENDBUDDYLIST: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
72 | tmp = _("Send Buddy List"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
73 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
74 | case OSCAR_CAPABILITY_ICQ_DIRECT: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
75 | tmp = _("ICQ Direct Connect"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
76 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
77 | case OSCAR_CAPABILITY_APINFO: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
78 | tmp = _("AP User"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
79 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
80 | case OSCAR_CAPABILITY_ICQRTF: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
81 | tmp = _("ICQ RTF"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
82 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
83 | case OSCAR_CAPABILITY_EMPTY: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
84 | tmp = _("Nihilist"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
85 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
86 | case OSCAR_CAPABILITY_ICQSERVERRELAY: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
87 | tmp = _("ICQ Server Relay"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
88 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
89 | case OSCAR_CAPABILITY_UNICODEOLD: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
90 | tmp = _("Old ICQ UTF8"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
91 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
92 | case OSCAR_CAPABILITY_TRILLIANCRYPT: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
93 | tmp = _("Trillian Encryption"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
94 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
95 | case OSCAR_CAPABILITY_UNICODE: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
96 | tmp = _("ICQ UTF8"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
97 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
98 | case OSCAR_CAPABILITY_HIPTOP: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
99 | tmp = _("Hiptop"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
100 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
101 | case OSCAR_CAPABILITY_SECUREIM: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
102 | tmp = _("Security Enabled"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
103 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
104 | case OSCAR_CAPABILITY_VIDEO: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
105 | tmp = _("Video Chat"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
106 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
107 | /* Not actually sure about this one... WinAIM doesn't show anything */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
108 | case OSCAR_CAPABILITY_ICHATAV: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
109 | tmp = _("iChat AV"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
110 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
111 | case OSCAR_CAPABILITY_LIVEVIDEO: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
112 | tmp = _("Live Video"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
113 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
114 | case OSCAR_CAPABILITY_CAMERA: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
115 | tmp = _("Camera"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
116 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
117 | case OSCAR_CAPABILITY_ICHAT_SCREENSHARE: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
118 | tmp = _("Screen Sharing"); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
119 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
120 | default: |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
121 | tmp = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
122 | break; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
123 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
124 | if (tmp) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
125 | g_string_append_printf(str, "%s%s", (*(str->str) == '\0' ? "" : ", "), tmp); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
126 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
127 | bit <<= 1; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
128 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
129 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
130 | return g_string_free(str, FALSE); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
131 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
132 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
133 | static void |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
134 | oscar_user_info_convert_and_add(PurpleAccount *account, OscarData *od, PurpleNotifyUserInfo *user_info, |
|
30679
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
135 | const char *name, const char *value) |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
136 | { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
137 | gchar *utf8; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
138 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
139 | if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, od, value))) { |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
140 | /* TODO: Check whether it's correct to call add_pair_html, |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
141 | or if we should be using add_pair_plaintext. Will |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
142 | need to check callers of this function. */ |
|
32191
a4668d9dc8d1
Rename purple_notify_user_info_add_pair to
Mark Doliner <markdoliner@pidgin.im>
parents:
32188
diff
changeset
|
143 | purple_notify_user_info_add_pair_html(user_info, name, utf8); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
144 | g_free(utf8); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
145 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
146 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
147 | |
|
30679
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
148 | static void |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
149 | oscar_user_info_convert_and_add_hyperlink(PurpleAccount *account, OscarData *od, PurpleNotifyUserInfo *user_info, |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
150 | const char *name, const char *value, const char *url_prefix) |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
151 | { |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
152 | gchar *utf8; |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
153 | |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
154 | if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, od, value))) { |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
155 | gchar *tmp = g_strdup_printf("<a href=\"%s%s\">%s</a>", url_prefix, utf8, utf8); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
156 | /* TODO: Check whether it's correct to call add_pair_html, |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
157 | or if we should be using add_pair_plaintext. Will |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
158 | need to check callers of this function. */ |
|
32191
a4668d9dc8d1
Rename purple_notify_user_info_add_pair to
Mark Doliner <markdoliner@pidgin.im>
parents:
32188
diff
changeset
|
159 | purple_notify_user_info_add_pair_html(user_info, name, tmp); |
|
30679
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
160 | g_free(utf8); |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
161 | g_free(tmp); |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
162 | } |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
163 | } |
|
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
164 | |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
165 | /** |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
166 | * @brief Append the status information to a user_info struct |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
167 | * |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
168 | * The returned information is HTML-ready, appropriately escaped, as all information in a user_info struct should be HTML. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
169 | * |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
170 | * @param gc The PurpleConnection |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
171 | * @param user_info A PurpleNotifyUserInfo object to which status information will be added |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
172 | * @param b The PurpleBuddy whose status is desired. This or the aim_userinfo_t (or both) must be passed to oscar_user_info_append_status(). |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
173 | * @param userinfo The aim_userinfo_t of the buddy whose status is desired. This or the PurpleBuddy (or both) must be passed to oscar_user_info_append_status(). |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
174 | * @param use_html_status If TRUE, prefer HTML-formatted away message over plaintext available message. |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
175 | */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
176 | void |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
177 | oscar_user_info_append_status(PurpleConnection *gc, PurpleNotifyUserInfo *user_info, PurpleBuddy *b, aim_userinfo_t *userinfo, gboolean use_html_status) |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
178 | { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
179 | PurpleAccount *account = purple_connection_get_account(gc); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
180 | OscarData *od; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
181 | PurplePresence *presence = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
182 | PurpleStatus *status = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
183 | gchar *message = NULL, *itmsurl = NULL, *tmp; |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
184 | gboolean escaping_needed = TRUE; |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
185 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
186 | od = purple_connection_get_protocol_data(gc); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
187 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
188 | if (b == NULL && userinfo == NULL) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
189 | return; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
190 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
191 | if (b == NULL) |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34631
diff
changeset
|
192 | b = purple_blist_find_buddy(purple_connection_get_account(gc), userinfo->bn); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
193 | else |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
194 | userinfo = aim_locate_finduserinfo(od, purple_buddy_get_name(b)); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
195 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
196 | if (b) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
197 | presence = purple_buddy_get_presence(b); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
198 | status = purple_presence_get_active_status(presence); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
199 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
200 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
201 | /* If we have both b and userinfo we favor userinfo, because if we're |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
202 | viewing someone's profile then we want the HTML away message, and |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
203 | the "message" attribute of the status contains only the plaintext |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
204 | message. */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
205 | if (userinfo) { |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
206 | if ((userinfo->flags & AIM_FLAG_AWAY) && use_html_status && userinfo->away_len > 0 && userinfo->away != NULL && userinfo->away_encoding != NULL) { |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
207 | /* Away message */ |
|
30661
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
208 | message = oscar_encoding_to_utf8(userinfo->away_encoding, userinfo->away, userinfo->away_len); |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
209 | escaping_needed = FALSE; |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
210 | } else { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
211 | /* |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
212 | * Available message or non-HTML away message (because that's |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
213 | * all we have right now. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
214 | */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
215 | if ((userinfo->status != NULL) && userinfo->status[0] != '\0') { |
|
30661
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
216 | message = oscar_encoding_to_utf8(userinfo->status_encoding, userinfo->status, userinfo->status_len); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
217 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
218 | #if defined (_WIN32) || defined (__APPLE__) |
|
30661
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
219 | if (userinfo->itmsurl && (userinfo->itmsurl[0] != '\0')) { |
|
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
220 | itmsurl = oscar_encoding_to_utf8(userinfo->itmsurl_encoding, userinfo->itmsurl, userinfo->itmsurl_len); |
|
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
221 | } |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
222 | #endif |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
223 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
224 | } else { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
225 | message = g_strdup(purple_status_get_attr_string(status, "message")); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
226 | itmsurl = g_strdup(purple_status_get_attr_string(status, "itmsurl")); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
227 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
228 | |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
229 | if (message) { |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
230 | tmp = oscar_util_format_string(message, purple_account_get_username(account)); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
231 | g_free(message); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
232 | message = tmp; |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
233 | if (escaping_needed) { |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
234 | tmp = purple_markup_escape_text(message, -1); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
235 | g_free(message); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
236 | message = tmp; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
237 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
238 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
239 | |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
240 | if (use_html_status && itmsurl) { |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
241 | tmp = g_strdup_printf("<a href=\"%s\">%s</a>", itmsurl, message); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
242 | g_free(message); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
243 | message = tmp; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
244 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
245 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
246 | if (b) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
247 | if (purple_presence_is_online(presence)) { |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
248 | gboolean is_away = ((status && !purple_status_is_available(status)) || (userinfo && (userinfo->flags & AIM_FLAG_AWAY))); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
249 | if (oscar_util_valid_name_icq(purple_buddy_get_name(b)) || is_away || !message || !(*message)) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
250 | /* Append the status name for online ICQ statuses, away AIM statuses, and for all buddies with no message. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
251 | * If the status name and the message are the same, only show one. */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
252 | const char *status_name = purple_status_get_name(status); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
253 | if (status_name && message && !strcmp(status_name, message)) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
254 | status_name = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
255 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
256 | tmp = g_strdup_printf("%s%s%s", |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
257 | status_name ? status_name : "", |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
258 | ((status_name && message) && *message) ? ": " : "", |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
259 | (message && *message) ? message : ""); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
260 | g_free(message); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
261 | message = tmp; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
262 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
263 | |
|
31592
2b3dd7cca164
Add two hash tables to the oscar code that deals with your server stored
Mark Doliner <markdoliner@pidgin.im>
parents:
30889
diff
changeset
|
264 | } else if (aim_ssi_waitingforauth(&od->ssi.local, |
|
2b3dd7cca164
Add two hash tables to the oscar code that deals with your server stored
Mark Doliner <markdoliner@pidgin.im>
parents:
30889
diff
changeset
|
265 | aim_ssi_itemlist_findparentname(&od->ssi.local, purple_buddy_get_name(b)), |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
266 | purple_buddy_get_name(b))) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
267 | { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
268 | /* Note if an offline buddy is not authorized */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
269 | tmp = g_strdup_printf("%s%s%s", |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
270 | _("Not Authorized"), |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
271 | (message && *message) ? ": " : "", |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
272 | (message && *message) ? message : ""); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
273 | g_free(message); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
274 | message = tmp; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
275 | } else { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
276 | g_free(message); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
277 | message = g_strdup(_("Offline")); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
278 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
279 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
280 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
281 | if (presence) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
282 | const char *mood; |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
283 | const char *comment; |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
284 | char *description; |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
285 | status = purple_presence_get_status(presence, "mood"); |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
286 | mood = icq_get_custom_icon_description(purple_status_get_attr_string(status, PURPLE_MOOD_NAME)); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
287 | if (mood) { |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
288 | comment = purple_status_get_attr_string(status, PURPLE_MOOD_COMMENT); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
289 | if (comment) { |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
290 | char *escaped_comment = purple_markup_escape_text(comment, -1); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
291 | description = g_strdup_printf("%s (%s)", _(mood), escaped_comment); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
292 | g_free(escaped_comment); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
293 | } else { |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
294 | description = g_strdup(_(mood)); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
295 | } |
|
32191
a4668d9dc8d1
Rename purple_notify_user_info_add_pair to
Mark Doliner <markdoliner@pidgin.im>
parents:
32188
diff
changeset
|
296 | purple_notify_user_info_add_pair_html(user_info, _("Mood"), description); |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
297 | g_free(description); |
|
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
298 | } |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
299 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
300 | |
|
32191
a4668d9dc8d1
Rename purple_notify_user_info_add_pair to
Mark Doliner <markdoliner@pidgin.im>
parents:
32188
diff
changeset
|
301 | purple_notify_user_info_add_pair_html(user_info, _("Status"), message); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
302 | g_free(message); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
303 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
304 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
305 | void |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
306 | oscar_user_info_append_extra_info(PurpleConnection *gc, PurpleNotifyUserInfo *user_info, PurpleBuddy *b, aim_userinfo_t *userinfo) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
307 | { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
308 | OscarData *od; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
309 | PurpleAccount *account; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
310 | PurpleGroup *g = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
311 | struct buddyinfo *bi = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
312 | char *tmp; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
313 | const char *bname = NULL, *gname = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
314 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
315 | od = purple_connection_get_protocol_data(gc); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
316 | account = purple_connection_get_account(gc); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
317 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
318 | if ((user_info == NULL) || ((b == NULL) && (userinfo == NULL))) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
319 | return; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
320 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
321 | if (userinfo == NULL) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
322 | userinfo = aim_locate_finduserinfo(od, purple_buddy_get_name(b)); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
323 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
324 | if (b == NULL) |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34631
diff
changeset
|
325 | b = purple_blist_find_buddy(account, userinfo->bn); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
326 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
327 | if (b != NULL) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
328 | bname = purple_buddy_get_name(b); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
329 | g = purple_buddy_get_group(b); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
330 | gname = purple_group_get_name(g); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
331 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
332 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
333 | if (userinfo != NULL) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
334 | bi = g_hash_table_lookup(od->buddyinfo, purple_normalize(account, userinfo->bn)); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
335 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
336 | if ((bi != NULL) && (bi->ipaddr != 0)) { |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
337 | char tmp2[40]; |
|
34457
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
338 | sprintf(tmp2, "%u.%u.%u.%u", |
|
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
339 | 0xFF & ((bi->ipaddr & 0xff000000) >> 24), |
|
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
340 | 0xFF & ((bi->ipaddr & 0x00ff0000) >> 16), |
|
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
341 | 0xFF & ((bi->ipaddr & 0x0000ff00) >> 8), |
|
35977
9b7b48f446f4
Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33806
diff
changeset
|
342 | 0xFF & (bi->ipaddr & 0x000000ff)); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
343 | purple_notify_user_info_add_pair_plaintext(user_info, _("IP Address"), tmp2); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
344 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
345 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
346 | if ((userinfo != NULL) && (userinfo->warnlevel != 0)) { |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
347 | char tmp2[12]; |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
348 | sprintf(tmp2, "%d", (int)(userinfo->warnlevel/10.0 + .5)); |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
349 | purple_notify_user_info_add_pair_plaintext(user_info, _("Warning Level"), tmp2); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
350 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
351 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
352 | if ((b != NULL) && (bname != NULL) && (g != NULL) && (gname != NULL)) { |
|
31592
2b3dd7cca164
Add two hash tables to the oscar code that deals with your server stored
Mark Doliner <markdoliner@pidgin.im>
parents:
30889
diff
changeset
|
353 | tmp = aim_ssi_getcomment(&od->ssi.local, gname, bname); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
354 | if (tmp != NULL) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
355 | char *tmp2 = g_markup_escape_text(tmp, strlen(tmp)); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
356 | g_free(tmp); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
357 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
358 | oscar_user_info_convert_and_add(account, od, user_info, _("Buddy Comment"), tmp2); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
359 | g_free(tmp2); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
360 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
361 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
362 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
363 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
364 | void |
|
30639
a82ebc3a5c3d
Added an error handler for family_icq.c. So far it works for
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30638
diff
changeset
|
365 | oscar_user_info_display_error(OscarData *od, guint16 error_reason, gchar *buddy) |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
366 | { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
367 | PurpleNotifyUserInfo *user_info = purple_notify_user_info_new(); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
368 | gchar *buf = g_strdup_printf(_("User information not available: %s"), oscar_get_msgerr_reason(error_reason)); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
369 | purple_notify_user_info_add_pair_plaintext(user_info, NULL, buf); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
370 | purple_notify_userinfo(od->gc, buddy, user_info, NULL, NULL); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
371 | purple_notify_user_info_destroy(user_info); |
|
34868
faa5b053f310
Replaced purple_conversation_helper_present_error() with simpler purple_conversation_present_error()
Ankit Vani <a@nevitus.org>
parents:
34728
diff
changeset
|
372 | purple_conversation_present_error(buddy, purple_connection_get_account(od->gc), buf); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
373 | g_free(buf); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
374 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
375 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
376 | void |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
377 | oscar_user_info_display_icq(OscarData *od, struct aim_icq_info *info) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
378 | { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
379 | PurpleConnection *gc = od->gc; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
380 | PurpleAccount *account = purple_connection_get_account(gc); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
381 | PurpleBuddy *buddy; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
382 | struct buddyinfo *bi; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
383 | gchar who[16]; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
384 | PurpleNotifyUserInfo *user_info; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
385 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
386 | if (!info->uin) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
387 | return; |
|
30639
a82ebc3a5c3d
Added an error handler for family_icq.c. So far it works for
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30638
diff
changeset
|
388 | |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
389 | user_info = purple_notify_user_info_new(); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
390 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
391 | g_snprintf(who, sizeof(who), "%u", info->uin); |
|
34728
8efd73063ecf
Renamed buddy list functions to more appropriate/simler names.
Ankit Vani <a@nevitus.org>
parents:
34631
diff
changeset
|
392 | buddy = purple_blist_find_buddy(account, who); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
393 | if (buddy != NULL) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
394 | bi = g_hash_table_lookup(od->buddyinfo, purple_normalize(account, purple_buddy_get_name(buddy))); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
395 | else |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
396 | bi = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
397 | |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
398 | purple_notify_user_info_add_pair_plaintext(user_info, _("UIN"), who); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
399 | oscar_user_info_convert_and_add(account, od, user_info, _("Nick"), info->nick); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
400 | if ((bi != NULL) && (bi->ipaddr != 0)) { |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
401 | char tstr[40]; |
|
34457
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
402 | sprintf(tstr, "%u.%u.%u.%u", |
|
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
403 | 0xFF & ((bi->ipaddr & 0xff000000) >> 24), |
|
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
404 | 0xFF & ((bi->ipaddr & 0x00ff0000) >> 16), |
|
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
405 | 0xFF & ((bi->ipaddr & 0x0000ff00) >> 8), |
|
a9d3726c3a8f
Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33811
diff
changeset
|
406 | 0xFF & ((bi->ipaddr & 0x000000ff))); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
407 | purple_notify_user_info_add_pair_plaintext(user_info, _("IP Address"), tstr); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
408 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
409 | oscar_user_info_convert_and_add(account, od, user_info, _("First Name"), info->first); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
410 | oscar_user_info_convert_and_add(account, od, user_info, _("Last Name"), info->last); |
|
30679
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
411 | oscar_user_info_convert_and_add_hyperlink(account, od, user_info, _("Email Address"), info->email, "mailto:"); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
412 | if (info->numaddresses && info->email2) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
413 | int i; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
414 | for (i = 0; i < info->numaddresses; i++) { |
|
30679
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
415 | oscar_user_info_convert_and_add_hyperlink(account, od, user_info, _("Email Address"), info->email2[i], "mailto:"); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
416 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
417 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
418 | oscar_user_info_convert_and_add(account, od, user_info, _("Mobile Phone"), info->mobile); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
419 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
420 | if (info->gender != 0) |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
421 | purple_notify_user_info_add_pair_plaintext(user_info, _("Gender"), (info->gender == 1 ? _("Female") : _("Male"))); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
422 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
423 | if ((info->birthyear > 1900) && (info->birthmonth > 0) && (info->birthday > 0)) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
424 | /* Initialize the struct properly or strftime() will crash |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
425 | * under some conditions (e.g. Debian sarge w/ LANG=en_HK). */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
426 | time_t t = time(NULL); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
427 | struct tm *tm = localtime(&t); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
428 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
429 | tm->tm_mday = (int)info->birthday; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
430 | tm->tm_mon = (int)info->birthmonth - 1; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
431 | tm->tm_year = (int)info->birthyear - 1900; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
432 | |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
433 | /* Ignore dst setting of today to avoid timezone shift between |
|
31614
6ae42ef3fd93
Ignore DST when calculating birthdays. This prevents an off-by-one-day
Dustin Gathmann <dzlists@arcor.de>
parents:
30889
diff
changeset
|
434 | * dates in summer and winter time. */ |
|
6ae42ef3fd93
Ignore DST when calculating birthdays. This prevents an off-by-one-day
Dustin Gathmann <dzlists@arcor.de>
parents:
30889
diff
changeset
|
435 | tm->tm_isdst = -1; |
|
6ae42ef3fd93
Ignore DST when calculating birthdays. This prevents an off-by-one-day
Dustin Gathmann <dzlists@arcor.de>
parents:
30889
diff
changeset
|
436 | |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
437 | /* To be 100% sure that the fields are re-normalized. |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
438 | * If you're sure strftime() ALWAYS does this EVERYWHERE, |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
439 | * feel free to remove it. --rlaager */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
440 | mktime(tm); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
441 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
442 | oscar_user_info_convert_and_add(account, od, user_info, _("Birthday"), purple_date_format_short(tm)); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
443 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
444 | if ((info->age > 0) && (info->age < 255)) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
445 | char age[5]; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
446 | snprintf(age, sizeof(age), "%hhd", info->age); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
447 | purple_notify_user_info_add_pair_plaintext(user_info, _("Age"), age); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
448 | } |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
449 | /* TODO: Is it correct to pass info->email here...? */ |
|
30679
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
450 | oscar_user_info_convert_and_add_hyperlink(account, od, user_info, _("Personal Web Page"), info->email, ""); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
451 | if (buddy != NULL) |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
452 | oscar_user_info_append_status(gc, user_info, buddy, /* aim_userinfo_t */ NULL, /* use_html_status */ TRUE); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
453 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
454 | oscar_user_info_convert_and_add(account, od, user_info, _("Additional Information"), info->info); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
455 | purple_notify_user_info_add_section_break(user_info); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
456 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
457 | if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
458 | purple_notify_user_info_add_section_header(user_info, _("Home Address")); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
459 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
460 | oscar_user_info_convert_and_add(account, od, user_info, _("Address"), info->homeaddr); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
461 | oscar_user_info_convert_and_add(account, od, user_info, _("City"), info->homecity); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
462 | oscar_user_info_convert_and_add(account, od, user_info, _("State"), info->homestate); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
463 | oscar_user_info_convert_and_add(account, od, user_info, _("Zip Code"), info->homezip); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
464 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
465 | if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
466 | purple_notify_user_info_add_section_header(user_info, _("Work Address")); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
467 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
468 | oscar_user_info_convert_and_add(account, od, user_info, _("Address"), info->workaddr); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
469 | oscar_user_info_convert_and_add(account, od, user_info, _("City"), info->workcity); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
470 | oscar_user_info_convert_and_add(account, od, user_info, _("State"), info->workstate); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
471 | oscar_user_info_convert_and_add(account, od, user_info, _("Zip Code"), info->workzip); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
472 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
473 | if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
474 | purple_notify_user_info_add_section_header(user_info, _("Work Information")); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
475 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
476 | oscar_user_info_convert_and_add(account, od, user_info, _("Company"), info->workcompany); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
477 | oscar_user_info_convert_and_add(account, od, user_info, _("Division"), info->workdivision); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
478 | oscar_user_info_convert_and_add(account, od, user_info, _("Position"), info->workposition); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
479 | /* TODO: Is it correct to pass info->email here...? */ |
|
30679
8e1fb05214d2
A couple of refactorings related to oscar_utf8_try_convert().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30661
diff
changeset
|
480 | oscar_user_info_convert_and_add_hyperlink(account, od, user_info, _("Web Page"), info->email, ""); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
481 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
482 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
483 | purple_notify_userinfo(gc, who, user_info, NULL, NULL); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
484 | purple_notify_user_info_destroy(user_info); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
485 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
486 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
487 | void |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
488 | oscar_user_info_display_aim(OscarData *od, aim_userinfo_t *userinfo) |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
489 | { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
490 | PurpleConnection *gc = od->gc; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
491 | PurpleAccount *account = purple_connection_get_account(gc); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
492 | PurpleNotifyUserInfo *user_info = purple_notify_user_info_new(); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
493 | gchar *tmp = NULL, *info_utf8 = NULL, *base_profile_url = NULL; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
494 | |
|
30889
905eecac1f06
Merged my changes that fix #11964 and #12593. Mark looked over them
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30679
diff
changeset
|
495 | oscar_user_info_append_status(gc, user_info, /* PurpleBuddy */ NULL, userinfo, /* use_html_status */ TRUE); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
496 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
497 | if ((userinfo->present & AIM_USERINFO_PRESENT_IDLE) && userinfo->idletime != 0) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
498 | tmp = purple_str_seconds_to_string(userinfo->idletime*60); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
499 | purple_notify_user_info_add_pair_plaintext(user_info, _("Idle"), tmp); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
500 | g_free(tmp); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
501 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
502 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
503 | oscar_user_info_append_extra_info(gc, user_info, NULL, userinfo); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
504 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
505 | if ((userinfo->present & AIM_USERINFO_PRESENT_ONLINESINCE) && !oscar_util_valid_name_sms(userinfo->bn)) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
506 | /* An SMS contact is always online; its Online Since value is not useful */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
507 | time_t t = userinfo->onlinesince; |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
508 | purple_notify_user_info_add_pair_plaintext(user_info, _("Online Since"), purple_date_format_full(localtime(&t))); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
509 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
510 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
511 | if (userinfo->present & AIM_USERINFO_PRESENT_MEMBERSINCE) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
512 | time_t t = userinfo->membersince; |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
513 | purple_notify_user_info_add_pair_plaintext(user_info, _("Member Since"), purple_date_format_full(localtime(&t))); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
514 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
515 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
516 | if (userinfo->capabilities != 0) { |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
517 | tmp = oscar_caps_to_string(userinfo->capabilities); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
518 | if (tmp && *tmp) |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
519 | purple_notify_user_info_add_pair_plaintext(user_info, _("Capabilities"), tmp); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
520 | g_free(tmp); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
521 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
522 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
523 | /* Info */ |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
524 | if ((userinfo->info_len > 0) && (userinfo->info != NULL) && (userinfo->info_encoding != NULL)) { |
|
30661
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
525 | info_utf8 = oscar_encoding_to_utf8(userinfo->info_encoding, userinfo->info, userinfo->info_len); |
|
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
526 | tmp = oscar_util_format_string(info_utf8, purple_account_get_username(account)); |
|
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
527 | purple_notify_user_info_add_section_break(user_info); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
528 | if (tmp && *tmp) { |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
529 | /* TODO: Check whether it's correct to call add_pair_html, |
|
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
530 | or if we should be using add_pair_plaintext */ |
|
32191
a4668d9dc8d1
Rename purple_notify_user_info_add_pair to
Mark Doliner <markdoliner@pidgin.im>
parents:
32188
diff
changeset
|
531 | purple_notify_user_info_add_pair_html(user_info, _("Profile"), tmp); |
|
32188
cb9cad610bc6
I went through all our calls to purple_notify_user_info_add_pair() and
Mark Doliner <markdoliner@pidgin.im>
parents:
31689
diff
changeset
|
532 | } |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
533 | g_free(tmp); |
|
30661
b33b4612a753
Refactored oscar_encoding_to_utf8().
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
30656
diff
changeset
|
534 | g_free(info_utf8); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
535 | } |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
536 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
537 | purple_notify_user_info_add_section_break(user_info); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
538 | base_profile_url = oscar_util_valid_name_icq(userinfo->bn) ? "http://www.icq.com/people" : "http://profiles.aim.com"; |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
539 | tmp = g_strdup_printf("<a href=\"%s/%s\">%s</a>", |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
540 | base_profile_url, purple_normalize(account, userinfo->bn), _("View web profile")); |
|
32191
a4668d9dc8d1
Rename purple_notify_user_info_add_pair to
Mark Doliner <markdoliner@pidgin.im>
parents:
32188
diff
changeset
|
541 | purple_notify_user_info_add_pair_html(user_info, NULL, tmp); |
|
30638
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
542 | g_free(tmp); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
543 | |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
544 | purple_notify_userinfo(gc, userinfo->bn, user_info, NULL, NULL); |
|
2f1952f26351
Got rid of family_icq.c -> oscar.c callbacks. Now it will be possible
Ivan Komarov <ivan.komarov@pidgin.im>
parents:
diff
changeset
|
545 | purple_notify_user_info_destroy(user_info); |
|
33782
1690e0b2c508
Fix a bunch of unused variables
Daniel Atallah <datallah@pidgin.im>
parents:
31614
diff
changeset
|
546 | } |