libpurple/conversation.c

branch
soc.2013.gobjectification.plugins
changeset 36414
18a801df193a
parent 36366
202c60d1300f
parent 34868
faa5b053f310
child 36475
03f37a4be260
equal deleted inserted replaced
36413:8cf6f1734398 36414:18a801df193a
164 who = purple_conversation_get_name(conv); 164 who = purple_conversation_get_name(conv);
165 165
166 if (err == -E2BIG) { 166 if (err == -E2BIG) {
167 msg = _("Unable to send message: The message is too large."); 167 msg = _("Unable to send message: The message is too large.");
168 168
169 if (!purple_conversation_helper_present_error(who, account, msg)) { 169 if (!purple_conversation_present_error(who, account, msg)) {
170 char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who); 170 char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who);
171 purple_notify_error(gc, NULL, msg2, _("The message is too large.")); 171 purple_notify_error(gc, NULL, msg2, _("The message is too large."));
172 g_free(msg2); 172 g_free(msg2);
173 } 173 }
174 } 174 }
177 "Not yet connected.\n"); 177 "Not yet connected.\n");
178 } 178 }
179 else { 179 else {
180 msg = _("Unable to send message."); 180 msg = _("Unable to send message.");
181 181
182 if (!purple_conversation_helper_present_error(who, account, msg)) { 182 if (!purple_conversation_present_error(who, account, msg)) {
183 char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who); 183 char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who);
184 purple_notify_error(gc, NULL, msg2, NULL); 184 purple_notify_error(gc, NULL, msg2, NULL);
185 g_free(msg2); 185 g_free(msg2);
186 } 186 }
187 } 187 }
637 637
638 purple_signal_emit(purple_conversations_get_handle(), 638 purple_signal_emit(purple_conversations_get_handle(),
639 "conversation-updated", conv, type); 639 "conversation-updated", conv, type);
640 } 640 }
641 641
642 gboolean purple_conversation_helper_present_error(const char *who, PurpleAccount *account, const char *what) 642 gboolean purple_conversation_present_error(const char *who, PurpleAccount *account, const char *what)
643 { 643 {
644 PurpleConversation *conv; 644 PurpleConversation *conv;
645 645
646 g_return_val_if_fail(who != NULL, FALSE); 646 g_return_val_if_fail(who != NULL, FALSE);
647 g_return_val_if_fail(account !=NULL, FALSE); 647 g_return_val_if_fail(account !=NULL, FALSE);

mercurial