libpurple/protocols/myspace/user.c

changeset 32162
cf848cd25330
parent 32157
39ba2e2492ee
child 32188
cb9cad610bc6
equal deleted inserted replaced
32161:7a995ee6298a 32162:cf848cd25330
115 guint cv; 115 guint cv;
116 116
117 /* Useful to identify the account the tooltip refers to. 117 /* Useful to identify the account the tooltip refers to.
118 * Other prpls show this. */ 118 * Other prpls show this. */
119 if (user->username) { 119 if (user->username) {
120 purple_notify_user_info_add_pair(user_info, _("User"), user->username); 120 purple_notify_user_info_add_pair_plaintext(user_info, _("User"), user->username);
121 } 121 }
122 122
123 /* a/s/l...the vitals */ 123 /* a/s/l...the vitals */
124 if (user->age) { 124 if (user->age) {
125 char age[16]; 125 char age[16];
126 g_snprintf(age, sizeof(age), "%d", user->age); 126 g_snprintf(age, sizeof(age), "%d", user->age);
127 purple_notify_user_info_add_pair(user_info, _("Age"), age); 127 purple_notify_user_info_add_pair_plaintext(user_info, _("Age"), age);
128 } 128 }
129 129
130 if (user->gender && *user->gender) { 130 if (user->gender && *user->gender) {
131 purple_notify_user_info_add_pair(user_info, _("Gender"), user->gender); 131 purple_notify_user_info_add_pair_plaintext(user_info, _("Gender"), user->gender);
132 } 132 }
133 133
134 if (user->location && *user->location) { 134 if (user->location && *user->location) {
135 purple_notify_user_info_add_pair(user_info, _("Location"), user->location); 135 purple_notify_user_info_add_pair_plaintext(user_info, _("Location"), user->location);
136 } 136 }
137 137
138 /* Other information */ 138 /* Other information */
139 if (user->headline && *user->headline) { 139 if (user->headline && *user->headline) {
140 purple_notify_user_info_add_pair(user_info, _("Headline"), user->headline); 140 purple_notify_user_info_add_pair_plaintext(user_info, _("Headline"), user->headline);
141 } 141 }
142 142
143 if (user->buddy != NULL) { 143 if (user->buddy != NULL) {
144 presence = purple_buddy_get_presence(user->buddy); 144 presence = purple_buddy_get_presence(user->buddy);
145 145
151 title = purple_status_get_attr_string(status, PURPLE_TUNE_TITLE); 151 title = purple_status_get_attr_string(status, PURPLE_TUNE_TITLE);
152 artist = purple_status_get_attr_string(status, PURPLE_TUNE_ARTIST); 152 artist = purple_status_get_attr_string(status, PURPLE_TUNE_ARTIST);
153 153
154 str = msim_format_now_playing(artist, title); 154 str = msim_format_now_playing(artist, title);
155 if (str && *str) { 155 if (str && *str) {
156 purple_notify_user_info_add_pair(user_info, _("Song"), str); 156 purple_notify_user_info_add_pair_plaintext(user_info, _("Song"), str);
157 } 157 }
158 g_free(str); 158 g_free(str);
159 } 159 }
160 } 160 }
161 161
162 /* Note: total friends only available if looked up by uid, not username. */ 162 /* Note: total friends only available if looked up by uid, not username. */
163 if (user->total_friends) { 163 if (user->total_friends) {
164 char friends[16]; 164 char friends[16];
165 g_snprintf(friends, sizeof(friends), "%d", user->total_friends); 165 g_snprintf(friends, sizeof(friends), "%d", user->total_friends);
166 purple_notify_user_info_add_pair(user_info, _("Total Friends"), friends); 166 purple_notify_user_info_add_pair_plaintext(user_info, _("Total Friends"), friends);
167 } 167 }
168 168
169 if (full) { 169 if (full) {
170 /* Client information */ 170 /* Client information */
171 char *client = NULL; 171 char *client = NULL;
179 client = g_strdup(str); 179 client = g_strdup(str);
180 } else if (cv) { 180 } else if (cv) {
181 client = g_strdup_printf("Build %d", cv); 181 client = g_strdup_printf("Build %d", cv);
182 } 182 }
183 if (client && *client) 183 if (client && *client)
184 purple_notify_user_info_add_pair(user_info, _("Client Version"), client); 184 purple_notify_user_info_add_pair_plaintext(user_info, _("Client Version"), client);
185 g_free(client); 185 g_free(client);
186 } 186 }
187 187
188 if (full && user->id) { 188 if (full && user->id) {
189 /* TODO: link to username, if available */ 189 /* TODO: link to username, if available */

mercurial