static gboolean _lib_filmstrip_paste_history_parts_key_accel_callback(GtkAccelGroup *accel_group, GObject *aceeleratable, guint keyval, GdkModifierType modifier, gpointer data) { dt_lib_filmstrip_t *strip = (dt_lib_filmstrip_t *)data; int mode = dt_conf_get_int("plugins/lighttable/copy_history/pastemode"); // get mouse over before launching the dialog int32_t mouse_over_id = dt_control_get_mouse_over_id(); int res = dt_gui_hist_dialog_new(&(strip->dg), strip->history_copy_imgid, FALSE); if(res == GTK_RESPONSE_CANCEL) return FALSE; if(dt_history_copy_and_paste_on_selection(strip->history_copy_imgid, (mode == 0) ? TRUE : FALSE, strip->dg.selops) != 0) { if(mouse_over_id <= 0) return FALSE; dt_history_copy_and_paste_on_image(strip->history_copy_imgid, mouse_over_id, (mode == 0) ? TRUE : FALSE, strip->dg.selops); } dt_control_queue_redraw_center(); return TRUE; }
static gboolean _lib_filmstrip_paste_history_key_accel_callback(GtkAccelGroup *accel_group, GObject *aceeleratable, guint keyval, GdkModifierType modifier, gpointer data) { dt_lib_filmstrip_t *strip = (dt_lib_filmstrip_t *)data; int mode = dt_conf_get_int("plugins/lighttable/copy_history/pastemode"); if (dt_history_copy_and_paste_on_selection (strip->history_copy_imgid, (mode==0)?TRUE:FALSE, strip->dg.selops)!=0) { int32_t mouse_over_id; DT_CTL_GET_GLOBAL(mouse_over_id, lib_image_mouse_over_id); if(mouse_over_id <= 0) return FALSE; dt_history_copy_and_paste_on_image(strip->history_copy_imgid, mouse_over_id, (mode == 0)?TRUE:FALSE,strip->dg.selops); } dt_control_queue_redraw_center(); return TRUE; }