Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Input Dialog refactor] Replace 5 function parameters with 2 #3826

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ntrel
Copy link
Member

@ntrel ntrel commented Apr 8, 2024

dialogs_show_input_full had grown into a monster taking 2 different sets of callbacks.
The complexity can be removed if:

  • the caller creates the combo/entry widget, as they can then connect any special signals to it themselves.
  • the caller chooses whether to call gtk_dialog_run

I was also tempted to remove the callback for dialogs_show_input_persistent, but I haven't done that here.

`dialogs_show_input_full` had grown into a monster.
All that complexity can be removed if the caller creates the combo/entry
widget, as they can then connect signals themselves.
Copy link
Member

@elextr elextr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree its a better idea to put the common parts in the shared function and the different parts in the callers.

Not tested but LGBI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants