diff options
author | raveit65 <chat-to-me@raveit.de> | 2016-06-27 13:06:38 +0200 |
---|---|---|
committer | raveit65 <chat-to-me@raveit.de> | 2016-07-06 17:47:42 +0200 |
commit | 1f7ab5dcbca155f331735a8483d768ea0c349c18 (patch) | |
tree | 2e2e9d654f1d07ca1bf2ed173cdf465b9e805b97 | |
parent | 32359d81ae57fdde06062ae857933b2c62bea628 (diff) | |
download | caja-1f7ab5dcbca155f331735a8483d768ea0c349c18.tar.bz2 caja-1f7ab5dcbca155f331735a8483d768ea0c349c18.tar.xz |
icon-container: don't use eel helper to set adjustment values
taken from:
https://git.gnome.org/browse/nautilus/commit/?id=3a9c6cd
-rw-r--r-- | libcaja-private/caja-icon-container.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index 00305f18..2574794f 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -623,8 +623,8 @@ caja_icon_container_scroll (CajaIconContainer *container, old_h_value = gtk_adjustment_get_value (hadj); old_v_value = gtk_adjustment_get_value (vadj); - eel_gtk_adjustment_set_value (hadj, gtk_adjustment_get_value (hadj) + delta_x); - eel_gtk_adjustment_set_value (vadj, gtk_adjustment_get_value (vadj) + delta_y); + gtk_adjustment_set_value (hadj, gtk_adjustment_get_value (hadj) + delta_x); + gtk_adjustment_set_value (vadj, gtk_adjustment_get_value (vadj) + delta_y); /* return TRUE if we did scroll */ return gtk_adjustment_get_value (hadj) != old_h_value || gtk_adjustment_get_value (vadj) != old_v_value; @@ -778,18 +778,18 @@ reveal_icon (CajaIconContainer *container, item_get_canvas_bounds (EEL_CANVAS_ITEM (icon->item), &bounds, TRUE); } if (bounds.y0 < gtk_adjustment_get_value (vadj)) { - eel_gtk_adjustment_set_value (vadj, bounds.y0); + gtk_adjustment_set_value (vadj, bounds.y0); } else if (bounds.y1 > gtk_adjustment_get_value (vadj) + allocation.height) { - eel_gtk_adjustment_set_value (vadj, bounds.y1 - allocation.height); + gtk_adjustment_set_value (vadj, bounds.y1 - allocation.height); } if (bounds.x0 < gtk_adjustment_get_value (hadj)) { - eel_gtk_adjustment_set_value (hadj, bounds.x0); + gtk_adjustment_set_value (hadj, bounds.x0); } else if (bounds.x1 > gtk_adjustment_get_value (hadj) + allocation.width) { if (bounds.x1 - allocation.width > bounds.x0) { - eel_gtk_adjustment_set_value (hadj, bounds.x0); + gtk_adjustment_set_value (hadj, bounds.x0); } else { - eel_gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width); + gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width); } } } @@ -1230,11 +1230,6 @@ caja_icon_container_update_scroll_region (CajaIconContainer *container) { gtk_adjustment_set_step_increment (vadj, step_increment); } - /* Now that we have a new scroll region, clamp the - * adjustments so we are within the valid scroll area. - */ - eel_gtk_adjustment_clamp_value (hadj); - eel_gtk_adjustment_clamp_value (vadj); } static int @@ -7476,12 +7471,12 @@ caja_icon_container_scroll_to_icon (CajaIconContainer *container, if (caja_icon_container_is_layout_vertical (container)) { if (caja_icon_container_is_layout_rtl (container)) { - eel_gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width); + gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width); } else { - eel_gtk_adjustment_set_value (hadj, bounds.x0); + gtk_adjustment_set_value (hadj, bounds.x0); } } else { - eel_gtk_adjustment_set_value (vadj, bounds.y0); + gtk_adjustment_set_value (vadj, bounds.y0); } } |