Mercurial > dwindows
comparison gtk4/dw.c @ 2313:c6ea79c74c03
GTK4: Remove some lingering eventbox code from GTK3.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 16 Feb 2021 01:57:10 +0000 |
parents | ada8f7610df0 |
children | eda7642d80df |
comparison
equal
deleted
inserted
replaced
2312:ada8f7610df0 | 2313:c6ea79c74c03 |
---|---|
1760 if(GTK_IS_WINDOW(handle)) | 1760 if(GTK_IS_WINDOW(handle)) |
1761 gtk_window_destroy(GTK_WINDOW(handle)); | 1761 gtk_window_destroy(GTK_WINDOW(handle)); |
1762 else if(GTK_IS_WIDGET(handle)) | 1762 else if(GTK_IS_WIDGET(handle)) |
1763 { | 1763 { |
1764 GtkWidget *box, *handle2 = handle; | 1764 GtkWidget *box, *handle2 = handle; |
1765 GtkWidget *eventbox = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_eventbox"); | |
1766 | |
1767 /* Handle the invisible event box if it exists */ | |
1768 if(eventbox && GTK_IS_WIDGET(eventbox)) | |
1769 handle2 = eventbox; | |
1770 | 1765 |
1771 /* Check if we are removing a widget from a box */ | 1766 /* Check if we are removing a widget from a box */ |
1772 if((box = gtk_widget_get_parent(handle2)) && GTK_IS_GRID(box)) | 1767 if((box = gtk_widget_get_parent(handle2)) && GTK_IS_GRID(box)) |
1773 { | 1768 { |
1774 /* Get the number of items in the box... */ | 1769 /* Get the number of items in the box... */ |
2224 { | 2219 { |
2225 GtkWidget *tmp = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_user"); | 2220 GtkWidget *tmp = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_user"); |
2226 if(tmp) | 2221 if(tmp) |
2227 handle2 = tmp; | 2222 handle2 = tmp; |
2228 } | 2223 } |
2229 else if(GTK_IS_GRID(handle)) | |
2230 { | |
2231 GtkWidget *tmp = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_eventbox"); | |
2232 if(tmp) | |
2233 { | |
2234 handle2 = tmp; | |
2235 fore = DW_CLR_DEFAULT; | |
2236 } | |
2237 } | |
2238 | 2224 |
2239 _dw_set_color(handle2, fore, back); | 2225 _dw_set_color(handle2, fore, back); |
2240 | 2226 |
2241 DW_FUNCTION_RETURN_THIS(retval); | 2227 DW_FUNCTION_RETURN_THIS(retval); |
2242 } | 2228 } |
8132 int retcode = DW_ERROR_GENERAL; | 8118 int retcode = DW_ERROR_GENERAL; |
8133 | 8119 |
8134 if(GTK_IS_WIDGET(handle)) | 8120 if(GTK_IS_WIDGET(handle)) |
8135 { | 8121 { |
8136 GtkWidget *box, *handle2 = handle; | 8122 GtkWidget *box, *handle2 = handle; |
8137 GtkWidget *eventbox = (GtkWidget *)g_object_get_data(G_OBJECT(handle), "_dw_eventbox"); | |
8138 | |
8139 /* Handle the invisible event box if it exists */ | |
8140 if(eventbox && GTK_IS_WIDGET(eventbox)) | |
8141 handle2 = eventbox; | |
8142 | 8123 |
8143 /* Check if we are removing a widget from a box */ | 8124 /* Check if we are removing a widget from a box */ |
8144 if((box = gtk_widget_get_parent(handle2)) && GTK_IS_GRID(box)) | 8125 if((box = gtk_widget_get_parent(handle2)) && GTK_IS_GRID(box)) |
8145 { | 8126 { |
8146 /* Get the number of items in the box... */ | 8127 /* Get the number of items in the box... */ |
10824 default: | 10805 default: |
10825 return DW_FEATURE_UNSUPPORTED; | 10806 return DW_FEATURE_UNSUPPORTED; |
10826 } | 10807 } |
10827 } | 10808 } |
10828 | 10809 |
10810 |