Skip to content

Commit fc1af3b

Browse files
jenshannoschwalmTurboGit
authored andcommitted
Forbid image change while in GIMP plugin mode
We simply must not do that.
1 parent f9e050a commit fc1af3b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/views/darkroom.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,11 @@ static gboolean _dev_load_requested_image(gpointer user_data);
951951
static void _dev_change_image(dt_develop_t *dev,
952952
const dt_imgid_t imgid)
953953
{
954+
if(dt_check_gimpmode("file"))
955+
{
956+
dt_control_log(_("can't change image in GIMP plugin mode"));
957+
return;
958+
}
954959
// Pipe reset needed when changing image
955960
// FIXME: synch with dev_init() and dev_cleanup() instead of redoing it
956961

@@ -1328,9 +1333,13 @@ static void _view_darkroom_filmstrip_activate_callback(gpointer instance,
13281333
}
13291334
}
13301335

1331-
static void dt_dev_jump_image(dt_develop_t *dev, int diff, gboolean by_key)
1336+
static void _dev_jump_image(dt_develop_t *dev, int diff, gboolean by_key)
13321337
{
1333-
1338+
if(dt_check_gimpmode("file"))
1339+
{
1340+
dt_control_log(_("can't change image in GIMP plugin mode"));
1341+
return;
1342+
}
13341343
const dt_imgid_t imgid = dev->requested_id;
13351344
int new_offset = 1;
13361345
dt_imgid_t new_id = NO_IMGID;
@@ -1419,12 +1428,12 @@ static void zoom_out_callback(dt_action_t *action)
14191428

14201429
static void skip_f_key_accel_callback(dt_action_t *action)
14211430
{
1422-
dt_dev_jump_image(dt_action_view(action)->data, 1, TRUE);
1431+
_dev_jump_image(dt_action_view(action)->data, 1, TRUE);
14231432
}
14241433

14251434
static void skip_b_key_accel_callback(dt_action_t *action)
14261435
{
1427-
dt_dev_jump_image(dt_action_view(action)->data, -1, TRUE);
1436+
_dev_jump_image(dt_action_view(action)->data, -1, TRUE);
14281437
}
14291438

14301439
static void _darkroom_ui_pipe_finish_signal_callback(gpointer instance,

0 commit comments

Comments
 (0)