summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-07-11 14:43:51 +0300
committerOndrej Holy <oholy@redhat.com>2021-11-22 15:16:18 +0000
commit67b66a4d5109e288bf6f2edd6b9f929bd051c0d8 (patch)
tree8be4e68a6a6095f3ab4d168edb2d33b015f830a6
parent09628b74848b345aebfcd99525cbd34a48d80a7b (diff)
downloadnautilus-67b66a4d5109e288bf6f2edd6b9f929bd051c0d8.tar.gz
tree-view-drag-dest: Stop connecting to ::draw
The "treeview-drop-indicator" style class was a thing in GTK2, but not in GTK3. So, remove this old code which isn't even do anything visible anymore. Also, the ::draw signal is going away when we move to GTK4. Rebased and ammended by António Fernandes <antoniof@gnome.org>
-rw-r--r--src/nautilus-tree-view-drag-dest.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/nautilus-tree-view-drag-dest.c b/src/nautilus-tree-view-drag-dest.c
index 2a98181b4..939a89978 100644
--- a/src/nautilus-tree-view-drag-dest.c
+++ b/src/nautilus-tree-view-drag-dest.c
@@ -182,64 +182,12 @@ remove_expand_timer (NautilusTreeViewDragDest *dest)
}
}
-static gboolean
-highlight_draw (GtkWidget *widget,
- cairo_t *cr,
- gpointer data)
-{
- GdkWindow *bin_window;
- int width;
- int height;
- GtkStyleContext *style;
-
- /* FIXMEchpe: is bin window right here??? */
- bin_window = gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget));
-
- width = gdk_window_get_width (bin_window);
- height = gdk_window_get_height (bin_window);
-
- style = gtk_widget_get_style_context (widget);
-
- gtk_style_context_save (style);
- gtk_style_context_add_class (style, "treeview-drop-indicator");
-
- gtk_render_focus (style,
- cr,
- 0, 0, width, height);
-
- gtk_style_context_restore (style);
-
- return FALSE;
-}
-
-static void
-set_widget_highlight (NautilusTreeViewDragDest *dest,
- gboolean highlight)
-{
- if (!highlight)
- {
- g_clear_signal_handler (&dest->details->highlight_id, dest->details->tree_view);
- gtk_widget_queue_draw (GTK_WIDGET (dest->details->tree_view));
- }
-
- if (highlight && !dest->details->highlight_id)
- {
- dest->details->highlight_id =
- g_signal_connect_object (dest->details->tree_view,
- "draw",
- G_CALLBACK (highlight_draw),
- dest, 0);
- gtk_widget_queue_draw (GTK_WIDGET (dest->details->tree_view));
- }
-}
-
static void
set_drag_dest_row (NautilusTreeViewDragDest *dest,
GtkTreePath *path)
{
if (path)
{
- set_widget_highlight (dest, FALSE);
gtk_tree_view_set_drag_dest_row
(dest->details->tree_view,
path,
@@ -247,7 +195,6 @@ set_drag_dest_row (NautilusTreeViewDragDest *dest,
}
else
{
- set_widget_highlight (dest, TRUE);
gtk_tree_view_set_drag_dest_row (dest->details->tree_view,
NULL,
0);
@@ -258,7 +205,6 @@ static void
clear_drag_dest_row (NautilusTreeViewDragDest *dest)
{
gtk_tree_view_set_drag_dest_row (dest->details->tree_view, NULL, 0);
- set_widget_highlight (dest, FALSE);
}
static gboolean