Mercurial > pidgin
comparison src/conversation.c @ 6402:cc35d07a0dcc
[gaim-migrate @ 6907]
g_malloc0() -> g_new0()
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Thu, 07 Aug 2003 00:46:13 +0000 |
| parents | 8f94cce8faa5 |
| children | 01963a303f43 |
comparison
equal
deleted
inserted
replaced
| 6401:6443491fa59d | 6402:cc35d07a0dcc |
|---|---|
| 164 name = gaim_conversation_get_name(conv); | 164 name = gaim_conversation_get_name(conv); |
| 165 | 165 |
| 166 if (conv != NULL && gc != NULL && name != NULL) { | 166 if (conv != NULL && gc != NULL && name != NULL) { |
| 167 gaim_im_set_type_again(GAIM_IM(conv), TRUE); | 167 gaim_im_set_type_again(GAIM_IM(conv), TRUE); |
| 168 | 168 |
| 169 /* XXX Somebody add const stuff! */ | 169 serv_send_typing(gc, name, GAIM_TYPED); |
| 170 serv_send_typing(gc, (char *)name, GAIM_TYPED); | |
| 171 | 170 |
| 172 gaim_debug(GAIM_DEBUG_MISC, "conversation", "typed...\n"); | 171 gaim_debug(GAIM_DEBUG_MISC, "conversation", "typed...\n"); |
| 173 } | 172 } |
| 174 | 173 |
| 175 return FALSE; | 174 return FALSE; |
| 448 GaimWindow * | 447 GaimWindow * |
| 449 gaim_window_new(void) | 448 gaim_window_new(void) |
| 450 { | 449 { |
| 451 GaimWindow *win; | 450 GaimWindow *win; |
| 452 | 451 |
| 453 win = g_malloc0(sizeof(GaimWindow)); | 452 win = g_new0(GaimWindow, 1); |
| 454 | 453 |
| 455 windows = g_list_append(windows, win); | 454 windows = g_list_append(windows, win); |
| 456 | 455 |
| 457 win->ui_ops = gaim_get_win_ui_ops(); | 456 win->ui_ops = gaim_get_win_ui_ops(); |
| 458 | 457 |
| 871 | 870 |
| 872 /* Check if this conversation already exists. */ | 871 /* Check if this conversation already exists. */ |
| 873 if ((conv = gaim_find_conversation_with_account(name, account)) != NULL) | 872 if ((conv = gaim_find_conversation_with_account(name, account)) != NULL) |
| 874 return conv; | 873 return conv; |
| 875 | 874 |
| 876 conv = g_malloc0(sizeof(GaimConversation)); | 875 conv = g_new0(GaimConversation, 1); |
| 877 | 876 |
| 878 conv->type = type; | 877 conv->type = type; |
| 879 conv->account = account; | 878 conv->account = account; |
| 880 conv->name = g_strdup(name); | 879 conv->name = g_strdup(name); |
| 881 conv->title = g_strdup(name); | 880 conv->title = g_strdup(name); |
| 884 conv->data = g_hash_table_new_full(g_str_hash, g_str_equal, | 883 conv->data = g_hash_table_new_full(g_str_hash, g_str_equal, |
| 885 g_free, NULL); | 884 g_free, NULL); |
| 886 | 885 |
| 887 if (type == GAIM_CONV_IM) | 886 if (type == GAIM_CONV_IM) |
| 888 { | 887 { |
| 889 conv->u.im = g_malloc0(sizeof(GaimIm)); | 888 conv->u.im = g_new0(GaimIm, 1); |
| 890 conv->u.im->conv = conv; | 889 conv->u.im->conv = conv; |
| 891 | 890 |
| 892 ims = g_list_append(ims, conv); | 891 ims = g_list_append(ims, conv); |
| 893 | 892 |
| 894 gaim_conversation_set_logging(conv, | 893 gaim_conversation_set_logging(conv, |
| 895 gaim_prefs_get_bool("/gaim/gtk/logging/log_ims")); | 894 gaim_prefs_get_bool("/gaim/gtk/logging/log_ims")); |
| 896 } | 895 } |
| 897 else if (type == GAIM_CONV_CHAT) | 896 else if (type == GAIM_CONV_CHAT) |
| 898 { | 897 { |
| 899 conv->u.chat = g_malloc0(sizeof(GaimChat)); | 898 conv->u.chat = g_new0(GaimChat, 1); |
| 900 conv->u.chat->conv = conv; | 899 conv->u.chat->conv = conv; |
| 901 | 900 |
| 902 chats = g_list_append(chats, conv); | 901 chats = g_list_append(chats, conv); |
| 903 | 902 |
| 904 gaim_conversation_set_logging(conv, | 903 gaim_conversation_set_logging(conv, |
