GNOME Bugzilla – Bug 613942
Deprecate GtkRuler, GtkVruler and GtkHRuler
Last modified: 2011-02-04 16:12:22 UTC
Documentation says that these widgets are considered too specialized/little-used for GTK+. Should they be deprecated?
-1, given the other bugs, people actualy use this widget. We should rather fix and improve it.
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.
In fact, shouldn't GtkRuler take a GtkAdjustment?
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.
It could be removed in 3.0, rewritten, and re-added perhaps.
Company, yes it should use GtkAdjustment http://live.gnome.org/GTK%2B/GtkRuler 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.
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.
2.22 has been released. Change target milestore to 2.24
Stefan: any news about this?
commit e0fb7a86e59278dccd7c276c754f9e8b7fdab0d5 Author: Benjamin Otte <otte@redhat.com> 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. https://bugzilla.gnome.org/show_bug.cgi?id=613942
commit 07c00b996985886e1902d802353142a93a2b0d4b Author: Benjamin Otte <otte@redhat.com> Date: Wed Nov 24 17:26:09 2010 +0100 gtk: Deprecate GtkRuler and subclasses. They have been removed fom GTK 3.