Gtk4.jl icon indicating copy to clipboard operation
Gtk4.jl copied to clipboard

Use new dialogs (breaking)

Open jwahlstrand opened this issue 1 year ago • 1 comments

In the newer versions of GTK v4, new dialogs were introduced and the old ones were deprecated, including GtkDialog and GtkMessageDialog. There isn't much difference in user-facing behavior, but since the old ones were deprecated it's less likely bugs will be fixed. This PR migrates to the new dialogs and cleans up our API a little.

I left the file dialogs alone after looking in the C code and realizing that the new dialogs are based on GtkFileChooserNative, like the old code.

  • [x] Message dialogs - use GtkAlertDialog instead of GtkMessageDialog
  • [X] Remove warn_dialog and error_dialog since there is no way of styling GtkAlertDialog
  • [x] Input dialog - use a GtkWindow with an entry and some buttons rather than GtkMessageDialog
  • [ ] Remove or change buttons argument in input_dialog to make more sense
  • [x] Color chooser dialog
  • [ ] Update and improve docs

jwahlstrand avatar Jan 21 '24 14:01 jwahlstrand

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (2c7132c) 85.75% compared to head (d2d31ed) 85.73%.

Files Patch % Lines
src/deprecated.jl 23.80% 16 Missing :warning:
src/windows.jl 95.34% 2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
- Coverage   85.75%   85.73%   -0.03%     
==========================================
  Files          44       44              
  Lines        4668     4682      +14     
==========================================
+ Hits         4003     4014      +11     
- Misses        665      668       +3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jan 21 '24 14:01 codecov-commenter