diff options
author | George Mocanu <mocanu.geo98@gmail.com> | 2018-06-03 16:59:38 +0300 |
---|---|---|
committer | Ernestas Kulik <ernestas.kulik@gmail.com> | 2018-06-07 11:52:36 +0000 |
commit | 3a7ebc2b769fa60ade93cb7ffa3419012c12f3ba (patch) | |
tree | 694484d1e3cbf2149ba59e3ae9f149821de991a5 /src/nautilus-list-view.c | |
parent | db8a8d6c1633b1589973b7e6b8ed892ca1ac1315 (diff) | |
download | nautilus-3a7ebc2b769fa60ade93cb7ffa3419012c12f3ba.tar.gz |
list-view: Remove useless variables
Since https://gitlab.gnome.org/GNOME/nautilus/commit/13a8d3efacbe160d2cc9158ec707ab99013d7f87
there is no need for some variables.
The removed variables were used to distinguish between single or
double click. This is no longer needed as GTK3 offers support
for this through gestures.
This patch removes those variables.
Diffstat (limited to 'src/nautilus-list-view.c')
-rw-r--r-- | src/nautilus-list-view.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c index 767f0b260..69aadf0cc 100644 --- a/src/nautilus-list-view.c +++ b/src/nautilus-list-view.c @@ -540,10 +540,6 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture, gint bin_y; GdkEventSequence *sequence; const GdkEvent *event; - gint64 current_time; - static gint64 last_click_time = 0; - static int click_count = 0; - int double_click_time; gboolean call_parent, on_expander, show_expanders; gboolean is_simple_click, path_selected; NautilusFile *file; @@ -581,26 +577,8 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture, tree_view, bin_x, bin_y); - g_object_get (G_OBJECT (gtk_widget_get_settings (widget)), - "gtk-double-click-time", &double_click_time, - NULL); - - /* Determine click count */ - current_time = g_get_monotonic_time (); - if (current_time - last_click_time < double_click_time * 1000) - { - click_count++; - } - else - { - click_count = 0; - } - - /* Stash time for next compare */ - last_click_time = current_time; - /* Ignore double click if we are in single click mode */ - if (get_click_policy () == NAUTILUS_CLICK_POLICY_SINGLE && click_count >= 2) + if (get_click_policy () == NAUTILUS_CLICK_POLICY_SINGLE && n_press >= 2) { return; } @@ -674,7 +652,7 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture, NULL, NULL)); - if (is_simple_click && click_count <= 0 && on_star) + if (is_simple_click && n_press <= 0 && on_star) { on_star_cell_renderer_clicked (path, view); } |