[New actions] [Builds available] Cycle groups, modules, instances and widgets

Why not, I’m always open for discussion. What would be the footprint just for this?

3 Likes

When I am done replying to the messages in the other thread I will try to let you know :smiley:

2 Likes

Hi @Pascal_Obry,

I factored out the code to cycle through modules and groups. It is here:

The footprint is quite small (380 LOC).

Here is what it does:

src/develop/imageop.c / imageop.h

  • Added public dt_iop_gui_delete() wrapper to allow deleting a module instance programmatically

src/gui/accelerators.c / accelerators.h

  • Added dt_action_effect_cycle[] effects array: toggle / previous module / next module / previous instance / next instance

src/libs/modulegroups.c

  • Added cycle module groups shortcut action (toggle/previous/next) that cycles through the module group tabs in the left panel with a toast notification
  • Removed the standalone per-button quick access panel and active modules toggle shortcut registrations (superseded by the cycle action)

src/views/darkroom.c

  • Added cycle iop shortcut action with 5 effects: toggle (enable/disable focused module), previous module / next module (cycle focus through visible IOP modules), previous instance / next instance (cycle focus through instances of the current module) — all with toast feedback
  • Added 4 global <focused> shortcut actions: enable (toggle on/off), show (expand), new instance, delete instance

And here it is in action:

Would you consider it for inclusion in the next release?

I find it very convenient for multi-instance workflows. It makes it possible to navigate through modules and instances, create and delete instances with two keys.

Looking forward to your feedback, thanks!

@Qor FYI

3 Likes

Thank you very much!

1 Like

Hello @Masterpiga

Thanks a lot!

It is incredible how much you have contributed to darktable these past months :slight_smile:

2 Likes

Eh, I have a lot of ideas and no time. What changed is that now I have a reliable sparring partner that helps me cut through the fluff and get things done :grin:

1 Like

@Pascal_Obry gentle ping, if there is no objection I can prepare a PR.

1 Like

Yes, go ahead. I have spotted two things that need clarification. It seems the “quick access panel” and “active modules” actions have been removed. I understand that the new support will cycle through module groups, but direct access to the two above should be kept as most probably already used by some users. Or maybe I missed something reading the PR…

2 Likes

Most probably I was just clumsy, I had not reviewed this change in a long time, merging master was huge and I must have done some mistake. I will check that no existing functionality is affected and prepare the PR, thanks a lot!

1 Like

Here is the PR:

And yes, @Pascal_Obry, I had removed the two actions that you mention by accident, I have restored them now. TIA!

Edit Merged, thanks a lot @Pascal_Obry!

3 Likes

Thank you very much!

2 Likes