@@ -941,51 +941,13 @@ static gboolean _event_main_motion(GtkWidget *widget,
941
941
return FALSE;
942
942
}
943
943
944
- static gboolean _event_main_press (GtkWidget * widget ,
945
- GdkEventButton * event ,
946
- gpointer user_data )
947
- {
948
- dt_thumbnail_t * thumb = (dt_thumbnail_t * )user_data ;
949
- if (event -> button == 1
950
- && ((event -> type == GDK_2BUTTON_PRESS && !thumb -> single_click )
951
- || (event -> type == GDK_BUTTON_PRESS
952
- && dt_modifier_is (event -> state , 0 ) && thumb -> single_click )))
953
- {
954
- dt_control_set_mouse_over_id (thumb -> imgid );
955
- // to ensure we haven't lost imgid during double-click
956
- }
957
- return FALSE;
958
- }
959
- static gboolean _event_main_release (GtkWidget * widget ,
960
- GdkEventButton * event ,
961
- gpointer user_data )
962
- {
963
- dt_thumbnail_t * thumb = (dt_thumbnail_t * )user_data ;
964
-
965
- if (event -> button == 1
966
- && !thumb -> moved
967
- && thumb -> sel_mode != DT_THUMBNAIL_SEL_MODE_DISABLED )
968
- {
969
- if (dt_modifier_is (event -> state , 0 )
970
- && thumb -> sel_mode != DT_THUMBNAIL_SEL_MODE_MOD_ONLY )
971
- dt_selection_select_single (darktable .selection , thumb -> imgid );
972
- else if (dt_modifier_is (event -> state , GDK_MOD1_MASK ))
973
- dt_selection_select_single (darktable .selection , thumb -> imgid );
974
- else if (dt_modifier_is (event -> state , GDK_CONTROL_MASK )
975
- || dt_modifier_is (event -> state , GDK_MOD2_MASK )) // CMD key on macOS
976
- dt_selection_toggle (darktable .selection , thumb -> imgid );
977
- else if (dt_modifier_is (event -> state , GDK_SHIFT_MASK ))
978
- dt_selection_select_range (darktable .selection , thumb -> imgid );
979
- }
980
- return FALSE;
981
- }
982
-
983
944
static gboolean _event_rating_press (GtkWidget * widget ,
984
945
GdkEventButton * event ,
985
946
gpointer user_data )
986
947
{
987
948
return TRUE;
988
949
}
950
+
989
951
static gboolean _event_rating_release (GtkWidget * widget ,
990
952
GdkEventButton * event ,
991
953
gpointer user_data )
@@ -1402,11 +1364,6 @@ GtkWidget *dt_thumbnail_create_widget(dt_thumbnail_t *thumb,
1402
1364
g_signal_connect (G_OBJECT (thumb -> w_main ), "drag-motion" ,
1403
1365
G_CALLBACK (_event_main_drag_motion ), thumb );
1404
1366
1405
- g_signal_connect (G_OBJECT (thumb -> w_main ), "button-press-event" ,
1406
- G_CALLBACK (_event_main_press ), thumb );
1407
- g_signal_connect (G_OBJECT (thumb -> w_main ), "button-release-event" ,
1408
- G_CALLBACK (_event_main_release ), thumb );
1409
-
1410
1367
g_object_set_data (G_OBJECT (thumb -> w_main ), "thumb" , thumb );
1411
1368
DT_DEBUG_CONTROL_SIGNAL_CONNECT (darktable .signals , DT_SIGNAL_ACTIVE_IMAGES_CHANGE ,
1412
1369
G_CALLBACK (_dt_active_images_callback ), thumb );
0 commit comments