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

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

Merged
merged 5 commits into from
Jul 6, 2024

Conversation

jwahlstrand
Copy link
Member

@jwahlstrand jwahlstrand commented May 11, 2024

The struct _GtkTextIter is not opaque, but users of this package are never going to want to modify its fields, which are literally all named "dummy". It makes way more sense to pass pointers and references to it than the struct itself, and it's more consistent with everything else in this package. Both GtkTextView and GtkTreeView sort of fell through the cracks when I was sorting out major issues back around version 0.3.

One could do the same thing with GtkTreeView and _GtkTreeIter, but that API is deprecated in recent versions of GTK4 and its functionality can be replaced with GtkListView, etc. So I am strongly inclined to leave it alone.

This is more consistent with everything else in the package
@jwahlstrand jwahlstrand changed the base branch from main to v7 June 24, 2024 00:54
@codecov-commenter
Copy link

codecov-commenter commented Jul 6, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 70.77922% with 45 lines in your changes missing coverage. Please review.

Please upload report for BASE (v7@3f03536). Learn more about missing BASE report.

Files Patch % Lines
src/text.jl 70.21% 42 Missing ⚠️
GI/src/giimport.jl 75.00% 2 Missing ⚠️
src/GLib/gerror.jl 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@          Coverage Diff          @@
##             v7      #62   +/-   ##
=====================================
  Coverage      ?   82.03%           
=====================================
  Files         ?       44           
  Lines         ?     4842           
  Branches      ?        0           
=====================================
  Hits          ?     3972           
  Misses        ?      870           
  Partials      ?        0           

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

@jwahlstrand jwahlstrand merged commit 68ad832 into v7 Jul 6, 2024
5 of 6 checks passed
@jwahlstrand jwahlstrand deleted the jw/textbreak branch July 6, 2024 22:32
@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