summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Berla <corey@berla.me>2022-12-22 20:04:12 +0000
committerAntónio Fernandes <antoniof@gnome.org>2022-12-22 20:04:12 +0000
commit35022a2aca13262273e4de3a02fde926f645ab58 (patch)
tree0f3b8d5d1732f0661f906a54b32a2f9f5e79c132
parent52ae389530365091831c5aae16eff8c3b31c8775 (diff)
downloadnautilus-35022a2aca13262273e4de3a02fde926f645ab58.tar.gz
list-base: Remove rubberband hack
Revert commit b4d45b3876718dd43d1cc74f5c06fb28d54f9be7 It's no longer necessary now that it's fixed in GTK. See: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4831
-rw-r--r--src/nautilus-list-base.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c
index b5582b2e6..ad4af2fd9 100644
--- a/src/nautilus-list-base.c
+++ b/src/nautilus-list-base.c
@@ -345,28 +345,6 @@ open_context_menu_on_press (NautilusListBase *self,
}
static void
-rubberband_set_state (NautilusListBase *self,
- gboolean enabled)
-{
- /* This is a temporary workaround to deal with the rubberbanding issues
- * during a drag and drop. Disable rubberband on item press and enable
- * rubberbnad on item release/stop. The permanent solution for this is
- * https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4831 */
-
- GtkWidget *view;
-
- view = NAUTILUS_LIST_BASE_CLASS (G_OBJECT_GET_CLASS (self))->get_view_ui (self);
- if (GTK_IS_GRID_VIEW (view))
- {
- gtk_grid_view_set_enable_rubberband (GTK_GRID_VIEW (view), enabled);
- }
- else if (GTK_IS_COLUMN_VIEW (view))
- {
- gtk_column_view_set_enable_rubberband (GTK_COLUMN_VIEW (view), enabled);
- }
-}
-
-static void
on_item_click_pressed (GtkGestureClick *gesture,
gint n_press,
gdouble x,
@@ -391,8 +369,6 @@ on_item_click_pressed (GtkGestureClick *gesture,
n_press == 1 &&
!selection_mode);
- rubberband_set_state (self, FALSE);
-
/* It's safe to claim event sequence on press in the following cases because
* they don't interfere with touch scrolling. */
if (button == GDK_BUTTON_PRIMARY && n_press == 2 && !priv->single_click_mode)
@@ -451,7 +427,6 @@ on_item_click_released (GtkGestureClick *gesture,
activate_selection_on_click (self, FALSE);
}
- rubberband_set_state (self, TRUE);
priv->activate_on_release = FALSE;
priv->deny_background_click = FALSE;
}
@@ -464,7 +439,6 @@ on_item_click_stopped (GtkGestureClick *gesture,
g_autoptr (NautilusListBase) self = nautilus_view_cell_get_view (cell);
NautilusListBasePrivate *priv = nautilus_list_base_get_instance_private (self);
- rubberband_set_state (self, TRUE);
priv->activate_on_release = FALSE;
priv->deny_background_click = FALSE;
}
@@ -1055,9 +1029,6 @@ real_begin_loading (NautilusFilesView *files_view)
NautilusListBase *self = NAUTILUS_LIST_BASE (files_view);
NautilusListBasePrivate *priv = nautilus_list_base_get_instance_private (self);
- /* Temporary workaround */
- rubberband_set_state (self, TRUE);
-
/*TODO move this to the files view class begin_loading and hook up? */