libpurple/protocols/myspace/myspace.c

changeset 27079
baa7cbe5775a
parent 26752
27fe5aa7cbd0
child 27086
8905444c7d9a
equal deleted inserted replaced
27074:517beaba545d 27079:baa7cbe5775a
845 msim_check_inbox_cb(MsimSession *session, const MsimMessage *reply, gpointer data) 845 msim_check_inbox_cb(MsimSession *session, const MsimMessage *reply, gpointer data)
846 { 846 {
847 MsimMessage *body; 847 MsimMessage *body;
848 guint old_inbox_status; 848 guint old_inbox_status;
849 guint i, n; 849 guint i, n;
850 const gchar *froms[5], *tos[5], *urls[5], *subjects[5];
851
852 /* Information for each new inbox message type. */ 850 /* Information for each new inbox message type. */
853 static struct 851 static struct
854 { 852 {
855 const gchar *key; 853 const gchar *key;
856 guint bit; 854 guint bit;
861 { "BlogComment", MSIM_INBOX_BLOG_COMMENT, "http://blog.myspace.com/index.cfm?fuseaction=blog", NULL }, 859 { "BlogComment", MSIM_INBOX_BLOG_COMMENT, "http://blog.myspace.com/index.cfm?fuseaction=blog", NULL },
862 { "ProfileComment", MSIM_INBOX_PROFILE_COMMENT, "http://home.myspace.com/index.cfm?fuseaction=user", NULL }, 860 { "ProfileComment", MSIM_INBOX_PROFILE_COMMENT, "http://home.myspace.com/index.cfm?fuseaction=user", NULL },
863 { "FriendRequest", MSIM_INBOX_FRIEND_REQUEST, "http://messaging.myspace.com/index.cfm?fuseaction=mail.friendRequests", NULL }, 861 { "FriendRequest", MSIM_INBOX_FRIEND_REQUEST, "http://messaging.myspace.com/index.cfm?fuseaction=mail.friendRequests", NULL },
864 { "PictureComment", MSIM_INBOX_PICTURE_COMMENT, "http://home.myspace.com/index.cfm?fuseaction=user", NULL } 862 { "PictureComment", MSIM_INBOX_PICTURE_COMMENT, "http://home.myspace.com/index.cfm?fuseaction=user", NULL }
865 }; 863 };
864 const gchar *froms[ARRAY_LENGTH(message_types) + 1] = { "" },
865 *tos[ARRAY_LENGTH(message_types) + 1] = { "" },
866 *urls[ARRAY_LENGTH(message_types) + 1] = { "" },
867 *subjects[ARRAY_LENGTH(message_types) + 1] = { "" };
868
869 g_return_if_fail(reply != NULL);
866 870
867 /* Can't write _()'d strings in array initializers. Workaround. */ 871 /* Can't write _()'d strings in array initializers. Workaround. */
872 /* khc: then use N_() in the array initializer and use _() when they are
873 used */
868 message_types[0].text = _("New mail messages"); 874 message_types[0].text = _("New mail messages");
869 message_types[1].text = _("New blog comments"); 875 message_types[1].text = _("New blog comments");
870 message_types[2].text = _("New profile comments"); 876 message_types[2].text = _("New profile comments");
871 message_types[3].text = _("New friend requests!"); 877 message_types[3].text = _("New friend requests!");
872 message_types[4].text = _("New picture comments"); 878 message_types[4].text = _("New picture comments");
873
874 g_return_if_fail(reply != NULL);
875 879
876 body = msim_msg_get_dictionary(reply, "body"); 880 body = msim_msg_get_dictionary(reply, "body");
877 881
878 if (body == NULL) 882 if (body == NULL)
879 return; 883 return;

mercurial