GNOME Bugzilla – Bug 740883
various gutter fixes
Last modified: 2014-11-29 14:38:22 UTC
Created attachment 291770 [details] [review] gutter selected state optimisation - optimisation for gutter selected state - use g_clear_object when possible - use pango_layout_get_pixel_size instead of pango_layout_get_size + PANGO_SCALE
Created attachment 291771 [details] [review] various fixes
Review of attachment 291770 [details] [review]: Just a coding style comment. Feel free to push after fixing it. ::: gtksourceview/gtksourcegutter.c @@ +1130,3 @@ if (has_selection && + line_to_paint >= selection_start_line && + line_to_paint <= selection_end_line) With this kind of comparison, it's clearer with something like: min <= value && value <= max We can visually see 'value' between 'min' and 'max' (so the two comparisons must be on the same line, otherwise it's more difficult to understand).
Review of attachment 291771 [details] [review]: ditto, feel free to push after fixing the small comment below. ::: gtksourceview/gtksourcegutterrenderertext.c @@ +280,3 @@ } + pango_layout_get_pixel_size (layout, &w, &h); You can pass directly 'width' and 'height', the intermediate variables are no longer needed. (The pango_layout_get_pixel_size() width and height parameters are allow-none, so it's fine)
Review of attachment 291770 [details] [review]: after corrections, commited as be244c6
Review of attachment 291771 [details] [review]: after corrections, commited as 01ae59b