empathy r1079 - trunk/src
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r1079 - trunk/src
- Date: Sun, 4 May 2008 21:28:07 +0100 (BST)
Author: xclaesse
Date: Sun May 4 20:28:07 2008
New Revision: 1079
URL: http://svn.gnome.org/viewvc/empathy?rev=1079&view=rev
Log:
Avoid copying chat list in chat_window_delete_event_cb.
Modified:
trunk/src/empathy-chat-window.c
Modified: trunk/src/empathy-chat-window.c
==============================================================================
--- trunk/src/empathy-chat-window.c (original)
+++ trunk/src/empathy-chat-window.c Sun May 4 20:28:07 2008
@@ -707,21 +707,15 @@
GdkEvent *event,
EmpathyChatWindow *window)
{
- EmpathyChatWindowPriv *priv;
- GList *list;
- GList *l;
-
- priv = GET_PRIV (window);
+ EmpathyChatWindowPriv *priv = GET_PRIV (window);
DEBUG ("Delete event received");
- list = g_list_copy (priv->chats);
-
- for (l = list; l; l = l->next) {
- empathy_chat_window_remove_chat (window, l->data);
+ g_object_ref (window);
+ while (priv->chats) {
+ empathy_chat_window_remove_chat (window, priv->chats->data);
}
-
- g_list_free (list);
+ g_object_unref (window);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]