GNOME Bugzilla – Bug 646196
Make GtkWidget::halign RTL-safe
Last modified: 2011-03-30 14:54:41 UTC
Created attachment 184659 [details] [review] patch When doing layout with containers that automatically flip in RTL locales, it is convenient if halign can be used in the same fashion. Since GTK_ALIGN_START/_END are explicitly documented in terms of left/right, we add two new enumeration values, GTK_ALIGN_INITIAL/_FINAL, which behave like START/END, but flip their sense depending on the text direction when used in horizontal context.
Like Ryan said on IRC, I would just change the behavior of START/END and be done with it. Or is there a good reason to not do that?
I would also consider adding LEFT/RIGHT so that you can get the original functionality when you really need it. It wouldn't make much sense for vertical alignments but for that case you could either g_critical or treat it as if it were START/END. btw: I only consider this change as acceptable because it's still quite early... If we want to be quite strict about the API then I suggest: - use FIRST/LAST as preferable to INITIAL/FINAL - deprecate START/END to remove confusion - add LEFT/RIGHT As proposed, I think trying to remember the difference between "START" and "INITIAL" or "END" and "FINAL" could be quite annoying. Having a clear "LEFT" and "RIGHT" would improve that situation.
for the record, google code search shows practically no use of this API yet. a quick grep through the GNOME modules that I happen to have checked out at the moment finds itself rather entirely in agreement.