comparison libpurple/protocols/msn/msn.c @ 24667:9fc3f5bf4455

Make our profile text a little cleaner and more uniform across the protocols. They all have a "View web profile" link at the bottom that opens the user's profile in a browser. I'm open to suggestions on the wording. I also wasn't sure if it was better for the link to be at the bottom of the profile or the top.
author Mark Doliner <mark@kingant.net>
date Tue, 09 Dec 2008 02:59:29 +0000
parents 82452077f0db
children fdd9fd5c2086
comparison
equal deleted inserted replaced
24666:641fe4c2b2a5 24667:9fc3f5bf4455
1809 } 1809 }
1810 1810
1811 if (b->server_alias) 1811 if (b->server_alias)
1812 { 1812 {
1813 char *nicktext = g_markup_escape_text(b->server_alias, -1); 1813 char *nicktext = g_markup_escape_text(b->server_alias, -1);
1814 tmp = g_strdup_printf("<font sml=\"msn\">%s</font><br>", nicktext); 1814 tmp = g_strdup_printf("<font sml=\"msn\">%s</font>", nicktext);
1815 purple_notify_user_info_add_pair(user_info, _("Nickname"), tmp); 1815 purple_notify_user_info_add_pair(user_info, _("Nickname"), tmp);
1816 g_free(tmp); 1816 g_free(tmp);
1817 g_free(nicktext); 1817 g_free(nicktext);
1818 } 1818 }
1819 1819
1915 user_info = purple_notify_user_info_new(); 1915 user_info = purple_notify_user_info_new();
1916 has_tooltip_text = msn_tooltip_extract_info_text(user_info, info_data); 1916 has_tooltip_text = msn_tooltip_extract_info_text(user_info, info_data);
1917 1917
1918 if (error_message != NULL || url_text == NULL || strcmp(url_text, "") == 0) 1918 if (error_message != NULL || url_text == NULL || strcmp(url_text, "") == 0)
1919 { 1919 {
1920 tmp = g_strdup_printf("<b>%s</b>", _("Error retrieving profile")); 1920 purple_notify_user_info_add_pair(user_info,
1921 purple_notify_user_info_add_pair(user_info, NULL, tmp); 1921 _("Error retrieving profile"), NULL);
1922 g_free(tmp);
1923 1922
1924 purple_notify_userinfo(info_data->gc, info_data->name, user_info, NULL, NULL); 1923 purple_notify_userinfo(info_data->gc, info_data->name, user_info, NULL, NULL);
1925 purple_notify_user_info_destroy(user_info); 1924 purple_notify_user_info_destroy(user_info);
1926 1925
1927 g_free(info_data->name); 1926 g_free(info_data->name);
2258 char *p = strstr(url_buffer, "form id=\"SpacesSearch\" name=\"SpacesSearch\""); 2257 char *p = strstr(url_buffer, "form id=\"SpacesSearch\" name=\"SpacesSearch\"");
2259 * Let's see how long this one holds out for ... */ 2258 * Let's see how long this one holds out for ... */
2260 char *p = strstr(url_buffer, "<form id=\"profile_form\" name=\"profile_form\" action=\"http&#58;&#47;&#47;spaces.live.com&#47;profile.aspx&#63;cid&#61;0\""); 2259 char *p = strstr(url_buffer, "<form id=\"profile_form\" name=\"profile_form\" action=\"http&#58;&#47;&#47;spaces.live.com&#47;profile.aspx&#63;cid&#61;0\"");
2261 PurpleBuddy *b = purple_find_buddy 2260 PurpleBuddy *b = purple_find_buddy
2262 (purple_connection_get_account(info_data->gc), info_data->name); 2261 (purple_connection_get_account(info_data->gc), info_data->name);
2263 purple_notify_user_info_add_pair(user_info, _("Error retrieving profile"), 2262 purple_notify_user_info_add_pair(user_info,
2264 ((p && b) ? _("The user has not created a public profile.") : 2263 _("Error retrieving profile"), NULL);
2265 (p ? _("MSN reported not being able to find the user's profile. " 2264 purple_notify_user_info_add_pair(user_info, NULL,
2266 "This either means that the user does not exist, " 2265 ((p && b) ? _("The user has not created a public profile.") :
2267 "or that the user exists " 2266 (p ? _("MSN reported not being able to find the user's profile. "
2268 "but has not created a public profile.") : 2267 "This either means that the user does not exist, "
2269 _("Could not find " /* This should never happen */ 2268 "or that the user exists "
2270 "any information in the user's profile. " 2269 "but has not created a public profile.") :
2271 "The user most likely does not exist.")))); 2270 _("Could not find " /* This should never happen */
2271 "any information in the user's profile. "
2272 "The user most likely does not exist."))));
2272 } 2273 }
2273 2274
2274 /* put a link to the actual profile URL */ 2275 /* put a link to the actual profile URL */
2275 tmp = g_strdup_printf("<a href=\"%s%s\">%s%s</a>", 2276 purple_notify_user_info_add_section_break(user_info);
2276 PROFILE_URL, info_data->name, PROFILE_URL, info_data->name); 2277 tmp = g_strdup_printf("<a href=\"%s%s\">%s</a>",
2277 purple_notify_user_info_add_pair(user_info, _("Profile URL"), tmp); 2278 PROFILE_URL, info_data->name, _("View web profile"));
2279 purple_notify_user_info_add_pair(user_info, NULL, tmp);
2278 g_free(tmp); 2280 g_free(tmp);
2279 2281
2280 #if PHOTO_SUPPORT 2282 #if PHOTO_SUPPORT
2281 /* Find the URL to the photo; must be before the marshalling [Bug 994207] */ 2283 /* Find the URL to the photo; must be before the marshalling [Bug 994207] */
2282 photo_url_text = msn_get_photo_url(url_text); 2284 photo_url_text = msn_get_photo_url(url_text);