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 613942 - Deprecate GtkRuler, GtkVruler and GtkHRuler
Deprecate GtkRuler, GtkVruler and GtkHRuler
Product: gtk+
Classification: Platform
Component: Widget: Other
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Reported: 2010-03-25 19:05 UTC by Javier Jardón (IRC: jjardon)
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30

Description Javier Jardón (IRC: jjardon) 2010-03-25 19:05:25 UTC
Documentation says that these widgets are considered too specialized/little-used for GTK+.

Should they be deprecated?
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2010-06-01 20:46:48 UTC
-1, given the other bugs, people actualy use this widget. We should rather fix and improve it.
Comment 2 Benjamin Otte (Company) 2010-09-02 15:37:49 UTC
GtkRuler is complete crack for current GTK APIs. It draws outside of expose events, relies on people accessing properties directly and for updates expects you to do:
g_signal_connect_swapped (my_widget, "motion-notify-event", GTK_RULER_GET_CLASS(ruler)->motion_notify_event, ruler);
(Yes, I too wish I was making this up.)
It also exports a struct to define a custom metric but doesn't give you a way to use it.

So we'd better fix it before 3.0 is out.

TL;DR: When compiling with proper deprecation flags, you cannot use it.
Comment 3 Benjamin Otte (Company) 2010-09-04 08:39:24 UTC
In fact, shouldn't GtkRuler take a GtkAdjustment?
Comment 4 Havoc Pennington 2010-09-04 17:01:16 UTC
The note that GtkRuler will go away was in commit 
2c5d938ff81480846539d9659dd92ca90cfb9e40 in 2001. So it's been slated for removal throughout 2.x, and remains little-used. I don't know why it wasn't actually GTK_DISABLE_DEPRECATED

I would think GtkRuler could just be removed.
Comment 5 Havoc Pennington 2010-09-04 17:01:59 UTC
It could be removed in 3.0, rewritten, and re-added perhaps.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2010-09-04 20:24:21 UTC
Company, yes it should use GtkAdjustment

Havoc, I have volunteered to rwrite it, but not got a lot of feedback so far. I'll just go with my personal planned changed then. Please dont' remove it for now. I can make most changes within a week.

I don't agree with "little-used", gtk also has other little used widgets. Lets spend energy on fixing this widget, rather than discussion about who eventually uses it or not.
Comment 7 Benjamin Otte (Company) 2010-09-05 16:33:44 UTC
The only thing I want to avoid is the current mess in 3.0.
So I'd suggest that if no one works on it, we definitely remove the current implementation before 3.0 comes out.
Comment 8 Javier Jardón (IRC: jjardon) 2010-09-24 15:23:42 UTC
2.22 has been released. Change target milestore to 2.24
Comment 9 Javier Jardón (IRC: jjardon) 2010-10-21 13:44:35 UTC
Stefan: any news about this?
Comment 10 Benjamin Otte (Company) 2010-11-24 15:56:36 UTC
commit e0fb7a86e59278dccd7c276c754f9e8b7fdab0d5
Author: Benjamin Otte <>
Date:   Wed Nov 24 16:44:16 2010 +0100

    gtk: Remove GtkRuler
    It is really bad code, mostly unused and no one stepped up to fix it.
    Note that Gtk developers do not object to a ruler widget in priciple,
    just to the current implementation. If someone wants to propose a sane
    version, please don't hesitate.
Comment 11 Benjamin Otte (Company) 2010-11-24 16:27:07 UTC
commit 07c00b996985886e1902d802353142a93a2b0d4b
Author: Benjamin Otte <>
Date:   Wed Nov 24 17:26:09 2010 +0100

    gtk: Deprecate GtkRuler and subclasses.
    They have been removed fom GTK 3.