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 553585 - Add orientation API to GtkRuler
Add orientation API to GtkRuler
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:11 UTC by Michael Natterer
Modified: 2010-07-10 03:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


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

Description Michael Natterer 2008-09-24 13:11:12 UTC
See bug #541009.

Here are the patches for GtkRuler, GtkHRuler and GtkVRuler.
Comment 1 Michael Natterer 2008-09-24 13:14:01 UTC
Created attachment 119302 [details] [review]
Patch implementing the above

Add orientation API to GtkRuler, move all of GtkHRuler's and
GtkVRuler's code to GtkRuler.

Will do deprecations in separate commits because they imply lots of
related changes.
Comment 2 Matthias Clasen 2008-09-27 02:25:46 UTC
+      text_width = strlen (unit_str) * digit_height + 1;

Shouldn't this be digit_width ?
Comment 3 Michael Natterer 2008-09-29 11:18:47 UTC
There is a comment in the code explaining why we use digit_height here (the
text layout should look the same for a hruler that comes with a vruler
in the same window).
Comment 4 Matthias Clasen 2008-10-02 03:44:42 UTC
ok then
Comment 5 Michael Natterer 2008-10-02 15:13:57 UTC
Committed a modified patch which uses the new GtkOrientable API. Leaving
the bug open since deprecation needs to be discussed.

2008-10-02  Michael Natterer  <mitch@imendio.com>

	Bug 553585 – Add orientation API to GtkRuler

	* gtk/gtkruler.[ch]: implement the GtkOrientable interface and
	swallow all code from GtkHRuler and GtkVRuler. Add gtk_ruler_new()
	which takes a GtkOrientation argument.

	* gtk/gtkhruler.c
	* gtk/gtkvruler.c: remove all code except the constructor and
	call gtk_orientable_set_orientation() in init().

	* gtk/gtk.symbols: add gtk_ruler_new().
Comment 6 Matthias Clasen 2010-07-10 03:50:19 UTC
Closing