[nautilus] Make rubberband fade obey gtk animation setting.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Make rubberband fade obey gtk animation setting.
- Date: Mon, 23 Jan 2012 17:57:35 +0000 (UTC)
commit 3c3096371bb8fda0766c59c9467eb8ed24ed67cf
Author: Arthur Taylor <theycallhimart gmail com>
Date: Sun Jan 22 14:35:41 2012 -0800
Make rubberband fade obey gtk animation setting.
The rubberband fade-out effect should observe the gtk animation
setting, intened to make life easier for people running
resource contrained setups (like X11 over a network.)
Signed-off-by: Arthur Taylor <theycallhimart gmail com>
libnautilus-private/nautilus-icon-container.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 942d17a..15cfccf 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -2688,6 +2688,7 @@ stop_rubberbanding (NautilusIconContainer *container,
{
NautilusIconRubberbandInfo *band_info;
GList *icons;
+ gboolean enable_animation;
band_info = &container->details->rubberband_info;
@@ -2697,10 +2698,16 @@ stop_rubberbanding (NautilusIconContainer *container,
band_info->active = FALSE;
+ g_object_get (gtk_settings_get_default (), "gtk-enable-animations", &enable_animation, NULL);
+
/* Destroy this canvas item; the parent will unref it. */
eel_canvas_item_ungrab (band_info->selection_rectangle, time);
eel_canvas_item_lower_to_bottom (band_info->selection_rectangle);
- nautilus_selection_canvas_item_fade_out (NAUTILUS_SELECTION_CANVAS_ITEM (band_info->selection_rectangle), 150);
+ if (enable_animation) {
+ nautilus_selection_canvas_item_fade_out (NAUTILUS_SELECTION_CANVAS_ITEM (band_info->selection_rectangle), 150);
+ } else {
+ eel_canvas_item_destroy (band_info->selection_rectangle);
+ }
band_info->selection_rectangle = NULL;
/* if only one item has been selected, use it as range
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]