GNOME Bugzilla – Bug 693015
Deprecate gtk_scrolled_window_add_with_viewport()
Last modified: 2013-02-02 03:58:49 UTC
Just fold the non-scrollable addded to GtkScrolledWindow case into the regular implementation of add() and deprecate the special function. Maybe I'm missing something but I don't see why we shouldn't just do this. This avois the need for ugly functions such as egg_list_box_add_to_scrolled()
Created attachment 234991 [details] [review] scrolledwindow: deprecate gtk_scrolled_window_add_with_viewport() There's really no reason why we shouldn't automatically create a GtkViewport when the widget added to GtkScrolledWindow is not a GtkScrollable, instead of just printing a g_warning. Fold the viewport special case into the scrolled window implementation of gtk_container_add() and deprecate gtk_scrolled_window_add_with_viewport() for it.
Created attachment 234992 [details] [review] Don't use gtk_scrolled_window_add_with_viewport() internally Just use gtk_container_add() instead.
Should probably do this sequence as follows: 1) make GtkScrolledWindow->add smart 2) drop internal use of add_with_viewport 3) deprecate it
Other than that, sounds good to both me and Benjamin. Go for it!
Created attachment 235004 [details] [review] scrolledwindow: make gtk_scrolled_window_add() smart There's really no reason why we shouldn't automatically create a GtkViewport when the widget added to GtkScrolledWindow is not a GtkScrollable, instead of just printing a g_warning. Copy the viewport special case into the scrolled window implementation of gtk_container_add().
Created attachment 235005 [details] [review] Don't use gtk_scrolled_window_add_with_viewport() internally Just use gtk_container_add() instead.
Created attachment 235006 [details] [review] Don't use gtk_scrolled_window_add_with_viewport() in tests
Created attachment 235007 [details] [review] scrolledwindow: deprecate gtk_scrolled_window_add_with_viewport()
Review of attachment 235004 [details] [review]: ok
Review of attachment 235005 [details] [review]: ok
Review of attachment 235005 [details] [review]: .
Review of attachment 235006 [details] [review]: ok
Review of attachment 235007 [details] [review]: ok
Attachment 235004 [details] pushed as 9efa285 - scrolledwindow: make gtk_scrolled_window_add() smart Attachment 235005 [details] pushed as 7c1c7cb - Don't use gtk_scrolled_window_add_with_viewport() internally Attachment 235006 [details] pushed as ce86992 - Don't use gtk_scrolled_window_add_with_viewport() in tests Attachment 235007 [details] pushed as ad70142 - scrolledwindow: deprecate gtk_scrolled_window_add_with_viewport()