pidgin/gtkrequest.c

changeset 33938
b5fdc251ed2e
parent 33935
e740bbb8350c
child 34274
9169710b5af5
child 34706
02cb08146888
equal deleted inserted replaced
33937:f15e97d8758e 33938:b5fdc251ed2e
1745 gtk_widget_show(dirsel); 1745 gtk_widget_show(dirsel);
1746 1746
1747 return (void *)data; 1747 return (void *)data;
1748 } 1748 }
1749 1749
1750 #ifdef _WIN32
1751
1752 /* Not needed (yet) for non-win32, but should work everywhere. */
1753 static void
1754 pidgin_window_detach_children(GtkWindow* parent)
1755 {
1756 GList *it;
1757
1758 g_return_if_fail(parent != NULL);
1759
1760 it = gtk_window_list_toplevels();
1761 for (it = g_list_first(it); it != NULL; it = g_list_next(it)) {
1762 GtkWindow *win = GTK_WINDOW(it->data);
1763 if (gtk_window_get_transient_for(win) == parent)
1764 gtk_window_set_transient_for(win, NULL);
1765 }
1766 }
1767
1768 #endif
1769
1750 static void 1770 static void
1751 pidgin_close_request(PurpleRequestType type, void *ui_handle) 1771 pidgin_close_request(PurpleRequestType type, void *ui_handle)
1752 { 1772 {
1753 PidginRequestData *data = (PidginRequestData *)ui_handle; 1773 PidginRequestData *data = (PidginRequestData *)ui_handle;
1754 1774
1755 g_free(data->cbs); 1775 g_free(data->cbs);
1776
1777 #ifdef _WIN32
1778 /* Win32 gtk ignores gtk_window_set_destroy_with_parent(..., FALSE). */
1779 pidgin_window_detach_children(GTK_WINDOW(data->dialog));
1780 #endif
1756 1781
1757 gtk_widget_destroy(data->dialog); 1782 gtk_widget_destroy(data->dialog);
1758 1783
1759 if (type == PURPLE_REQUEST_FIELDS) 1784 if (type == PURPLE_REQUEST_FIELDS)
1760 purple_request_fields_destroy(data->u.multifield.fields); 1785 purple_request_fields_destroy(data->u.multifield.fields);

mercurial