192 ct->add = ui_scrolledwindow_container_add; |
192 ct->add = ui_scrolledwindow_container_add; |
193 return ct; |
193 return ct; |
194 } |
194 } |
195 |
195 |
196 void ui_scrolledwindow_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill) { |
196 void ui_scrolledwindow_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill) { |
|
197 // TODO: check if the widget implements GtkScrollable |
|
198 #ifdef UI_GTK3 |
197 gtk_container_add(GTK_CONTAINER(ct->widget), widget); |
199 gtk_container_add(GTK_CONTAINER(ct->widget), widget); |
|
200 #else |
|
201 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(ct->widget), widget); |
|
202 #endif |
198 ui_reset_layout(ct->layout); |
203 ui_reset_layout(ct->layout); |
199 ct->current = widget; |
204 ct->current = widget; |
200 } |
205 } |
201 |
206 |
202 UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview) { |
207 UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview) { |