comparison libpurple/notify.c @ 19114:6de2e9ba0930

merge of '2970edca111b3535ae0703e3c866ad1c3b87df94' and 'a2b508e8680ac3f20965226a5dd83f7e2a3b15bb'
author Eric Polino <aluink@pidgin.im>
date Sun, 24 Jun 2007 02:56:09 +0000
parents 59aec2d6ec43
children cb91bb07eeff
comparison
equal deleted inserted replaced
19102:7f26e5b98b15 19114:6de2e9ba0930
528 g_list_free(user_info->user_info_entries); 528 g_list_free(user_info->user_info_entries);
529 PURPLE_DBUS_UNREGISTER_POINTER(user_info); 529 PURPLE_DBUS_UNREGISTER_POINTER(user_info);
530 g_free(user_info); 530 g_free(user_info);
531 } 531 }
532 532
533 const GList * 533 GList *
534 purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info) 534 purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info)
535 { 535 {
536 g_return_val_if_fail(user_info != NULL, NULL); 536 g_return_val_if_fail(user_info != NULL, NULL);
537 537
538 return user_info->user_info_entries; 538 return user_info->user_info_entries;
747 } 747 }
748 748
749 void 749 void
750 purple_notify_close_with_handle(void *handle) 750 purple_notify_close_with_handle(void *handle)
751 { 751 {
752 GList *l, *l_next; 752 GList *l, *prev = NULL;
753 PurpleNotifyUiOps *ops; 753 PurpleNotifyUiOps *ops;
754 754
755 g_return_if_fail(handle != NULL); 755 g_return_if_fail(handle != NULL);
756 756
757 ops = purple_notify_get_ui_ops(); 757 ops = purple_notify_get_ui_ops();
758 758
759 for (l = handles; l != NULL; l = l_next) { 759 for (l = handles; l != NULL; l = prev ? prev->next : handles) {
760 PurpleNotifyInfo *info = l->data; 760 PurpleNotifyInfo *info = l->data;
761
762 l_next = l->next;
763 761
764 if (info->handle == handle) { 762 if (info->handle == handle) {
765 handles = g_list_remove(handles, info); 763 handles = g_list_remove(handles, info);
766 764
767 if (ops != NULL && ops->close_notify != NULL) 765 if (ops != NULL && ops->close_notify != NULL)
769 767
770 if (info->cb != NULL) 768 if (info->cb != NULL)
771 info->cb(info->cb_user_data); 769 info->cb(info->cb_user_data);
772 770
773 g_free(info); 771 g_free(info);
774 } 772 } else
773 prev = l;
775 } 774 }
776 } 775 }
777 776
778 void 777 void
779 purple_notify_set_ui_ops(PurpleNotifyUiOps *ops) 778 purple_notify_set_ui_ops(PurpleNotifyUiOps *ops)