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

Use new dialogs (breaking) #49

Merged
merged 10 commits into from
Jun 24, 2024
Merged

Use new dialogs (breaking) #49

merged 10 commits into from
Jun 24, 2024

Conversation

jwahlstrand
Copy link
Member

@jwahlstrand jwahlstrand commented Jan 21, 2024

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.

  • Message dialogs - use GtkAlertDialog instead of GtkMessageDialog
  • Remove warn_dialog and error_dialog since there is no way of styling GtkAlertDialog
  • 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
  • Color chooser dialog
  • Update and improve docs

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2024

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 ⚠️
src/windows.jl 95.34% 2 Missing ⚠️

❗ 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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jwahlstrand jwahlstrand changed the base branch from main to v7 June 23, 2024 20:48
@jwahlstrand jwahlstrand marked this pull request as ready for review June 24, 2024 00:53
@jwahlstrand jwahlstrand merged commit 3f03536 into v7 Jun 24, 2024
6 checks passed
@jwahlstrand jwahlstrand deleted the jw/newdialogs branch June 24, 2024 00:54
@jwahlstrand jwahlstrand mentioned this pull request Sep 20, 2024
jwahlstrand added a commit that referenced this pull request Sep 21, 2024
* require julia 1.10

* minor stuff

* improve test coverage (#70)

* Use new dialogs (breaking) (#49)

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.

* GtkTextView: use pointer or Ref instead of _GtkTextIter struct (breaking) (#62)

* GtkTextView: use pointer or ref instead of _GtkTextIter struct

This is more consistent with everything else in the package

* random stuff

* support adding widgets to gutter

* fix GtkTextIter auto-generated methods, better support methods for all non-opaque structs

* a bit of tidying

* remove unneeded version check

* add simple TextView example

* update auto-generated code for Adwaita

* simplify generation script for Adwaita

* update auto-generated code

* regenerate code
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.

2 participants