After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 693015 - Deprecate gtk_scrolled_window_add_with_viewport()
Deprecate gtk_scrolled_window_add_with_viewport()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-02-01 15:10 UTC by Cosimo Cecchi
Modified: 2013-02-02 03:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
scrolledwindow: deprecate gtk_scrolled_window_add_with_viewport() (6.23 KB, patch)
2013-02-01 15:10 UTC, Cosimo Cecchi
none Details | Review
Don't use gtk_scrolled_window_add_with_viewport() internally (2.18 KB, patch)
2013-02-01 15:10 UTC, Cosimo Cecchi
none Details | Review
scrolledwindow: make gtk_scrolled_window_add() smart (3.87 KB, patch)
2013-02-01 16:33 UTC, Cosimo Cecchi
committed Details | Review
Don't use gtk_scrolled_window_add_with_viewport() internally (2.18 KB, patch)
2013-02-01 16:33 UTC, Cosimo Cecchi
committed Details | Review
Don't use gtk_scrolled_window_add_with_viewport() in tests (8.49 KB, patch)
2013-02-01 16:33 UTC, Cosimo Cecchi
committed Details | Review
scrolledwindow: deprecate gtk_scrolled_window_add_with_viewport() (1.61 KB, patch)
2013-02-01 16:34 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2013-02-01 15:10:29 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()
Comment 1 Cosimo Cecchi 2013-02-01 15:10:32 UTC
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.
Comment 2 Cosimo Cecchi 2013-02-01 15:10:35 UTC
Created attachment 234992 [details] [review]
Don't use gtk_scrolled_window_add_with_viewport() internally

Just use gtk_container_add() instead.
Comment 3 Matthias Clasen 2013-02-01 15:49:09 UTC
Should probably do this sequence as follows:

1) make GtkScrolledWindow->add smart

2) drop internal use of add_with_viewport

3) deprecate it
Comment 4 Matthias Clasen 2013-02-01 15:50:36 UTC
Other than that, sounds good to both me and Benjamin. Go for it!
Comment 5 Cosimo Cecchi 2013-02-01 16:33:40 UTC
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().
Comment 6 Cosimo Cecchi 2013-02-01 16:33:49 UTC
Created attachment 235005 [details] [review]
Don't use gtk_scrolled_window_add_with_viewport() internally

Just use gtk_container_add() instead.
Comment 7 Cosimo Cecchi 2013-02-01 16:33:56 UTC
Created attachment 235006 [details] [review]
Don't use gtk_scrolled_window_add_with_viewport() in tests
Comment 8 Cosimo Cecchi 2013-02-01 16:34:04 UTC
Created attachment 235007 [details] [review]
scrolledwindow: deprecate gtk_scrolled_window_add_with_viewport()
Comment 9 Matthias Clasen 2013-02-01 22:43:00 UTC
Review of attachment 235004 [details] [review]:

ok
Comment 10 Matthias Clasen 2013-02-01 22:43:23 UTC
Review of attachment 235005 [details] [review]:

ok
Comment 11 Matthias Clasen 2013-02-01 22:43:36 UTC
Review of attachment 235005 [details] [review]:

.
Comment 12 Matthias Clasen 2013-02-01 22:44:16 UTC
Review of attachment 235006 [details] [review]:

ok
Comment 13 Matthias Clasen 2013-02-01 22:44:46 UTC
Review of attachment 235007 [details] [review]:

ok
Comment 14 Matthias Clasen 2013-02-02 03:58:38 UTC
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()