[PATCH] Move the sidebar to the right for RTL languages
David Shea
dshea at redhat.com
Mon Feb 24 15:19:33 UTC 2014
On 02/24/2014 03:48 AM, Vratislav Podzimek wrote:
> I remember guys pointing out to me that we don't use curly brackets
> around one-line blocks in our C code. It wasn't true consistently by
> that time and I'm not sure if it has changed in the meantime, but I
> think you can drop them in cases like this one.
Ok. I tend to err on the side of more punctuation when I do C, but
whatever. For the block that's
+ if (gtk_get_locale_direction() == GTK_TEXT_DIR_LTR)
+ {
+ child_allocation.x = allocation->x+sidebar_width;
+ }
+ else
+ {
+ child_allocation.x = allocation->x;
+ }
I'll change that to dump the brackets, but for the block that's
+ if (gtk_get_locale_direction() == GTK_TEXT_DIR_LTR)
+ {
+ sidebar_x = 0;
+ }
+ else
+ {
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(win, &allocation);
+ sidebar_x = allocation.width - sidebar_width;
+ }
I'm going to keep all the brackets, because elsewhere lies madness. I can move the opening brackets to the same line as the if/elses instead of giving them their own line, though. I don't know our habits on that.
More information about the anaconda-patches
mailing list