Mercurial > pidgin.yaz
comparison src/gtknotify.c @ 13976:6a5aaf46bd52
[gaim-migrate @ 16534]
Some more memleaks.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 20 Jul 2006 21:43:15 +0000 |
parents | 8b7d6fce88d5 |
children |
comparison
equal
deleted
inserted
replaced
13975:8b7d6fce88d5 | 13976:6a5aaf46bd52 |
---|---|
51 GaimAccount *account; | 51 GaimAccount *account; |
52 GtkListStore *model; | 52 GtkListStore *model; |
53 GtkWidget *treeview; | 53 GtkWidget *treeview; |
54 GtkWidget *window; | 54 GtkWidget *window; |
55 gpointer user_data; | 55 gpointer user_data; |
56 GaimNotifySearchResults *results; | |
56 | 57 |
57 } GaimNotifySearchResultsData; | 58 } GaimNotifySearchResultsData; |
58 | 59 |
59 typedef struct | 60 typedef struct |
60 { | 61 { |
682 g_return_val_if_fail(gc != NULL, NULL); | 683 g_return_val_if_fail(gc != NULL, NULL); |
683 g_return_val_if_fail(results != NULL, NULL); | 684 g_return_val_if_fail(results != NULL, NULL); |
684 | 685 |
685 data = g_malloc(sizeof(GaimNotifySearchResultsData)); | 686 data = g_malloc(sizeof(GaimNotifySearchResultsData)); |
686 data->user_data = user_data; | 687 data->user_data = user_data; |
688 data->results = results; | |
687 | 689 |
688 /* Create the window */ | 690 /* Create the window */ |
689 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); | 691 window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
690 gtk_window_set_title(GTK_WINDOW(window), (title ? title :_("Search Results"))); | 692 gtk_window_set_title(GTK_WINDOW(window), (title ? title :_("Search Results"))); |
691 gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG); | 693 gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG); |
810 bd->button = b; | 812 bd->button = b; |
811 bd->data = data; | 813 bd->data = data; |
812 | 814 |
813 g_signal_connect(G_OBJECT(button), "clicked", | 815 g_signal_connect(G_OBJECT(button), "clicked", |
814 G_CALLBACK(searchresults_callback_wrapper_cb), bd); | 816 G_CALLBACK(searchresults_callback_wrapper_cb), bd); |
817 g_signal_connect_swapped(G_OBJECT(button), "destroy", G_CALLBACK(g_free), bd); | |
815 } | 818 } |
816 } | 819 } |
817 | 820 |
818 /* Add the Close button */ | 821 /* Add the Close button */ |
819 close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); | 822 close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); |
862 else if (type == GAIM_NOTIFY_SEARCHRESULTS) | 865 else if (type == GAIM_NOTIFY_SEARCHRESULTS) |
863 { | 866 { |
864 GaimNotifySearchResultsData *data = (GaimNotifySearchResultsData *)ui_handle; | 867 GaimNotifySearchResultsData *data = (GaimNotifySearchResultsData *)ui_handle; |
865 | 868 |
866 gtk_widget_destroy(data->window); | 869 gtk_widget_destroy(data->window); |
870 gaim_notify_searchresults_free(data->results); | |
867 | 871 |
868 g_free(data); | 872 g_free(data); |
869 } | 873 } |
870 else if (ui_handle != NULL) | 874 else if (ui_handle != NULL) |
871 gtk_widget_destroy(GTK_WIDGET(ui_handle)); | 875 gtk_widget_destroy(GTK_WIDGET(ui_handle)); |