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 553586 - Add orientation API to GtkPaned
Add orientation API to GtkPaned
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 541009
 
 
Reported: 2008-09-24 13:26 UTC by Michael Natterer
Modified: 2010-07-10 03:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch implementing the above (34.47 KB, patch)
2008-09-24 13:33 UTC, Michael Natterer
committed Details | Review

Description Michael Natterer 2008-09-24 13:26:18 UTC
See bug #541009.

Here are the patches for GtkPaned, GtkHPaned and GtkVPaned.
Comment 1 Michael Natterer 2008-09-24 13:33:44 UTC
Created attachment 119304 [details] [review]
Patch implementing the above

Add orientation API to GtkPaned, move all of GtkHPaned's and
GtkVPaned's code to GtkPaned.

Will do deprecations in separate commits because they imply lots of
related changes.
Comment 2 Michael Natterer 2008-09-24 13:36:29 UTC
Setting patch staus to needs-work right away because the patch changes
the parent class from abstract to instantiatable, which means we can
fix its default values.

Do we need new (packing or whatever) defaults here? And what should
they be?

The approach to fix the default values depending on whether one
of the old H/V subclasses was crated can be seen in the GtkBox patch
attached to bug #553573
Comment 3 Michael Natterer 2008-11-07 16:41:01 UTC
Committed a modified patch which uses the new GtkOrientable API. Leaving
the bug open since deprecation needs to be discussed. Also, GtkPaned
is not abstract any longer so we can change its defaults. Needs
discussion too.

2008-11-07  Michael Natterer  <mitch@gimp.org>

	Bug 553586 – Add orientation API to GtkPaned

	* gtk/gtkpaned.[ch]: implement the GtkOrientable interface
	and swallow all code from GtkHPaned and GtkVPaned. Add
	gtk_paned_new() which takes a GtkOrientation argument. Deprecate
	gtk_paned_compute_position() for good (also for GTK_COMPILATION).

	* gtk/gtkhpaned.[ch]
	* gtk/gtkvpaned.[ch]: remove all code except the constructor and
	call gtk_orientable_set_orientation() in init().

	* gtk/gtk.symbols: add gtk_box_new().
Comment 4 Michael Natterer 2008-11-07 19:01:40 UTC
Fixed a small glitch in the commit:

2008-11-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkpaned.c: argh, actually call the newly added private
	gtk_paned_calc_position() instead of the deprecated public
	version.