| 878 else |
878 else |
| 879 return; |
879 return; |
| 880 |
880 |
| 881 if (strcmp(convprotocol, purple_account_get_protocol_id(purple_buddy_get_account(buddy)))) |
881 if (strcmp(convprotocol, purple_account_get_protocol_id(purple_buddy_get_account(buddy)))) |
| 882 { |
882 { |
| 883 purple_notify_error(PIDGIN_CONVERSATION(info->conv), NULL, |
883 purple_notify_error(PIDGIN_CONVERSATION(info->conv), |
| 884 _("That buddy is not on the same protocol as this " |
884 NULL, _("That buddy is not on the same protocol" |
| 885 "chat."), NULL); |
885 " as this chat."), NULL, |
| |
886 purple_request_cpar_from_conversation(info->conv)); |
| 886 success = FALSE; |
887 success = FALSE; |
| 887 } |
888 } |
| 888 else |
889 else |
| 889 gtk_entry_set_text(GTK_ENTRY(info->entry), purple_buddy_get_name(buddy)); |
890 gtk_entry_set_text(GTK_ENTRY(info->entry), purple_buddy_get_name(buddy)); |
| 890 |
891 |
| 902 { |
903 { |
| 903 if (account == NULL) |
904 if (account == NULL) |
| 904 { |
905 { |
| 905 purple_notify_error(PIDGIN_CONVERSATION(info->conv), NULL, |
906 purple_notify_error(PIDGIN_CONVERSATION(info->conv), NULL, |
| 906 _("You are not currently signed on with an account that " |
907 _("You are not currently signed on with an account that " |
| 907 "can invite that buddy."), NULL); |
908 "can invite that buddy."), NULL, NULL); |
| 908 } |
909 } |
| 909 else if (strcmp(convprotocol, purple_account_get_protocol_id(account))) |
910 else if (strcmp(convprotocol, purple_account_get_protocol_id(account))) |
| 910 { |
911 { |
| 911 purple_notify_error(PIDGIN_CONVERSATION(info->conv), NULL, |
912 purple_notify_error( |
| 912 _("That buddy is not on the same protocol as this " |
913 PIDGIN_CONVERSATION(info->conv), NULL, |
| 913 "chat."), NULL); |
914 _("That buddy is not on the same " |
| |
915 "protocol as this chat."), NULL, |
| |
916 purple_request_cpar_from_account( |
| |
917 account)); |
| 914 success = FALSE; |
918 success = FALSE; |
| 915 } |
919 } |
| 916 else |
920 else |
| 917 { |
921 { |
| 918 gtk_entry_set_text(GTK_ENTRY(info->entry), username); |
922 gtk_entry_set_text(GTK_ENTRY(info->entry), username); |
| 1074 FILE *fp; |
1078 FILE *fp; |
| 1075 const char *name; |
1079 const char *name; |
| 1076 gchar *text; |
1080 gchar *text; |
| 1077 |
1081 |
| 1078 if ((fp = g_fopen(filename, "w+")) == NULL) { |
1082 if ((fp = g_fopen(filename, "w+")) == NULL) { |
| 1079 purple_notify_error(PIDGIN_CONVERSATION(conv), NULL, _("Unable to open file."), NULL); |
1083 purple_notify_error(PIDGIN_CONVERSATION(conv), NULL, |
| |
1084 _("Unable to open file."), NULL, |
| |
1085 purple_request_cpar_from_conversation(conv)); |
| 1080 return; |
1086 return; |
| 1081 } |
1087 } |
| 1082 |
1088 |
| 1083 webview = GTK_WEBVIEW(PIDGIN_CONVERSATION(conv)->webview); |
1089 webview = GTK_WEBVIEW(PIDGIN_CONVERSATION(conv)->webview); |
| 1084 name = purple_conversation_get_name(conv); |
1090 name = purple_conversation_get_name(conv); |
| 2829 |
2835 |
| 2830 icon = purple_conv_im_get_icon(PURPLE_CONV_IM(conv)); |
2836 icon = purple_conv_im_get_icon(PURPLE_CONV_IM(conv)); |
| 2831 data = purple_buddy_icon_get_data(icon, &len); |
2837 data = purple_buddy_icon_get_data(icon, &len); |
| 2832 |
2838 |
| 2833 if ((len <= 0) || (data == NULL) || !purple_util_write_data_to_file_absolute(filename, data, len)) { |
2839 if ((len <= 0) || (data == NULL) || !purple_util_write_data_to_file_absolute(filename, data, len)) { |
| 2834 purple_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL); |
2840 purple_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL, NULL); |
| 2835 } |
2841 } |
| 2836 } |
2842 } |
| 2837 |
2843 |
| 2838 static void |
2844 static void |
| 2839 custom_icon_sel_cb(const char *filename, gpointer data) |
2845 custom_icon_sel_cb(const char *filename, gpointer data) |
| 5615 { |
5621 { |
| 5616 if (account == NULL) |
5622 if (account == NULL) |
| 5617 { |
5623 { |
| 5618 purple_notify_error(win, NULL, |
5624 purple_notify_error(win, NULL, |
| 5619 _("You are not currently signed on with an account that " |
5625 _("You are not currently signed on with an account that " |
| 5620 "can add that buddy."), NULL); |
5626 "can add that buddy."), NULL, NULL); |
| 5621 } else { |
5627 } else { |
| 5622 /* |
5628 /* |
| 5623 * If a buddy is dragged to a chat window of the same protocol, |
5629 * If a buddy is dragged to a chat window of the same protocol, |
| 5624 * invite him to the chat. |
5630 * invite him to the chat. |
| 5625 */ |
5631 */ |