Skip to content

Conversation

@JoseBritto
Copy link
Member

@JoseBritto JoseBritto commented Jan 14, 2025

Now uses dotnet 9 and gnome platform 47

Closes #814
Closes #812
Closes #820
Closes #824 ( 531fe4d )

@nlogozzo nlogozzo self-requested a review January 14, 2025 13:37
@JoseBritto JoseBritto requested a review from nlogozzo January 15, 2025 04:23
@JoseBritto JoseBritto dismissed nlogozzo’s stale review January 15, 2025 04:52

Trying to trigger tests again

@JoseBritto JoseBritto marked this pull request as draft January 15, 2025 04:53
@JoseBritto JoseBritto marked this pull request as ready for review January 15, 2025 04:53
@JoseBritto
Copy link
Member Author

All checks seem to be passing now. I haven't tested snap on my machine. Flatpak seem to work fine.

I copied everything from yelp/C to yelp/bg. I have no idea how the translation system works. Please let me know if this was not the correct thing to do. Without the bg folder both snap and flatpak doesnt seem to build

@soumyaDghosh
Copy link
Member

Snap seems to be working fine.

@JoseBritto
Copy link
Member Author

Thanks!

 Use resources2-symbolic.svg to avoid conflict with gnome-system-monitor

 Closes: #820
@nlogozzo nlogozzo requested review from nlogozzo and removed request for nlogozzo March 3, 2025 20:56
@JoseBritto
Copy link
Member Author

JoseBritto commented Mar 4, 2025

Not sure why flatpak failed now. It did build after I updated dependencies

@nlogozzo
Copy link
Member

nlogozzo commented Mar 4, 2025

Not sure why flatpak failed now. It did build after I updated dependencies

Probably requires flatpak-dotnet-generator to update dependencies again.

@JoseBritto
Copy link
Member Author

image
This could be related. We had a deprecation warning on the last run. upload artifact v3 stopped working according to this: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

@JoseBritto JoseBritto marked this pull request as draft March 4, 2025 22:25
@JoseBritto JoseBritto marked this pull request as ready for review March 4, 2025 22:25
@JoseBritto JoseBritto marked this pull request as draft March 5, 2025 14:09
@JoseBritto JoseBritto marked this pull request as ready for review March 5, 2025 14:09
@JoseBritto JoseBritto marked this pull request as draft March 5, 2025 14:19
@JoseBritto JoseBritto marked this pull request as ready for review March 5, 2025 14:19
@JoseBritto
Copy link
Member Author

Not sure how to properly do 97acb56

I assumed it should just work since its only a patch release. The github action still kept looking for 9.0.0 somehow and failing. Reverted the commit for now.

@nlogozzo Let me know if I should reset the branch to 95a5014 and force push. Left the reverts like this for now incase you can spot something I missed.

@JoseBritto JoseBritto marked this pull request as draft March 11, 2025 03:23
@JoseBritto JoseBritto marked this pull request as ready for review March 11, 2025 03:23
@JoseBritto
Copy link
Member Author

JoseBritto commented Mar 11, 2025

Might not have done the GirCore upgrade in the cleanest way possible. Probably should be avoiding using DangerousGetHandle methods altogether. Since this would get rewritten anyway I'm not sure if that would be worth the effort.

@JoseBritto
Copy link
Member Author

I think this should be now ready for review.

@JoseBritto
Copy link
Member Author

I couldn't find a safe alternative to this:

        public static bool Parse(out RGBA? colorRGBA, string spec)
        {
            if (gdk_rgba_parse(out var val, spec))
            {
                colorRGBA = val;
                return true;
            }
            colorRGBA = null;
            return false;
        }

So that and SetExtRGBA in GtkHelper is the only places where C interop is done. All others are removed if I didnt miss anything. There's this method: Gdk.Internal.RGBA.Parse that needs RGBAHandle. I'm not sure how to instantiate one.
SetExtRGBA can be replaced by SetRGBA if I can parse an Gtk.Internal.RGBA from a string.

@nlogozzo
Copy link
Member

So that and SetExtRGBA in GtkHelper is the only places where C interop is done. All others are removed if I didnt miss anything. There's this method: Gdk.Internal.RGBA.Parse that needs RGBAHandle. I'm not sure how to instantiate one.
SetExtRGBA can be replaced by SetRGBA if I can parse an Gtk.Internal.RGBA from a string.

I don't have a C# environment setup to test anymore but you should be able to maybe do something like this:

public static bool Parse(out RGBA? colorRGBA, string spec)
{
    Gdk.RGBA rgba;
    if(Gdk.Internal.RGBA.Parse(rgba.Handle, spec))
    {
        colorRGBA = rgba;
        return true;
    }
    colorRGBA = null;
    return false;
}

@JoseBritto
Copy link
Member Author

I don't have a C# environment setup to test anymore but you should be able to maybe do something like this:

I couldn't find a way to get the handle of a new RGBA.

Gdk.Internal.RGBA.Parse() needs an RGBAHandle and spec but new Gdk.Internal.RGBA doesnt have a way to get it as far I could find:

image

@nlogozzo
Copy link
Member

I believe you shouldn't be using Gdk.Internal.RGBA for the actual object, but regular Gdk.RGBA (i.e. RGBA) and then call Gdk.Internal.RGBA.Parse with the handle from Gdk.RGBA.

Again, I could be making all the up but it should work

@JoseBritto
Copy link
Member Author

JoseBritto commented Mar 12, 2025

Oh. Yes that works. Thanks.I didnot see that there was Gdk.RGBA. Now my problem is how do I go from string to GLib.Internal.NonNullableUtf8StringHandle for the spec argument 🤔 Need to figure that out

@JoseBritto
Copy link
Member Author

@JoseBritto
Copy link
Member Author

Ah nevermind. rgba had a parse method. No need to go into internal

@JoseBritto
Copy link
Member Author

I have deleted GdkHelper and GtkHelper as I don't think we would need them any longer

@nlogozzo nlogozzo self-requested a review March 12, 2025 10:22
@nlogozzo nlogozzo merged commit cf3aa8f into main Mar 17, 2025
4 checks passed
@nlogozzo nlogozzo deleted the updates branch March 17, 2025 09:43
@swick
Copy link

swick commented Apr 4, 2025

Is anyone trying to get this into flathub? It's currently depending on an unsupported runtime which isn't great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

6 participants