Mercurial > dwindows
comparison gtk3/dw.c @ 2057:9c400365f269
GTK3: Eliminate warnings generated when calling dw_window_destroy() on
widgets that happen to be packed into a grid widget. If removed from the
grid they no longer need to be destroyed.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 14 Dec 2019 15:08:18 +0000 |
parents | 29305f8abae3 |
children | f7c462f27829 |
comparison
equal
deleted
inserted
replaced
2056:29305f8abae3 | 2057:9c400365f269 |
---|---|
2540 /* Decrease the count by 1 */ | 2540 /* Decrease the count by 1 */ |
2541 boxcount--; | 2541 boxcount--; |
2542 g_object_set_data(G_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount)); | 2542 g_object_set_data(G_OBJECT(box), "_dw_boxcount", GINT_TO_POINTER(boxcount)); |
2543 } | 2543 } |
2544 } | 2544 } |
2545 /* Finally destroy the widget */ | 2545 /* Finally destroy the widget, make sure it is still |
2546 gtk_widget_destroy(handle2); | 2546 * a valid widget if it got removed from the grid. |
2547 */ | |
2548 if(GTK_IS_WIDGET(handle2)) | |
2549 gtk_widget_destroy(handle2); | |
2547 } | 2550 } |
2548 DW_MUTEX_UNLOCK; | 2551 DW_MUTEX_UNLOCK; |
2549 return 0; | 2552 return 0; |
2550 } | 2553 } |
2551 | 2554 |